Default keyboard shortcuts reference
VS Code comes with a set of default keyboard shortcuts. This article lists common default keyboard shortcuts in VS Code.
For a full list of keyboard shortcuts, use either of these options within VS Code:
- Select Preferences: Open Default Keyboard Shortcuts (JSON) in the Command Palette.
- Open the Keyboard Shortcuts editor, and then select Show System Keybindings in the More Actions (...) menu.
Note
The following keys are rendered assuming a standard US keyboard layout. Get more information about using a different keyboard layout.
Basic Editing
| Command | Key | Command id |
|---|---|---|
| Cut line (empty selection) | ⌘X (Windows, Linux Ctrl+X) | editor.action.clipboardCutAction |
| Copy line (empty selection) | ⌘C (Windows, Linux Ctrl+C) | editor.action.clipboardCopyAction |
| Paste | ⌘V (Windows, Linux Ctrl+V) | editor.action.clipboardPasteAction |
| Delete Line | ⇧⌘K (Windows, Linux Ctrl+Shift+K) | editor.action.deleteLines |
| Insert Line Below | ⌘Enter (Windows, Linux Ctrl+Enter) | editor.action.insertLineAfter |
| Insert Line Above | ⇧⌘Enter (Windows, Linux Ctrl+Shift+Enter) | editor.action.insertLineBefore |
| Move Line Down | ⌥↓ (Windows, Linux Alt+Down) | editor.action.moveLinesDownAction |
| Move Line Up | ⌥↑ (Windows, Linux Alt+Up) | editor.action.moveLinesUpAction |
| Copy Line Down | ⇧⌥↓ (Windows Shift+Alt+Down, Linux Ctrl+Shift+Alt+Down) | editor.action.copyLinesDownAction |
| Copy Line Up | ⇧⌥↑ (Windows Shift+Alt+Up, Linux Ctrl+Shift+Alt+Up) | editor.action.copyLinesUpAction |
| Undo | ⌘Z (Windows, Linux Ctrl+Z) | undo |
| Redo | ⇧⌘Z (Windows, Linux Ctrl+Y) |