diff --git a/cursor/keybindings.json b/cursor/keybindings.json index e21c596..974ecf9 100644 --- a/cursor/keybindings.json +++ b/cursor/keybindings.json @@ -216,6 +216,23 @@ // Text navigation // =========================================================================== // + { // Forward paragraph. + "key": "alt+e", + "command": "emacs-mcx.forwardParagraph", + "when": "editorTextFocus && !suggestWidgetVisible" + }, + { // Forward paragraph. + // This is a workaround for alt+e not working in VSCode. Relies on + // Karabiner-Elements to remap alt+e to cmd+alt+right. + "key": "cmd+alt+right", + "command": "emacs-mcx.forwardParagraph", + "when": "editorTextFocus && !suggestWidgetVisible" + }, + { // Backward paragraph. + "key": "alt+a", + "command": "emacs-mcx.backwardParagraph", + "when": "editorTextFocus && !suggestWidgetVisible" + }, { // Go to symbol definition. "key": "ctrl+t", "command": "workbench.action.gotoSymbol", diff --git a/karabiner/vscode-alt-keybindings-workaround.json b/karabiner/vscode-alt-keybindings-workaround.json index ca859a3..417cfc0 100644 --- a/karabiner/vscode-alt-keybindings-workaround.json +++ b/karabiner/vscode-alt-keybindings-workaround.json @@ -1,71 +1,104 @@ { - "description": "VSCode alt keybindings workaround", - "manipulators": [ + "description": "VSCode alt keybindings workaround", + "manipulators": [ + { + "conditions": [ { - "conditions": [ - { - "bundle_identifiers": [ - "^com\\.microsoft\\.VSCode", - "^com\\.todesktop\\." - ], - "type": "frontmost_application_if" - } - ], - "from": { - "key_code": "i", - "modifiers": { - "mandatory": [ - "option" - ], - "optional": [ - "caps_lock", - "shift" - ] - } - }, - "to": [ - { - "key_code": "up_arrow", - "modifiers": [ - "left_option", - "left_command" - ] - } - ], - "type": "basic" - }, - { - "conditions": [ - { - "bundle_identifiers": [ - "^com\\.microsoft\\.VSCode", - "^com\\.todesktop\\." - ], - "type": "frontmost_application_if" - } - ], - "from": { - "key_code": "n", - "modifiers": { - "mandatory": [ - "option" - ], - "optional": [ - "caps_lock", - "shift" - ] - } - }, - "to": [ - { - "key_code": "down_arrow", - "modifiers": [ - "left_option", - "left_command" - ] - } - ], - "type": "basic" + "bundle_identifiers": [ + "^com\\.microsoft\\.VSCode", + "^com\\.todesktop\\." + ], + "type": "frontmost_application_if" } - ] -} \ No newline at end of file + ], + "from": { + "key_code": "i", + "modifiers": { + "mandatory": [ + "option" + ], + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "key_code": "up_arrow", + "modifiers": [ + "left_option", + "left_command" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "bundle_identifiers": [ + "^com\\.microsoft\\.VSCode", + "^com\\.todesktop\\." + ], + "type": "frontmost_application_if" + } + ], + "from": { + "key_code": "n", + "modifiers": { + "mandatory": [ + "option" + ], + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "key_code": "down_arrow", + "modifiers": [ + "left_option", + "left_command" + ] + } + ], + "type": "basic" + }, + { + "conditions": [ + { + "bundle_identifiers": [ + "^com\\.microsoft\\.VSCode", + "^com\\.todesktop\\." + ], + "type": "frontmost_application_if" + } + ], + "from": { + "key_code": "e", + "modifiers": { + "mandatory": [ + "option" + ], + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "key_code": "right_arrow", + "modifiers": [ + "left_option", + "left_command" + ] + } + ], + "type": "basic" + } + ] +}