Skip to content

Commit f02c1ee

Browse files
committed
Change default to Alt, do test both Alt and Accel
1 parent 8ccdac8 commit f02c1ee

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ over the underlined code to see a more detailed message
2727

2828
### Jump to Definition
2929

30-
Use the context menu entry, or <kbd>Ctrl</kbd> + :computer_mouse: to jump to definitions (<kbd>⌘</kbd> on Mac; customizable); use <kbd>Alt</kbd> + <kbd>o</kbd> to jump back
30+
Use the context menu entry, or <kbd>Alt</kbd> + :computer_mouse: to jump to definitions (you can change it to <kbd>Ctrl</kbd>/<kbd>⌘</kbd> in settings); use <kbd>Alt</kbd> + <kbd>o</kbd> to jump back
3131

3232
![jump](https://raw.githubusercontent.com/krassowski/jupyterlab-lsp/master/examples/screenshots/jump_to_definition.png)
3333

atest/05_Features/Jump.robot

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Python Jumps between Files
1919

2020
Ctrl Click And Jumping Back Works
2121
[Setup] Prepare File for Editing Python editor jump.py
22+
Configure JupyterLab Plugin {"modifierKey": "Accel"} plugin id=${JUMP PLUGIN ID}
2223
Wait Until Fully Initialized
2324
${usage} = Set Variable a_variable
2425
${sel} = Set Variable xpath:(//span[contains(@class, 'cm-variable')][contains(text(), '${usage}')])[last()]
@@ -34,6 +35,9 @@ Ctrl Click And Jumping Back Works
3435
Wait Until Keyword Succeeds 10 x 1 s Cursor Should Jump ${new}
3536
${back} = Measure Cursor Position
3637
Should Be Equal ${original} ${back}
38+
Configure JupyterLab Plugin {"modifierKey": "Alt"} plugin id=${JUMP PLUGIN ID}
39+
Click Element ${sel} modifier=ALT
40+
Wait Until Keyword Succeeds 10 x 1 s Cursor Should Jump ${original}
3741
[Teardown] Clean Up After Working With File jump.py
3842

3943
*** Keywords ***

atest/Variables.robot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ ${CM CURSORS} css:.jp-MainAreaWidget:not(.lm-mod-hidden) .CodeMirror-cursors
4545
# settings
4646
${LSP PLUGIN ID} @krassowski/jupyterlab-lsp:plugin
4747
${COMPLETION PLUGIN ID} @krassowski/jupyterlab-lsp:completion
48+
${JUMP PLUGIN ID} @krassowski/jupyterlab-lsp:jump_to
4849
${DIAGNOSTICS PLUGIN ID} @krassowski/jupyterlab-lsp:diagnostics
4950
${CSS USER SETTINGS} .jp-SettingsRawEditor-user
5051
${JLAB XP CLOSE SETTINGS} ${JLAB XP DOCK TAB}\[contains(., 'Settings')]/*[contains(@class, 'm-TabBar-tabCloseIcon')]

packages/jupyterlab-lsp/schema/jump_to.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"title": "Modifier key",
1010
"type": "string",
1111
"enum": ["Alt", "Control", "Shift", "Meta", "AltGraph", "Accel"],
12-
"default": "Accel",
12+
"default": "Alt",
1313
"description": "Keyboard key which needs to be pressed with click to jump. The allowed keys are Alt, Control, Shift, Accel, and AltGraph. Accel corresponds to Control or Meta (⌘ Command on Mac). Linux user: Meta key is also supported. Safari users: Meta key is also supported, AltGraph is not supported. To see which physical keys are mapped, visit: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState"
1414
}
1515
},

0 commit comments

Comments
 (0)