From b5f533a83b8277f3135c205ee6710d69d5a62ead Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Fri, 1 May 2020 22:45:33 -0500 Subject: [PATCH] - Improved VS Code wordwise to work without any VS Code keybinding modifications required. --- xkeysnail-config/kinto.py | 8 ++++---- xkeysnail-config/vscode_keybindings.json | 13 ------------- 2 files changed, 4 insertions(+), 17 deletions(-) delete mode 100644 xkeysnail-config/vscode_keybindings.json diff --git a/xkeysnail-config/kinto.py b/xkeysnail-config/kinto.py index d9cd87f..ac73239 100644 --- a/xkeysnail-config/kinto.py +++ b/xkeysnail-config/kinto.py @@ -118,12 +118,12 @@ define_keymap(lambda wm_class: wm_class not in ("Code"),{ # Keybindings for VS Code define_keymap(re.compile("Code"),{ # Wordwise remaining - for VS Code + # Keeping Alt is a hack, but works K("M-Left"): K("C-M-Left"), # Left of Word K("M-Right"): K("C-M-Right"), # Right of Word - # Shift select word has a bug that prevents selection - # use ./xkeysnail-config/vscode_keybindings.json - # K("M-Shift-Left"): K("C-Shift-Left"), # Select Left of Word - # K("M-Shift-Right"): K("C-Shift-Right"), # Select Right of Word + # Alt-F19 hack fixes Alt menu activation + K("M-Shift-Left"): [K("M-F19"),K("C-Shift-Left")], # Select Left of Word + K("M-Shift-Right"): [K("M-F19"),K("C-Shift-Right")], # Select Right of Word # VS Code Shortcuts K("C-g"): pass_through_key, # cancel Go to Line... diff --git a/xkeysnail-config/vscode_keybindings.json b/xkeysnail-config/vscode_keybindings.json deleted file mode 100644 index fd455ac..0000000 --- a/xkeysnail-config/vscode_keybindings.json +++ /dev/null @@ -1,13 +0,0 @@ -// Place your key bindings in this file to override the defaultsauto[] -[ - { - "key": "shift+alt+left", - "command": "cursorWordStartLeftSelect", - "when": "textInputFocus" - }, - { - "key": "shift+alt+right", - "command": "cursorWordEndRightSelect", - "when": "textInputFocus" - } -] \ No newline at end of file