Search code examples
visual-studio-codekeyboard-shortcutsvscode-keybinding

How can I restore a removed keyboard shortcut in VS Code?


I accidentally removed a whole keyboard shortcut instead of just removing the associated keys. I don't exactly remember which one I removed and I have no idea on how to bring it back. How can I bring it back?


Solution

  • Try putting it back to default settings, it should do the trick...

    Single binding to default:

    1. Go to File > Preferences > Keyboard Shortcuts
    2. Look for three vertical dots in the upper right corner
    3. Select "Show User Keybindings"
    4. Right click on key you want to and select "Reset keybinding"

    All bindings to default:

    1. Press Ctrl + Shift + P
    2. Type "Open Keyboard Shortcuts (JSON)" and open it
    3. Remove everything from keybindings.json and type empty [ ] into it.
    4. Click save and reopen VSCode