Visual Studio Code keyboard shortcuts
Visual Studio Code is the most widely used code editor in the world, powering everything from web development to data science. Its command-driven design means nearly every feature is reachable from the keyboard. Learning its core shortcuts turns minutes of mousing through menus into split-second keystrokes. This cheat sheet covers 81 default shortcuts for Windows and Mac.
General
| Open Command Palette | Ctrl+Shift+PCmd+Shift+P |
| Quick Open file | Ctrl+PCmd+P |
| New window | Ctrl+Shift+NCmd+Shift+N |
| Close window | Ctrl+Shift+WCmd+Shift+W |
| Open Settings | Ctrl+,Cmd+, |
| Open Keyboard Shortcuts editor | Ctrl+K Ctrl+SCmd+K Cmd+S |
Basic Editing
| Cut line (empty selection) | Ctrl+XCmd+X |
| Copy line (empty selection) | Ctrl+CCmd+C |
| Move line up/down | Alt+Up/DownOption+Up/Down |
| Copy line up/down | Shift+Alt+Up/DownShift+Option+Up/Down |
| Delete line | Ctrl+Shift+KCmd+Shift+K |
| Insert line below | Ctrl+EnterCmd+Enter |
| Insert line above | Ctrl+Shift+EnterCmd+Shift+Enter |
| Indent line | Ctrl+]Cmd+] |
| Outdent line | Ctrl+[Cmd+[ |
| Toggle line comment | Ctrl+/Cmd+/ |
| Toggle block comment | Shift+Alt+AShift+Option+A |
| Jump to matching bracket | Ctrl+Shift+\Cmd+Shift+\ |
| Undo | Ctrl+ZCmd+Z |
| Redo | Ctrl+YCmd+Shift+Z |
Multi-Cursor & Selection
| Insert cursor at click position | Alt+ClickOption+Click |
| Add cursor above/below | Ctrl+Alt+Up/DownCmd+Option+Up/Down |
| Select next occurrence of selection | Ctrl+DCmd+D |
| Select all occurrences of selection | Ctrl+Shift+LCmd+Shift+L |
| Undo last cursor operation | Ctrl+UCmd+U |
| Insert cursor at end of each selected line | Shift+Alt+IShift+Option+I |
| Select current line | Ctrl+LCmd+L |
| Expand selection | Shift+Alt+RightCtrl+Shift+Cmd+Right |
| Shrink selection | Shift+Alt+LeftCtrl+Shift+Cmd+Left |
| Column (box) selection with mouse | Shift+Alt+DragShift+Option+Drag |
Search & Replace
| Find | Ctrl+FCmd+F |
| Replace | Ctrl+HCmd+Option+F |
| Find next | F3Cmd+G |
| Find previous | Shift+F3Cmd+Shift+G |
| Select all matches of find term | Alt+EnterOption+Enter |
| Search across all files | Ctrl+Shift+FCmd+Shift+F |
| Replace across all files | Ctrl+Shift+HCmd+Shift+H |
Code Navigation
| Go to line | Ctrl+GCtrl+G |
| Go to symbol in workspace | Ctrl+TCmd+T |
| Go to symbol in file | Ctrl+Shift+OCmd+Shift+O |
| Go to definition | F12F12 |
| Peek definition | Alt+F12Option+F12 |
| Find all references | Shift+F12Shift+F12 |
| Navigate back | Alt+LeftCtrl+- |
| Navigate forward | Alt+RightCtrl+Shift+- |
| Go to next problem (error/warning) | F8F8 |
| Cycle through open editors | Ctrl+TabCtrl+Tab |
Refactoring & IntelliSense
| Rename symbol | F2F2 |
| Quick Fix | Ctrl+.Cmd+. |
| Format document | Shift+Alt+FShift+Option+F |
| Format selection | Ctrl+K Ctrl+FCmd+K Cmd+F |
| Trigger suggestion | Ctrl+SpaceCtrl+Space |
| Trigger parameter hints | Ctrl+Shift+SpaceCmd+Shift+Space |
| Trim trailing whitespace | Ctrl+K Ctrl+XCmd+K Cmd+X |
Editor & File Management
| New file | Ctrl+NCmd+N |
| Save file | Ctrl+SCmd+S |
| Save As | Ctrl+Shift+SCmd+Shift+S |
| Save all files | Ctrl+K SCmd+Option+S |
| Close editor | Ctrl+WCmd+W |
| Reopen closed editor | Ctrl+Shift+TCmd+Shift+T |
| Split editor | Ctrl+\Cmd+\ |
| Focus editor group 1/2/3 | Ctrl+1/2/3Cmd+1/2/3 |
Display & Panels
| Toggle full screen | F11Ctrl+Cmd+F |
| Toggle sidebar visibility | Ctrl+BCmd+B |
| Show Explorer | Ctrl+Shift+ECmd+Shift+E |
| Show Source Control | Ctrl+Shift+GCtrl+Shift+G |
| Show Run and Debug | Ctrl+Shift+DCmd+Shift+D |
| Show Extensions | Ctrl+Shift+XCmd+Shift+X |
| Show Problems panel | Ctrl+Shift+MCmd+Shift+M |
| Zoom in | Ctrl+=Cmd+= |
| Zoom out | Ctrl+-Cmd+- |
| Toggle Zen Mode | Ctrl+K ZCmd+K Z |
Integrated Terminal
| Toggle integrated terminal | Ctrl+`Ctrl+` |
| Create new terminal | Ctrl+Shift+`Ctrl+Shift+` |
Debugging
| Start / continue debugging | F5F5 |
| Run without debugging | Ctrl+F5Ctrl+F5 |
| Stop debugging | Shift+F5Shift+F5 |
| Toggle breakpoint | F9F9 |
| Step over | F10F10 |
| Step into | F11F11 |
| Step out | Shift+F11Shift+F11 |
Put your top Visual Studio Code shortcuts on real keys
The five Visual Studio Code actions most worth binding to a physical macropad key:
Ctrl+Shift+PCmd+Shift+P Open Command Palette The gateway to every VS Code command; the single most pressed chord in the editor.
Ctrl+`Ctrl+` Toggle integrated terminal Developers bounce between code and terminal dozens of times an hour.
Shift+Alt+FShift+Option+F Format document One physical key to clean up a whole file before every commit.
F12F12 Go to definition Core code-reading move; a dedicated key makes jumping through a codebase effortless.
Ctrl+Shift+FCmd+Shift+F Search across all files Project-wide search is the start of almost every investigation.
I hand-build small-batch programmable macropads (QMK/VIA) in Barcelona. One press, any shortcut, any app.
Visual Studio Code shortcut FAQs
How do I see all keyboard shortcuts in Visual Studio Code?
Open the Keyboard Shortcuts editor with Ctrl+K Ctrl+S on Windows or Cmd+K Cmd+S on Mac. It lists every command, its current binding, and lets you search and rebind anything.
What is the most important shortcut in VS Code?
The Command Palette (Ctrl+Shift+P on Windows, Cmd+Shift+P on Mac). It gives keyboard access to every command in the editor, so you can run anything without memorizing its dedicated shortcut.
How do I use multiple cursors in VS Code?
Hold Alt (Option on Mac) and click to place extra cursors, or press Ctrl+D (Cmd+D) repeatedly to select the next occurrence of the current word and edit them all at once.
Can I change keyboard shortcuts in VS Code?
Yes. Every binding is customizable in the Keyboard Shortcuts editor, and you can install keymap extensions that replicate Sublime Text, IntelliJ, Vim, and other editors.
How do I open the terminal in VS Code?
Press Ctrl+` (backtick) on both Windows and Mac to toggle the integrated terminal. Ctrl+Shift+` creates a new terminal instance.