Somehow I can't use ⌘ + K
to clear terminal even though the shortcut has set up as default.
Asked
Active
Viewed 2,478 times
6

starball
- 20,030
- 7
- 43
- 238

mayognaise
- 161
- 5
-
Can you double check keybindings.json directly? Can you try `ctrl+l`, which is default shortcut for bash? – qxg Jul 17 '18 at 09:15
-
1Did you try disabling all extensions to see if any of them were causing the issue? – jabacchetta Jul 17 '18 at 14:56
-
@qxg Thank you so much for the answering - Checked `keybindings.json` and there is the command - `ctrl+l` worked However it doesn't work if any tasks are running. @jabacchetta Thank you so much for the answering - Bingo It was conflicted by [Sublime Text Keymap and Settings Importer](https://code.visualstudio.com/docs/getstarted/keybindings). I'll try to overwrite the keybindings. – mayognaise Jul 18 '18 at 08:18
-
you should add an anwser (people want to vote either for the question or the answer + the question looks seems to have no answer) – JinSnow Feb 19 '19 at 07:27
-
Did not work, but this worked ". I just went to File -> Preferences -> Keyboard Shortcuts and found the mapping for Clear: workbench.action.terminal.clear did not have a mapping anymore. I added Ctrl + K back, there were no conflicts, and it works fine again. Maybe an oversight on the release?" src: https://stackoverflow.com/questions/48713604/how-can-i-clear-the-terminal-in-visual-studio-code – JinSnow Feb 19 '19 at 07:31
1 Answers
1
Solution moved from @mayognaise's question post.
The command was overwritten by an extension. To overwrite it to reset, added the following lines in
keybindings.json
.
{ "key": "cmd+k", "command": "workbench.action.terminal.clear", "when": "terminalFocus" }

starball
- 20,030
- 7
- 43
- 238