Theia keymaps.json
fixes terminal: restore Alt+d Ctrl+K Ctrl+P to their "classic" behavior add Ctrl+Alt+w to close tab remap prev/next tab to Ctrl+Shift+Tab and Ctrl+Tab
-
@xavier_thompson FYI I'm using these keymaps, mostly to make terminal keybindings work like a "classic" terminal
-
Thanks for sharing, do you think it would make sense to include this by default in
software/theia
? -
old comment when the content of snippet was like this:
[ { "command": "-plantuml.preview", "keybinding": "Alt+d", "resolved": [ { "key": { "code": "KeyD", "keyCode": 68, "easyString": "d" }, "ctrl": false, "shift": false, "alt": true, "meta": false } ], "scope": 1 }, { "command": "plantuml.preview", "keybinding": "Alt+d", "context": "editorTextFocus", "resolved": [ { "key": { "code": "KeyD", "keyCode": 68, "easyString": "d" }, "ctrl": false, "shift": false, "alt": true, "meta": false } ], "scope": 1 }, { "command": "file-search.openFile", "keybinding": "ctrlcmd+p", "when": "editorTextFocus", "resolved": [ { "key": { "code": "KeyP", "keyCode": 80, "easyString": "p" }, "ctrl": true, "shift": false, "alt": false, "meta": false } ], "scope": 1 }, { "command": "-file-search.openFile", "keybinding": "ctrlcmd+p", "resolved": [ { "key": { "code": "KeyP", "keyCode": 80, "easyString": "p" }, "ctrl": true, "shift": false, "alt": false, "meta": false } ], "scope": 1 }, { "command": "-terminal:clear", "keybinding": "ctrlcmd+k", "context": "terminalActive" }, { "command": "core.nextTab", "keybinding": "ctrl+tab", "resolved": [ { "key": { "code": "Tab", "keyCode": 9, "easyString": "tab" }, "ctrl": true, "shift": false, "alt": false, "meta": false } ], "scope": 1 }, { "command": "-core.nextTab", "keybinding": "ctrlcmd+alt+d", "resolved": [ { "key": { "code": "KeyD", "keyCode": 68, "easyString": "d" }, "ctrl": true, "shift": false, "alt": true, "meta": false } ], "scope": 1 }, { "command": "core.previousTab", "keybinding": "ctrl+shift+tab", "resolved": [ { "key": { "code": "Tab", "keyCode": 9, "easyString": "tab" }, "ctrl": true, "shift": true, "alt": false, "meta": false } ], "scope": 1 }, { "command": "-core.previousTab", "keybinding": "ctrlcmd+alt+a", "resolved": [ { "key": { "code": "KeyQ", "keyCode": 81, "easyString": "q" }, "ctrl": true, "shift": false, "alt": true, "meta": false } ], "scope": 1 }, { "command": "core.close.tab", "keybinding": "ctrl+alt+w", "resolved": [ { "key": { "code": "KeyZ", "keyCode": 90, "easyString": "z" }, "ctrl": true, "shift": false, "alt": true, "meta": false } ], "scope": 1 }, { "command": "-core.close.tab", "keybinding": "ctrl+w", "resolved": [ { "key": { "code": "KeyZ", "keyCode": 90, "easyString": "z" }, "ctrl": true, "shift": false, "alt": false, "meta": false } ], "scope": 1 } ]
I don't know, usually we try not to customize too much, so it's probably better to use the default keybindings
There's also a problem that there's a warning that this config is deprecated:
but if I use
when
instead ofcontext
as suggested the keybinding override is no longer effective. Also note that this config file was generated by using this action:so it's like it generates obsolete config by default. The concern with all this is that if we ship a customization we might have problems maintaining it.
For the
alt+d
, this comes from plantuml extension, I wanted to file an issue there recommending not to use such a global shortcut or at least not to enable it in the context of the terminal. Another way might be to not install this extension by default.