Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable VS Code chords

I'm using VS Code 1.51.11 on Mac OS X.

Inside my integrated terminal I want to use the binding CMD+K to trigger the clear command to clear the terminal. It works in my regular Terminal.app, but when I do it in VS Code's integrated terminal I receive the message CMD+K was pressed. Waiting for second key of chord....

I've done research on how to disable chords in VS Code but found no solution in the official documentation or other blog posts on the internet.

I've also checked my key bindings and CMD+K is mapped to this key binding:

  {
    "key": "cmd+k",
    "command": "-workbench.action.terminal.clear",
    "when": "terminalFocus && terminalProcessSupported"
  }

Any help in helping me to actually map CMD + K to the desired functionality (clearing the integrated terminal in VS Code) would be awesome!

like image 663
Richard Jarram Avatar asked May 22 '26 03:05

Richard Jarram


1 Answers

There are two things for you to do. As reported elsewhere disable this setting (enabled is the default):

Terminal > Integrated : Allow Chords

Also, your keybinding

{
  "key": "cmd+k",
  "command": "-workbench.action.terminal.clear",
  "when": "terminalFocus && terminalProcessSupported"
}

has a - before the command. That serves to remove that keybinding and so regardless of the Allow Chords settings, that keybinding would never work. Remove the - to enable the keybinding.

like image 165
Mark Avatar answered May 23 '26 22:05

Mark



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!