Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove a keyboard shortcut from VS Code

I was able to overwrite any keyboard shortcut from VS Code just by adding a new key in the keybindings.json file.

However I can't remove an existing shortcut. More specifically, I'd like to remove this one:

{ "key": "ctrl+alt+down",            "command": "editor.action.insertCursorBelow",   "when": "editorTextFocus" } 

Any ideas on how I can remove it?

like image 433
André Luiz Carletti Avatar asked Apr 03 '17 11:04

André Luiz Carletti


People also ask

How do I get rid of Ctrl Z code in Visual Studio?

At the bottom left corner of the vscode you have a "timeline", you can undo, and see all saved logs.


2 Answers

This is covered in our documentation for keybindings. Just add a - before the command name.

For your example, try adding:

{ "key": "ctrl+alt+down", "command": "-editor.action.insertCursorBelow" } 

to your keybindings.json

like image 75
Matt Bierner Avatar answered Sep 23 '22 19:09

Matt Bierner


  1. Goto Code > Preferences > Keyboard Shortcuts
  2. The above should open what screenshot shows (list of all keyboard bindings)
  3. Right click on the keyboard binding you like to delete
  4. Select Remove Keybinding

This should delete the Keybinding.

Remove Keybinding from vscode

In fact, under the hood this also edits your keybindings.json. To see the effect, after opening Keyboard Shortcuts, click on the icon having the mouseover text Open Keyboard Shortcuts (JSON):

Open keybindings.json

If you need more help, try:
https://code.visualstudio.com/docs/getstarted/keybindings#_advanced-customization

like image 22
Vikram Belde Avatar answered Sep 20 '22 19:09

Vikram Belde