Visual Studio Code keyboard shortcuts
Microsoft · 80 shortcuts80 Visual Studio Code shortcuts grouped by task, with Windows and Mac keys side by side. Click any row for the full answer page.
Essentials
| Action | Windows | Mac |
|---|---|---|
| Show Command Palette | Ctrl+Shift+PCtrlShiftP | Cmd+Shift+P⌘⇧P |
| Quick Open, Go to File | Ctrl+PCtrlP | Cmd+P⌘P |
| New window/instance | Ctrl+Shift+NCtrlShiftN | Cmd+Shift+N⌘⇧N |
| Close window/instance | Ctrl+Shift+WCtrlShiftW | Cmd+W⌘W |
| User Settings | Ctrl+,Ctrl, | Cmd+,⌘, |
| Open Keyboard Shortcuts editor | Ctrl+K then Ctrl+SCtrlKthenCtrlS | Cmd+K then Cmd+S⌘Kthen⌘S |
| New File | Ctrl+NCtrlN | Cmd+N⌘N |
| Open File | Ctrl+OCtrlO | Cmd+O⌘O |
| Save | Ctrl+SCtrlS | Cmd+S⌘S |
| Save As | Ctrl+Shift+SCtrlShiftS | Cmd+Shift+S⌘⇧S |
| Save All | Ctrl+K then SCtrlKthenS | Cmd+Option+S⌘⌥S |
| Close file | Ctrl+F4CtrlF4 | Cmd+W⌘W |
| Reopen closed editor | Ctrl+Shift+TCtrlShiftT | Cmd+Shift+T⌘⇧T |
Navigation
| Action | Windows | Mac |
|---|---|---|
| Show all Symbols | Ctrl+TCtrlT | Cmd+T⌘T |
| Go to Line | Ctrl+GCtrlG | Ctrl+G⌃G |
| Go to Symbol | Ctrl+Shift+OCtrlShiftO | Cmd+Shift+O⌘⇧O |
| Show Problems panel | Ctrl+Shift+MCtrlShiftM | Cmd+Shift+M⌘⇧M |
| Navigate editor group history | Ctrl+Shift+TabCtrlShift⇥ | Ctrl+Shift+Tab⌃⇧⇥ |
| Go back | Alt+LeftAlt← | Ctrl+-⌃- |
| Go forward | Alt+RightAlt→ | Ctrl+Shift+-⌃⇧- |
Editing
| Action | Windows | Mac |
|---|---|---|
| Cut line (empty selection) | Ctrl+XCtrlX | Cmd+X⌘X |
| Copy line (empty selection) | Ctrl+CCtrlC | Cmd+C⌘C |
| Move line up | Alt+UpAlt↑ | Option+Up⌥↑ |
| Move line down | Alt+DownAlt↓ | Option+Down⌥↓ |
| Copy line up | Shift+Alt+UpShiftAlt↑ | Shift+Option+Up⇧⌥↑ |
| Copy line down | Shift+Alt+DownShiftAlt↓ | Shift+Option+Down⇧⌥↓ |
| Delete line | Ctrl+Shift+KCtrlShiftK | Cmd+Shift+K⌘⇧K |
| Insert line below | Ctrl+EnterCtrl↵ | Cmd+Enter⌘↵ |
| Insert line above | Ctrl+Shift+EnterCtrlShift↵ | Cmd+Shift+Enter⌘⇧↵ |
| Jump to matching bracket | Ctrl+Shift+\CtrlShift\ | Cmd+Shift+\⌘⇧\ |
| Indent line | Ctrl+]Ctrl] | Cmd+]⌘] |
| Outdent line | Ctrl+[Ctrl[ | Cmd+[⌘[ |
| Go to beginning of file | Ctrl+HomeCtrlHome | Cmd+Up⌘↑ |
| Go to end of file | Ctrl+EndCtrlEnd | Cmd+Down⌘↓ |
| Toggle line comment | Ctrl+/Ctrl/ | Cmd+/⌘/ |
| Toggle block comment | Shift+Alt+AShiftAltA | Shift+Option+A⇧⌥A |
| Trigger suggestion | Ctrl+SpaceCtrlSpace | Ctrl+Space⌃Space |
| Trigger parameter hints | Ctrl+Shift+SpaceCtrlShiftSpace | Cmd+Shift+Space⌘⇧Space |
| Format document | Shift+Alt+FShiftAltF | Shift+Option+F⇧⌥F |
| Format selection | Ctrl+K then Ctrl+FCtrlKthenCtrlF | Cmd+K then Cmd+F⌘Kthen⌘F |
| Go to Definition | F12F12 | F12F12 |
| Peek Definition | Alt+F12AltF12 | Option+F12⌥F12 |
| Open Definition to the side | Ctrl+K then F12CtrlKthenF12 | Cmd+K then F12⌘KthenF12 |
| Quick Fix | Ctrl+.Ctrl. | Cmd+.⌘. |
| Show References | Shift+F12ShiftF12 | Shift+F12⇧F12 |
| Rename Symbol | F2F2 | F2F2 |
Multi-cursor
| Action | Windows | Mac |
|---|---|---|
| Insert cursor | Alt+ClickAltClick | Option+Click⌥Click |
| Insert cursor above | Ctrl+Alt+UpCtrlAlt↑ | Cmd+Option+Up⌘⌥↑ |
| Insert cursor below | Ctrl+Alt+DownCtrlAlt↓ | Cmd+Option+Down⌘⌥↓ |
| Undo last cursor operation | Ctrl+UCtrlU | Cmd+U⌘U |
| Select current line | Ctrl+LCtrlL | Cmd+L⌘L |
| Select all occurrences of current selection | Ctrl+Shift+LCtrlShiftL | Cmd+Shift+L⌘⇧L |
| Select all occurrences of current word | Ctrl+F2CtrlF2 | Cmd+F2⌘F2 |
| Expand selection | Shift+Alt+RightShiftAlt→ | Ctrl+Shift+Cmd+Right⌃⇧⌘→ |
| Shrink selection | Shift+Alt+LeftShiftAlt← | Ctrl+Shift+Cmd+Left⌃⇧⌘← |
Search & replace
| Action | Windows | Mac |
|---|---|---|
| Find | Ctrl+FCtrlF | Cmd+F⌘F |
| Replace | Ctrl+HCtrlH | Cmd+Option+F⌘⌥F |
| Find next | F3F3 | Cmd+G⌘G |
| Find previous | Shift+F3ShiftF3 | Cmd+Shift+G⌘⇧G |
| Select all occurrences of Find match | Alt+EnterAlt↵ | Option+Enter⌥↵ |
| Add selection to next Find match | Ctrl+DCtrlD | Cmd+D⌘D |
Panels & views
| Action | Windows | Mac |
|---|---|---|
| Close editor | Ctrl+WCtrlW | Cmd+W⌘W |
| Split editor | Ctrl+\Ctrl\ | Cmd+\⌘\ |
| Toggle full screen | F11F11 | Ctrl+Cmd+F⌃⌘F |
| Zoom in | Ctrl+=Ctrl= | Cmd+=⌘= |
| Zoom out | Ctrl+-Ctrl- | Shift+Cmd+-⇧⌘- |
| Toggle Sidebar visibility | Ctrl+BCtrlB | Cmd+B⌘B |
| Show Explorer | Ctrl+Shift+ECtrlShiftE | Shift+Cmd+E⇧⌘E |
| Show Search | Ctrl+Shift+FCtrlShiftF | Shift+Cmd+F⇧⌘F |
| Show Source Control | Ctrl+Shift+GCtrlShiftG | Ctrl+Shift+G⌃⇧G |
| Show Debug | Ctrl+Shift+DCtrlShiftD | Shift+Cmd+D⇧⌘D |
| Show Extensions | Ctrl+Shift+XCtrlShiftX | Shift+Cmd+X⇧⌘X |
| Show Output panel | Ctrl+Shift+UCtrlShiftU | Shift+Cmd+U⇧⌘U |
| Open Markdown preview | Ctrl+Shift+VCtrlShiftV | Shift+Cmd+V⇧⌘V |
Debugging
| Action | Windows | Mac |
|---|---|---|
| Toggle breakpoint | F9F9 | F9F9 |
| Start/Continue | F5F5 | F5F5 |
| Stop | Shift+F5ShiftF5 | Shift+F5⇧F5 |
| Step into | F11F11 | F11F11 |
| Step out | Shift+F11ShiftF11 | Shift+F11⇧F11 |
| Step over | F10F10 | F10F10 |
Ask your agent
Prompt
Make me a one-page Visual Studio Code cheat sheet from the 80 shortcuts at https://keyflowhub.com/shortcuts/vscode, ordered by what I'm most likely to use, and point out any that clash with my current keybindings.
Paste into Claude Code and it will do the rest.
Questions
Windows: Ctrl + U. Mac: Cmd + U.
Windows: Ctrl + S. Mac: Cmd + S.
Windows: Ctrl + F. Mac: Cmd + F.
Sources: code.visualstudio.com, code.visualstudio.com, code.visualstudio.com, code.visualstudio.com