How can I change keyboard shortcut bindings in Visual Studio Code?

Click File -> Preferences -> Keyboard shortcuts. Use the tab that opens up to edit and find available key bindings and assign them.
enter image description here

Historical Note: In very early versions of visual studio code, you would Click File -> Preferences -> Keyboard shortcuts and you would get JSON like this keybindings.json:

// Place your key bindings in this file to overwrite the defaults
[
    { "key": "ctrl+o",                "command": "workbench.action.files.openFile" },
    
    { "key": "ctrl+alt+k",            "command": "bookmarks.toggle",
                                     "when": "editorTextFocus" }

]

But now in 2021 versions, there is a proper GUI, which is great because the json editing method was error prone and hard to discover.

The json editor feature has been moved to a new icon:

enter image description here

Leave a Comment