VS Code Keyboard Shortcuts
Visual Studio Code keyboard shortcut reference covering 160 bindings for Windows, Mac & Linux. Commonly searched bindings include Open Command Palette, Quick Open, and Toggle Comment. 160 of 160 shortcuts are verified against official Visual Studio Code documentation, each with a linked source when available. Search by action name, filter by category, look up what a key combination does, print a cheat sheet, or practice with flashcards.
Official Visual Studio Code documentation
Debug
| Action | Description | Windows | Mac | Verified | Source |
|---|---|---|---|---|---|
| Debug | Show Run and Debug panel | Ctrl+Shift+D |
Cmd+Shift+D |
Yes | Source |
| Start Debugging | Start or continue debugging | F5 |
F5 |
Yes | Source |
| Toggle Breakpoint | Add or remove breakpoint | F9 |
F9 |
Yes | Source |
| Step Over | Step over during debug | F10 |
F10 |
Yes | Source |
| Step Into | Step into during debug | F11 |
F11 |
Yes | Source |
| Step Out | Step out during debug | Shift+F11 |
Shift+F11 |
Yes | Source |
| Run Without Debug | Run without debugging | Ctrl+F5 |
Cmd+F5 |
Yes | Source |
| Next Error | Go to next error | F8 |
F8 |
Yes | Source |
| Previous Error | Go to previous error | Shift+F8 |
Shift+F8 |
Yes | Source |
| Problems Panel | Show Problems panel | Ctrl+Shift+M |
Cmd+Shift+M |
Yes | Source |
| Run Build Task | Run default build task | Ctrl+Shift+B |
Cmd+Shift+B |
Yes | Source |
| Pause Debugging | Pause running debug session | F6 |
F6 |
Yes | Source |
Editing
| Action | Description | Windows | Mac | Verified | Source |
|---|---|---|---|---|---|
| Toggle Comment | Comment or uncomment line | Ctrl+/ |
Cmd+/ |
Yes | Source |
| Multi-cursor | Add cursor at click position | Alt+Click |
Option+Click |
Yes | Source |
| Rename Symbol | Rename symbol across project | F2 |
F2 |
Yes | Source |
| Move Line Up | Move line up | Alt+Up |
Option+Up |
Yes | Source |
| Move Line Down | Move line down | Alt+Down |
Option+Down |
Yes | Source |
| Copy Line Up | Duplicate line above | Shift+Alt+Up |
Shift+Option+Up |
Yes | Source |
| Copy Line Down | Duplicate line below | Shift+Alt+Down |
Shift+Option+Down |
Yes | Source |
| Delete Line | Delete current line | Ctrl+Shift+K |
Cmd+Shift+K |
Yes | Source |
| Insert Line Below | Insert line below cursor | Ctrl+Enter |
Cmd+Enter |
Yes | Source |
| Insert Line Above | Insert line above cursor | Ctrl+Shift+Enter |
Cmd+Shift+Enter |
Yes | Source |
| Indent Line | Indent line or selection | Ctrl+] |
Cmd+] |
Yes | Source |
| Outdent Line | Outdent line or selection | Ctrl+[ |
Cmd+[ |
Yes | Source |
| Trigger Suggestion | Show IntelliSense | Ctrl+Space |
Cmd+Space |
Yes | Source |
| Parameter Hints | Show parameter info | Ctrl+Shift+Space |
Cmd+Shift+Space |
Yes | Source |
| Accept Suggestion | Accept IntelliSense suggestion | Tab |
Tab |
Yes | Source |
| Close Suggestion | Dismiss suggestion widget | Escape |
Escape |
Yes | Source |
| Undo | Undo last edit | Ctrl+Z |
Cmd+Z |
Yes | Source |
| Redo | Redo last edit | Ctrl+Y |
Cmd+Y |
Yes | Source |
| Cut | Cut selection | Ctrl+X |
Cmd+X |
Yes | Source |
| Copy | Copy selection | Ctrl+C |
Cmd+C |
Yes | Source |
| Paste | Paste from clipboard | Ctrl+V |
Cmd+V |
Yes | Source |
| Block Comment | Toggle block comment | Shift+Alt+A |
Shift+Option+A |
Yes | Source |
| Add Line Comment | Add line comment without toggling | Ctrl+K+Ctrl+C |
Ctrl+K+Ctrl+C |
Yes | Source |
| Remove Line Comment | Remove line comment without toggling | Ctrl+K+Ctrl+U |
Ctrl+K+Ctrl+U |
Yes | Source |
| Toggle Tab Focus Mode | Toggle Tab key focus vs indentation | Ctrl+M |
Cmd+M |
Yes | Source |
| Quick Fix | Show code actions and quick fixes | Ctrl+. |
Cmd+. |
Yes | Source |
| Replace with Next Value | Cycle selection through suggested values | Ctrl+Shift+. |
Cmd+Shift+. |
Yes | Source |
| Replace with Previous Value | Cycle selection to previous suggested value | Ctrl+Shift+, |
Cmd+Shift+, |
Yes | Source |
| Join Lines | Join selected lines into one | Ctrl+J |
Cmd+J |
Yes | Source |
File
| Action | Description | Windows | Mac | Verified | Source |
|---|---|---|---|---|---|
| Explorer | Show Explorer panel | Ctrl+Shift+E |
Cmd+Shift+E |
Yes | Source |
| New File | Create new file | Ctrl+N |
Cmd+N |
Yes | Source |
| Open File | Open file dialog | Ctrl+O |
Cmd+O |
Yes | Source |
| Save | Save current file | Ctrl+S |
Cmd+S |
Yes | Source |
| Save All | Save all open files | Ctrl+K+S |
Ctrl+K+S |
Yes | Source |
| Open Folder | Open a folder as workspace | Ctrl+K+Ctrl+O |
Ctrl+K+Ctrl+O |
Yes | Source |
| Open Recent | Open recently used folders or workspaces | Ctrl+R |
Cmd+R |
Yes | Source |
| Save As | Save active file with a new name | Ctrl+Shift+S |
Cmd+Shift+S |
Yes | Source |
| Close Folder | Close the current folder workspace | Ctrl+K+F |
Ctrl+K+F |
Yes | Source |
| Copy Path | Copy absolute path of active file | Ctrl+K+P |
Ctrl+K+P |
Yes | Source |
| Reveal in Explorer | Reveal active file in system file explorer | Ctrl+K+R |
Ctrl+K+R |
Yes | Source |
| Compare with Saved | Diff active file against saved version | Ctrl+K+D |
Ctrl+K+D |
Yes | Source |
| Change Language Mode | Change language mode of active file | Ctrl+K+M |
Ctrl+K+M |
Yes | Source |
Formatting
| Action | Description | Windows | Mac | Verified | Source |
|---|---|---|---|---|---|
| Format Document | Format entire document | Shift+Alt+F |
Shift+Option+F |
Yes | Source |
| Format Selection | Format selected code | Ctrl+K+Ctrl+F |
Ctrl+K+Ctrl+F |
Yes | Source |
| Trim Trailing Whitespace | Remove trailing whitespace in file | Ctrl+K+Ctrl+X |
Ctrl+K+Ctrl+X |
Yes | Source |
General
| Action | Description | Windows | Mac | Verified | Source |
|---|---|---|---|---|---|
| Open Command Palette | Access all VS Code commands | Ctrl+Shift+P |
Cmd+Shift+P |
Yes | Source |
| Extensions | Show Extensions panel | Ctrl+Shift+X |
Cmd+Shift+X |
Yes | Source |
| Keyboard Shortcuts | Open keyboard shortcuts editor | Ctrl+K+Ctrl+S |
Ctrl+K+Ctrl+S |
Yes | Source |
| Show All Commands | Show all available commands | Ctrl+Shift+P |
Cmd+Shift+P |
Yes | Source |
| Open Settings | Open Settings editor | Ctrl+, |
Cmd+, |
Yes | Source |
Git
| Action | Description | Windows | Mac | Verified | Source |
|---|---|---|---|---|---|
| Source Control | Show Git panel | Ctrl+Shift+G |
Cmd+Shift+G |
Yes | Source |
Navigation
| Action | Description | Windows | Mac | Verified | Source |
|---|---|---|---|---|---|
| Quick Open | Open any file by name | Ctrl+P |
Cmd+P |
Yes | Source |
| Open Editors | Quick switch between editors | Ctrl+Tab |
Cmd+Tab |
Yes | Source |
| Focus Editor Group 1 | Focus first editor group | Ctrl+1 |
Cmd+1 |
Yes | Source |
| Focus Editor Group 2 | Focus second editor group | Ctrl+2 |
Cmd+2 |
Yes | Source |
| Focus Editor Group 3 | Focus third editor group | Ctrl+3 |
Cmd+3 |
Yes | Source |
| Go to Line | Jump to specific line number | Ctrl+G |
Cmd+G |
Yes | Source |
| Go to Symbol | Navigate to symbol in file | Ctrl+Shift+O |
Cmd+Shift+O |
Yes | Source |
| Go to Definition | Jump to symbol definition | F12 |
F12 |
Yes | Source |
| Peek Definition | Peek definition inline | Alt+F12 |
Option+F12 |
Yes | Source |
| Find All References | Show all references | Shift+F12 |
Shift+F12 |
Yes | Source |
| Jump to Bracket | Jump to matching bracket | Ctrl+Shift+\ |
Cmd+Shift+\ |
Yes | Source |
| Go to Beginning | Go to beginning of file | Ctrl+Home |
Cmd+Home |
Yes | Source |
| Go to End | Go to end of file | Ctrl+End |
Cmd+End |
Yes | Source |
| Go Back | Navigate editor history back | Alt+Left |
Option+Left |
Yes | Source |
| Go Forward | Navigate editor history forward | Alt+Right |
Option+Right |
Yes | Source |
| Show Hover | Show documentation hover at cursor | Ctrl+K+Ctrl+I |
Ctrl+K+Ctrl+I |
Yes | Source |
| Open Definition to Side | Open symbol definition in side editor | Ctrl+K+F12 |
Ctrl+K+F12 |
Yes | Source |
| Show All Symbols | Search symbols across workspace | Ctrl+T |
Cmd+T |
Yes | Source |
| Focus Breadcrumbs | Move focus to breadcrumb navigation bar | Ctrl+Shift+; |
Cmd+Shift+; |
Yes | Source |
| Focus and Select Breadcrumbs | Focus breadcrumbs and open picker | Ctrl+Shift+. |
Cmd+Shift+. |
Yes | Source |
| Focus Left Editor Group | Focus editor group to the left | Ctrl+K+Ctrl+Left |
Ctrl+K+Ctrl+Left |
Yes | Source |
| Focus Right Editor Group | Focus editor group to the right | Ctrl+K+Ctrl+Right |
Ctrl+K+Ctrl+Right |
Yes | Source |
| Next Editor | Open next editor tab | Ctrl+PageDown |
Cmd+PageDown |
Yes | Source |
| Previous Editor | Open previous editor tab | Ctrl+PageUp |
Cmd+PageUp |
Yes | Source |
| Quick Open View | Quick open any view or panel | Ctrl+Q |
Cmd+Q |
Yes | Source |
| Go to Beginning of Line | Move cursor to start of line | Home |
Home |
Yes | Source |
| Go to End of Line | Move cursor to end of line | End |
End |
Yes | Source |
Search
| Action | Description | Windows | Mac | Verified | Source |
|---|---|---|---|---|---|
| Search | Show Search panel | Ctrl+Shift+F |
Cmd+Shift+F |
Yes | Source |
| Find | Find in current file | Ctrl+F |
Cmd+F |
Yes | Source |
| Replace | Find and replace in file | Ctrl+H |
Cmd+H |
Yes | Source |
| Find in Selection | Find within selection | Ctrl+Shift+L |
Cmd+Shift+L |
Yes | Source |
| Find Next | Go to next find match in file | Enter |
Enter |
Yes | Source |
| Find Previous | Go to previous find match in file | Shift+Enter |
Shift+Enter |
Yes | Source |
| Select All Find Matches | Select all matches of find query | Alt+Enter |
Option+Enter |
Yes | Source |
| Toggle Find Case Sensitive | Toggle case sensitivity in find widget | Alt+C |
Option+C |
Yes | Source |
| Toggle Find Regex | Toggle regex mode in find widget | Alt+R |
Option+R |
Yes | Source |
| Toggle Find Whole Word | Toggle whole-word match in find widget | Alt+W |
Option+W |
Yes | Source |
| Replace in Files | Find and replace across workspace | Ctrl+Shift+H |
Cmd+Shift+H |
Yes | Source |
| Toggle Search Details | Show or hide search query details | Ctrl+Shift+J |
Cmd+Shift+J |
Yes | Source |
| Focus Next Search Result | Focus next result in search panel | F4 |
F4 |
Yes | Source |
| Focus Previous Search Result | Focus previous result in search panel | Shift+F4 |
Shift+F4 |
Yes | Source |
Selection
| Action | Description | Windows | Mac | Verified | Source |
|---|---|---|---|---|---|
| Select Next Occurrence | Select next matching word | Ctrl+D |
Cmd+D |
Yes | Source |
| Select All Occurrences | Select all matching words | Ctrl+Shift+L |
Cmd+Shift+L |
Yes | Source |
| Add Selection to Next | Add selection to next find match | Ctrl+D |
Cmd+D |
Yes | Source |
| Select All | Select all in editor | Ctrl+A |
Cmd+A |
Yes | Source |
| Expand Selection | Expand selection to next syntax node | Shift+Alt+Right |
Shift+Option+Right |
Yes | Source |
| Shrink Selection | Shrink selection to parent syntax node | Shift+Alt+Left |
Shift+Option+Left |
Yes | Source |
| Select Current Line | Select entire line at cursor | Ctrl+L |
Cmd+L |
Yes | Source |
| Add Cursor Above | Add cursor on line above | Ctrl+Alt+Up |
Cmd+Option+Up |
Yes | Source |
| Add Cursor Below | Add cursor on line below | Ctrl+Alt+Down |
Cmd+Option+Down |
Yes | Source |
| Add Cursors to Line Ends | Add cursor at end of each selected line | Shift+Alt+I |
Shift+Option+I |
Yes | Source |
| Undo Last Cursor Operation | Undo last multi-cursor change | Ctrl+U |
Cmd+U |
Yes | Source |
| Move Selection to Next Match | Move last selection to next find match | Ctrl+K+Ctrl+D |
Ctrl+K+Ctrl+D |
Yes | Source |
| Select All Occurrences of Word | Select all occurrences of current word | Ctrl+F2 |
Cmd+F2 |
Yes | Source |
Terminal
| Action | Description | Windows | Mac | Verified | Source |
|---|---|---|---|---|---|
| Toggle Terminal | Show or hide integrated terminal | Ctrl+` |
Cmd+` |
Yes | Source |
| New Terminal | Create new terminal | Ctrl+Shift+` |
Cmd+Shift+` |
Yes | Source |
| Open External Terminal | Open system command prompt | Ctrl+Shift+C |
Cmd+Shift+C |
Yes | Source |
| Split Terminal | Split the active terminal pane | Ctrl+Shift+5 |
Cmd+Shift+5 |
Yes | Source |
View
| Action | Description | Windows | Mac | Verified | Source |
|---|---|---|---|---|---|
| Toggle Sidebar | Show or hide sidebar | Ctrl+B |
Cmd+B |
Yes | Source |
| Output | Show Output panel | Ctrl+Shift+J |
Cmd+Shift+J |
Yes | Source |
| Zen Mode | Enter Zen Mode | Ctrl+K+Z |
Ctrl+K+Z |
Yes | Source |
| Scroll Line Up | Scroll view up one line | Ctrl+Up |
Cmd+Up |
Yes | Source |
| Scroll Line Down | Scroll view down one line | Ctrl+Down |
Cmd+Down |
Yes | Source |
| Fold Region | Fold code region | Ctrl+Shift+[ |
Cmd+Shift+[ |
Yes | Source |
| Unfold Region | Unfold code region | Ctrl+Shift+] |
Cmd+Shift+] |
Yes | Source |
| Fold All | Fold all regions | Ctrl+K+Ctrl+0 |
Ctrl+K+Ctrl+0 |
Yes | Source |
| Unfold All | Unfold all regions | Ctrl+K+Ctrl+J |
Ctrl+K+Ctrl+J |
Yes | Source |
| Split Editor | Split editor right | Ctrl+\ |
Cmd+\ |
Yes | Source |
| Toggle Word Wrap | Toggle word wrap | Alt+Z |
Option+Z |
Yes | Source |
| Toggle Panel | Show or hide bottom panel | Ctrl+J |
Cmd+J |
Yes | Source |
| Toggle Minimap | Show or hide minimap | Ctrl+Shift+M |
Cmd+Shift+M |
Yes | Source |
| Toggle Markdown Preview | Toggle Markdown preview for current file | Ctrl+Shift+V |
Cmd+Shift+V |
Yes | Source |
| Open Preview to Side | Open Markdown preview beside editor | Ctrl+K+V |
Ctrl+K+V |
Yes | Source |
| Toggle Fold | Toggle fold state of current region | Ctrl+K+Ctrl+L |
Ctrl+K+Ctrl+L |
Yes | Source |
| Fold Recursively | Fold region and all nested subregions | Ctrl+K+Ctrl+[ |
Ctrl+K+Ctrl+[ |
Yes | Source |
| Unfold Recursively | Unfold region and all nested subregions | Ctrl+K+Ctrl+] |
Ctrl+K+Ctrl+] |
Yes | Source |
| Move Editor Group Left | Move active editor group left | Ctrl+K+Left |
Ctrl+K+Left |
Yes | Source |
| Move Editor Group Right | Move active editor group right | Ctrl+K+Right |
Ctrl+K+Right |
Yes | Source |
| Move Editor to Next Group | Move active editor to next group | Ctrl+Alt+Right |
Cmd+Option+Right |
Yes | Source |
| Move Editor to Previous Group | Move active editor to previous group | Ctrl+Alt+Left |
Cmd+Option+Left |
Yes | Source |
| Toggle Full Screen | Toggle full screen mode | F11 |
F11 |
Yes | Source |
| Zoom In | Increase workbench zoom level | Ctrl+= |
Cmd+= |
Yes | Source |
| Zoom Out | Decrease workbench zoom level | Ctrl+- |
Cmd+- |
Yes | Source |
| Reset Zoom | Reset workbench zoom to default | Ctrl+Numpad0 |
Cmd+Numpad0 |
Yes | Source |
| Leave Zen Mode | Exit Zen Mode with double Escape | Escape+Escape |
Escape+Escape |
Yes | Source |
| Select Color Theme | Open color theme picker | Ctrl+K+Ctrl+T |
Ctrl+K+Ctrl+T |
Yes | Source |
| Scroll Page Down | Scroll editor down one page | Alt+PageDown |
Option+PageDown |
Yes | Source |
| Scroll Page Up | Scroll editor up one page | Alt+PageUp |
Option+PageUp |
Yes | Source |
Window
| Action | Description | Windows | Mac | Verified | Source |
|---|---|---|---|---|---|
| Close Editor | Close active editor tab | Ctrl+W |
Cmd+W |
Yes | Source |
| Close Window | Close VS Code window | Ctrl+Shift+W |
Cmd+Shift+W |
Yes | Source |
| Close All Editors | Close all editor tabs | Ctrl+K+Ctrl+W |
Ctrl+K+Ctrl+W |
Yes | Source |
| Reopen Closed Editor | Reopen the last closed editor tab | Ctrl+Shift+T |
Cmd+Shift+T |
Yes | Source |
| Keep Editor Open | Pin editor tab to prevent auto-close | Ctrl+K+Enter |
Ctrl+K+Enter |
Yes | Source |
| Close Editors in Group | Close all editors in active group | Ctrl+K+W |
Ctrl+K+W |
Yes | Source |
| New Window | Open a new VS Code window | Ctrl+Shift+N |
Cmd+Shift+N |
Yes | Source |
| Move Editor Left | Move tab left within editor group | Ctrl+Shift+PageUp |
Cmd+Shift+PageUp |
Yes | Source |
| Move Editor Right | Move tab right within editor group | Ctrl+Shift+PageDown |
Cmd+Shift+PageDown |
Yes | Source |