Closed svenax closed 7 years ago
Works for me, do you have any custom keybindings?
I do have custom bindings with a cmd+k
prefix. It works if I remove those, so apparently builtin and custom bindings are handled differently. Here are the relevant bindings:
{
"key": "cmd+k w",
"command": "editor.action.toggleWordWrap"
},
{
"key": "cmd+k f",
"command": "-workbench.action.closeFolder"
},
{
"key": "cmd+k f",
"command": "editor.action.formatDocument",
"when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly"
},
@svenax overriding a coord keybinding is a little fragile, you will notice in the default keybindings that cmd+k is below all the other chord keybindings (except for markdown preview which has a different context). This is intentional and is how they're overridden when the terminal is focused.
The current way around this is to just redefine cmd+k again underneath your custom keybindings:
{
"key": "cmd+k w",
"command": "editor.action.toggleWordWrap"
},
{
"key": "cmd+k f",
"command": "-workbench.action.closeFolder"
},
{
"key": "cmd+k f",
"command": "editor.action.formatDocument",
"when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly"
},
{ "key": "cmd+k", "command": "workbench.action.terminal.clear",
"when": "terminalFocus" },
In an external terminal window, typing
cmd+K
clears all text. The default keyboard shortcuts contain the following, indicating that this should work in the integrated terminal too:Steps to Reproduce:
cmd+K
to clear the text.Reproduces without extensions: Yes