Keyboard shortcuts for Visual Studio Code
Visual Studio Code lets you perform most tasks directly from the keyboard. This article explains how you can modify the default keyboard shortcuts that come with VS Code.
If you visit this page on a Mac, you will see the keyboard shortcuts for the Mac. If you visit using Windows or Linux, you will see the keys for that platform. If you need the keyboard shortcuts for another platform, hover your mouse over the key you are interested in.
Keyboard Shortcuts editor
VS Code provides a rich keyboard shortcut editing experience with the Keyboard Shortcuts editor. The editor lists all available commands with and without keyboard shortcuts, and enables you to change, remove, or reset their keyboard shortcuts using the available actions. To find commands or keyboard shortcuts, use the search box and enter a command or shortcut to filter the list.
To open the Keyboard Shortcuts editor, select the File > Preferences > Keyboard Shortcuts menu, or use the Preferences: Open Keyboard Shortcuts command (⌘K ⌘S (Windows, Linux Ctrl+K Ctrl+S)) in the Command Palette. The Keyboard Shortcuts editor opens by default in a modal overlay on top of the editor area.

The keyboard shortcuts match your current keyboard layout. For example, keyboard shortcut Cmd+\ in US keyboard layout will be shown as Ctrl+Shift+Alt+Cmd+7 when the layout is changed to German. The dialog to change a keyboard shortcut assigns the correct and desired keyboard shortcut according to your keyboard layout.
Customize shortcuts for UI actions
To customize a keyboard shortcut for a UI action, right-click on any action item in your workbench, and select Configure Keybinding. This opens the Keyboard Shortcuts editor, filtered to the corresponding command. If the action has a when clause, it's automatically included, making it easier to set up your keyboard shortcuts just the way you need them.
Keymap extensions
Keymap extensions modify the VS Code shortcuts to match those of other editors, so you don't need to learn new keyboard shortcuts.
Select the File > Preferences > Migrate Keyboard Shortcuts from... menu to get a list of popular keymap extensions. There is also a Keymaps category of extensions in the Marketplace.
Keyboard Shortcuts reference
We have a printable version of the default keyboard shortcuts. Select Help > Keyboard Shortcut Reference to display a condensed PDF version suitable for printing as an easy reference.
The following links provide access to the three platform-specific versions (US English keyboard):
Detecting keyboard shortcut conflicts
If you have many extensions installed or you have modified your keyboard shortcuts, there might be keyboard shortcut conflicts, where the same keyboard shortcut is mapped to multiple commands. This can result in confusing behavior, especially if different keyboard shortcuts are going in and out of scope as you move around the editor.
Right-click on an item in the list of keyboard shortcuts, and select Show Same Keybindings to view all entries with the same keyboard shortcut.

Troubleshooting keyboard shortcuts
To troubleshoot keyboard shortcut problems, you can execute the command Developer: Toggle Keyboard Shortcuts Troubleshooting. This activates logging of dispatched keyboard shortcuts and opens the Output panel with the corresponding log file.
You can then press your desired keyboard shortcut and check what keyboard shortcut VS Code detects and what command is invoked.
For example, when pressing cmd+/ in a code editor on macOS, the logging output would be:
[KeybindingService]: / Received keydown event - modifiers: [meta], code: MetaLeft, keyCode: 91, key: Meta
[KeybindingService]: | Converted keydown event - modifiers: [meta], code: MetaLeft, keyCode: 57 ('Meta')
[KeybindingService]: \ Keyboard event cannot be dispatched.
[KeybindingService]: / Received keydown event - modifiers: [meta], code: Slash, keyCode: 191, key: /
[KeybindingService]: | Converted keydown event - modifiers: [meta], code: Slash, keyCode: 85 ('/')
[KeybindingService]: | Resolving meta+[Slash]
[KeybindingService]: \ From 2 keybinding entries, matched editor.action.commentLine, when: editorTextFocus && !editorReadonly, source: built-in.
In the example log, the first keydown event is for the MetaLeft key (cmd) and cannot be dispatched. The second keydown event is for the Slash key (/) and is dispatched as meta+[Slash]. There were two keyboard shortcut entries mapped from meta+[Slash] and the one that matched was for the command editor.action.commentLine, which has the when condition editorTextFocus && !editorReadonly and is a built-in keyboard shortcut entry.
Viewing modified keyboard shortcuts
To filter the list to only show the shortcuts you have modified, select the Show User Keybindings command in the