Basic operations 8
| Action | Windows | Mac |
|---|---|---|
| Show Command PaletteOpens the searchable list of every command; either key works. | Ctrl+Shift+PorF1 | Shift+Cmd+PorF1 |
| Quick Open a fileType part of a file name to jump straight to that file. | Ctrl+P | Cmd+P |
| Open recent folder or workspaceLists recently opened folders and workspaces to switch between projects. | Ctrl+R | Ctrl+R |
| New windowOpens another VS Code window alongside the current one. | Ctrl+Shift+N | Shift+Cmd+N |
| Close windowCloses the whole window, not only the active editor tab. | Alt+F4 | Shift+Cmd+W |
| Open SettingsOpens the Settings editor for user and workspace preferences. | Ctrl+, | Cmd+, |
| Open Keyboard ShortcutsA two-step chord: press the first combination, release, then press the second. | Ctrl+KthenCtrl+S | Cmd+KthenCmd+S |
| Select Color ThemeShows the list of installed color themes to pick from. | Ctrl+KthenCtrl+T | Cmd+KthenCmd+T |
File management 10
| Action | Windows | Mac |
|---|---|---|
| New fileCreates an untitled file in a new editor tab. | Ctrl+N | Cmd+N |
| Open fileShows the system dialog for choosing a file to open. | Ctrl+O | Cmd+O |
| Save file | Ctrl+S | Cmd+S |
| Save asSaves the active file under a new name or location. | Ctrl+Shift+S | Shift+Cmd+S |
| Save allWrites every modified file; on Windows it is a chord, on a Mac a single combination. | Ctrl+KthenS | Option+Cmd+S |
| Close folder | Ctrl+KthenF | Cmd+KthenF |
| Copy active file pathPuts the full path of the file in the active editor on the clipboard. | Ctrl+KthenP | Cmd+KthenP |
| Reveal active file in file managerShows the file in Windows Explorer or, on a Mac, in Finder. | Ctrl+KthenR | Cmd+KthenR |
| Show file in a new windowOpens the active editor's file in a separate VS Code window. | Ctrl+KthenO | Cmd+KthenO |
| Compare file with clipboardOpens a diff between the active file and the clipboard contents. | Ctrl+KthenC | Cmd+KthenC |
Essential editing 22
On Linux the block comment toggle is Ctrl+Shift+A; the rest of this group matches the Windows column.
| Action | Windows | Mac |
|---|---|---|
| Cut lineWith nothing selected, cuts the whole line the cursor is on. | Ctrl+X | Cmd+X |
| Copy lineWith nothing selected, copies the whole current line to the clipboard. | Ctrl+C | Cmd+C |
| Paste | Ctrl+V | Cmd+V |
| Undo | Ctrl+Z | Cmd+Z |
| RedoWindows has its own key, while the Mac binding adds Shift to the undo combination. | Ctrl+Y | Shift+Cmd+Z |
| Delete lineRemoves the current line without needing a selection. | Ctrl+Shift+K | Shift+Cmd+K |
| Insert line belowStarts a new line under the current one wherever the cursor sits in the line. | Ctrl+Enter | Cmd+Return |
| Insert line aboveOpens an empty line over the current one and moves the cursor there. | Ctrl+Shift+Enter | Shift+Cmd+Return |
| Move line downShifts the current line, or the selected lines, one row lower. | Alt+Down | Option+Down |
| Move line upShifts the current line, or the selected lines, one row higher. | Alt+Up | Option+Up |
| Copy line downDuplicates the line and leaves the copy underneath the original. | Shift+Alt+Down | Shift+Option+Down |
| Copy line upDuplicates the line and places the copy over the original. | Shift+Alt+Up | Shift+Option+Up |
| Indent lineAdds one indentation level to the current or selected lines. | Ctrl+] | Cmd+] |
| Outdent lineRemoves one indentation level from the current or selected lines. | Ctrl+[ | Cmd+[ |
| Jump to matching bracketMoves the cursor between an opening bracket and its closing partner. | Ctrl+Shift+\ | Shift+Cmd+\ |
| Toggle line commentComments the current or selected lines, or uncomments them if already commented. | Ctrl+/ | Cmd+/ |
| Add line commentAlways comments the lines, unlike the toggle, which can also uncomment them. | Ctrl+KthenCtrl+C | Cmd+KthenCmd+C |
| Remove line commentStrips the comment marker from the current or selected lines. | Ctrl+KthenCtrl+U | Cmd+KthenCmd+U |
| Toggle block commentWraps the selection in block-comment markers, or removes them. | Shift+Alt+A | Shift+Option+A |
| Trim trailing whitespaceRemoves spaces and tabs left at the ends of lines in the file. | Ctrl+KthenCtrl+X | Cmd+KthenCmd+X |
| Toggle word wrapSwitches between wrapping long lines to the editor width and scrolling sideways. | Alt+Z | Option+Z |
| Toggle Tab moves focusMakes Tab move keyboard focus between controls instead of inserting a tab character. | Ctrl+M | Ctrl+Shift+M |
Moving and scrolling 8
| Action | Windows | Mac |
|---|---|---|
| Go to line start | Home | Home |
| Go to line end | End | End |
| Go to file startJumps the cursor to the first line of the document. | Ctrl+Home | Cmd+Up |
| Go to file endJumps the cursor to the last line of the document. | Ctrl+End | Cmd+Down |
| Scroll line upScrolls the editor one line higher; the Mac binding uses Ctrl with Page Up. | Ctrl+Up | Ctrl+Page Up |
| Scroll line downScrolls the editor one line lower; the Mac binding uses Ctrl with Page Down. | Ctrl+Down | Ctrl+Page Down |
| Scroll page upScrolls the editor a full screen higher. | Alt+Page Up | Cmd+Page Up |
| Scroll page downScrolls the editor a full screen lower. | Alt+Page Down | Cmd+Page Down |
Multi-cursor and selection 16
Linux differs here: its sheet gives Shift+Alt+Up and Shift+Alt+Down for a cursor above or below, and warns that Alt+Click may not work on some distributions.
| Action | Windows | Mac |
|---|---|---|
| Insert cursorEach click adds another cursor at the clicked position. | Alt+Click | Option+Click |
| Insert cursor aboveAdds a cursor on the previous line; repeat to stack more. | Ctrl+Alt+Up | Option+Cmd+Up |
| Insert cursor belowAdds a second cursor on the next line in the same column, for column edits. | Ctrl+Alt+Down | Option+Cmd+Down |
| Undo last cursor operationSteps back the most recent cursor move or added cursor without touching the text. | Ctrl+U | Cmd+U |
| Cursors at line endsPuts one cursor at the end of every line in the selection. | Shift+Alt+I | Shift+Option+I |
| Select current lineSelects the whole line; press again to extend the selection by another line. | Ctrl+L | Cmd+L |
| Add next occurrence to selectionSelects the word at the cursor, then adds the following match on each further press. | Ctrl+D | Cmd+D |
| Skip to next occurrenceDrops the most recently added match and selects the following one instead. | Ctrl+KthenCtrl+D | Cmd+KthenCmd+D |
| Select all occurrencesPlaces a cursor on every occurrence of the selected text in the file. | Ctrl+Shift+L | Shift+Cmd+L |
| Select all occurrences of wordSelects each occurrence of the word under the cursor so they can be edited together. | Ctrl+F2 | Cmd+F2 |
| Expand selectionGrows the selection to the next larger syntax element, such as word, expression, then block. | Shift+Alt+Right | Ctrl+Shift+Cmd+Right |
| Shrink selectionSteps an expanded selection back to the smaller syntax element. | Shift+Alt+Left | Ctrl+Shift+Cmd+Left |
| Column selection with mouseDragging with these modifiers held selects a rectangular block instead of whole lines. | Shift+Alt+Drag | Shift+Option+Drag |
| Column selection with arrowsExtends a rectangular selection one character or line in the arrow's direction. | Ctrl+Shift+Alt+Arrow keys | Shift+Option+Cmd+Arrow keys |
| Column-select one page upExtends the rectangular selection upward by a full page. | Ctrl+Shift+Alt+Page Up | Shift+Option+Cmd+Page Up |
| Column-select one page downExtends the rectangular selection downward by a full page. | Ctrl+Shift+Alt+Page Down | Shift+Option+Cmd+Page Down |
Search and replace 24
| Action | Windows | Mac |
|---|---|---|
| Find in fileOpens the Find widget for the active editor. | Ctrl+F | Cmd+F |
| Replace in fileOpens the Find widget with its replace field expanded. | Ctrl+H | Option+Cmd+F |
| Find nextListed for the Find widget, where it steps to the following match. | Enter | Return |
| Find previousListed for the Find widget, where it steps to the preceding match. | Shift+Enter | Shift+Return |
| Go to next matchJumps to the following Find match; the Mac sheet lists a letter key instead of F3. | F3 | Cmd+G |
| Go to previous matchJumps to the preceding Find match in the file. | Shift+F3 | Shift+Cmd+G |
| Select all Find matchesWith the Find widget open, turns every match into a selection with its own cursor. | Alt+Enter | Option+Return |
| Toggle case-sensitive findSwitches the Match Case option of the Find widget on or off. | Alt+C | Option+Cmd+C |
| Toggle regex findSwitches the Find widget between plain text and regular-expression matching. | Alt+R | Option+Cmd+R |
| Toggle whole-word findLimits Find matches to whole words, or lifts that limit. | Alt+W | Option+Cmd+W |
| Show SearchOpens the Search view in the side bar for searching across files. | Ctrl+Shift+F | Shift+Cmd+F |
| Replace in filesOpens the Search view with the replace field ready for a multi-file replace. | Ctrl+Shift+H | Shift+Cmd+H |
| Match case in SearchMakes the multi-file search treat upper and lower case as different. | Alt+C | Option+Cmd+C |
| Match whole word in SearchRestricts multi-file search results to whole-word matches. | Alt+W | Option+Cmd+W |
| Use regex in SearchTreats the Search view query as a regular expression. | Alt+R | Option+Cmd+R |
| Toggle search detailsShows or hides the extra Search view fields for files to include and exclude. | Ctrl+Shift+J | Shift+Cmd+J |
| Next search resultMoves to the following hit in the Search view results. | F4 | F4 |
| Previous search resultMoves to the preceding hit in the Search view results. | Shift+F4 | Shift+F4 |
| Next search termIn the search box, steps forward through earlier queries. | Down | Down |
| Previous search termIn the search box, recalls the query used before. | Up | Up |
| Open results in editorCopies the Search view results into a search editor tab. | Alt+Enter | Cmd+Return |
| Focus search editor inputIn a search editor, returns the cursor to the query box. | Esc | Esc |
| Search againReruns the query of the search editor to refresh its results. | Ctrl+Shift+R | Shift+Cmd+R |
| Delete file resultsRemoves one file's block of results from the search editor. | Ctrl+Shift+Backspace | Shift+Cmd+Backspace |
Language features 10
On Linux, Format Document is Ctrl+Shift+I instead of the Windows key.
| Action | Windows | Mac |
|---|---|---|
| Trigger suggestionsOpens the completion list at the cursor; the Mac binding also uses Ctrl. | Ctrl+Space | Ctrl+Space |
| Trigger parameter hintsShows the signature of the function call the cursor is inside. | Ctrl+Shift+Space | Shift+Cmd+Space |
| Show hoverDisplays the hover tooltip for the symbol at the cursor without using the mouse. | Ctrl+KthenCtrl+I | Cmd+KthenCmd+I |
| Quick FixOpens the list of fixes and refactorings offered at the cursor. | Ctrl+. | Cmd+. |
| Rename symbolRenames the symbol under the cursor and updates the places that reference it. | F2 | F2 |
| Format documentRuns the formatter for the file's language over the whole file. | Shift+Alt+F | Shift+Option+F |
| Format selectionApplies the formatter only to the selected lines. | Ctrl+KthenCtrl+F | Cmd+KthenCmd+F |
| Replace with next value | Ctrl+Shift+. | Shift+Cmd+. |
| Replace with previous value | Ctrl+Shift+, | Shift+Cmd+, |
| Change language modePicks which language the current file is treated as. | Ctrl+KthenM | Cmd+KthenM |
Folding 8
| Action | Windows | Mac |
|---|---|---|
| Fold regionCollapses the innermost unfolded region at the cursor. | Ctrl+Shift+[ | Option+Cmd+[ |
| Unfold regionExpands the collapsed region at the cursor. | Ctrl+Shift+] | Option+Cmd+] |
| Toggle foldFolds the region at the cursor, or unfolds it when already collapsed. | Ctrl+KthenCtrl+L | Cmd+KthenCmd+L |
| Fold all subregionsCollapses the region at the cursor together with every region nested inside it. | Ctrl+KthenCtrl+[ | Cmd+KthenCmd+[ |
| Unfold all subregionsExpands the region at the cursor and everything nested inside it. | Ctrl+KthenCtrl+] | Cmd+KthenCmd+] |
| Fold all regionsCollapses every foldable region in the editor; the second key is zero, not the letter O. | Ctrl+KthenCtrl+0 | Cmd+KthenCmd+0 |
| Unfold all regionsExpands every collapsed region in the editor at once. | Ctrl+KthenCtrl+J | Cmd+KthenCmd+J |
| Fold all block commentsCollapses only the block comments and leaves code regions open. | Ctrl+KthenCtrl+/ | Cmd+KthenCmd+/ |
Editor tabs and groups 20
| Action | Windows | Mac |
|---|---|---|
| Close editorCloses the active editor tab; the Windows sheet lists both keys. | Ctrl+F4orCtrl+W | Cmd+W |
| Close groupCloses all editors of the active group; the second key is pressed without the modifier. | Ctrl+KthenW | Cmd+KthenW |
| Close all editorsCloses the editors of every group; here the modifier is held for both keys. | Ctrl+KthenCtrl+W | Cmd+KthenCmd+W |
| Reopen closed editorBrings back the editor tab that was closed last. | Ctrl+Shift+T | Shift+Cmd+T |
| Keep editor openTurns the preview-mode tab into a regular tab so the next file does not replace it. | Ctrl+KthenEnter | Cmd+KthenReturn |
| Switch to recent editorHold Ctrl and tap Tab to walk the list of recently used editors in the group. | Ctrl+Tab | Ctrl+Tab |
| Open previous editorWalks the recently used editors in the opposite direction. | Ctrl+Shift+Tab | Ctrl+Shift+Tab |
| Split editorOpens the active file in a new editor group beside the current one. | Ctrl+\ | Cmd+\ |
| Focus first editor groupJumps to the leftmost group of editors. | Ctrl+1 | Cmd+1 |
| Focus second editor group | Ctrl+2 | Cmd+2 |
| Focus third editor group | Ctrl+3 | Cmd+3 |
| Focus group on the leftBoth keys are pressed with the modifier held, unlike the chord that moves a group. | Ctrl+KthenCtrl+Left | Cmd+KthenCmd+Left |
| Focus group on the right | Ctrl+KthenCtrl+Right | Cmd+KthenCmd+Right |
| Move editor leftReorders the active tab one position to the left within its group. | Ctrl+Shift+Page Up | Cmd+KthenShift+Cmd+Left |
| Move editor rightReorders the active tab one position to the right within its group. | Ctrl+Shift+Page Down | Cmd+KthenShift+Cmd+Right |
| Move editor group leftShifts the whole active group, with all its tabs, to the left. | Ctrl+KthenLeft | Cmd+KthenLeft |
| Move editor group rightShifts the whole active group, with all its tabs, to the right. | Ctrl+KthenRight | Cmd+KthenRight |
| Move editor to next groupSends the active tab to the following editor group. | Ctrl+Alt+Right | Ctrl+Cmd+Right |
| Move editor to previous groupSends the active tab to the preceding editor group. | Ctrl+Alt+Left | Ctrl+Cmd+Left |
| Toggle editor layoutFlips split editor groups between side-by-side and stacked arrangements. | Shift+Alt+0 | Option+Cmd+0 |
Views and panels 17
| Action | Windows | Mac |
|---|---|---|
| Toggle side barShows or hides the primary side bar to free up editor width. | Ctrl+B | Cmd+B |
| Toggle panelShows or hides the panel area that holds the terminal, Problems and Output. | Ctrl+J | Cmd+J |
| Show ExplorerOpens the Explorer view, or moves focus to it when it is already open. | Ctrl+Shift+E | Shift+Cmd+E |
| Show Source ControlOpens the Source Control view; the Mac key uses Ctrl rather than Cmd. | Ctrl+Shift+G | Ctrl+Shift+G |
| Show Run and DebugOpens the Run and Debug view in the side bar. | Ctrl+Shift+D | Shift+Cmd+D |
| Show ExtensionsOpens the Extensions view for installing and managing extensions. | Ctrl+Shift+X | Shift+Cmd+X |
| Show Problems panelOpens the list of errors and warnings found in the workspace. | Ctrl+Shift+M | Shift+Cmd+M |
| Show Output panelOpens the Output panel, where tools and extensions write their logs. | Ctrl+Shift+U | Shift+Cmd+U |
| Quick Open ViewOpens a picker for jumping to any view by name. | Ctrl+Q | Ctrl+Q |
| Toggle Markdown previewSwitches the active Markdown file between source and rendered preview. | Ctrl+Shift+V | Shift+Cmd+V |
| Markdown preview to the sideShows the rendered Markdown next to the source. | Ctrl+KthenV | Cmd+KthenV |
| Toggle full screenFills the display with the VS Code window, or returns to the normal window. | F11 | Ctrl+Cmd+F |
| Toggle Zen ModeHides all interface chrome except the editor for distraction-free work. | Ctrl+KthenZ | Cmd+KthenZ |
| Leave Zen ModePress the key twice in a row to return to the normal layout. | EscthenEsc | EscthenEsc |
| Zoom inEnlarges the whole interface, not only the editor font. | Ctrl+= | Cmd+= |
| Zoom outShrinks the whole interface by one zoom step. | Ctrl+- | Cmd+- |
| Reset zoomUses the zero on the numeric keypad, not the one in the number row. | Ctrl+Numpad 0 | Cmd+Numpad 0 |
Integrated terminal 21
| Action | Windows | Mac |
|---|---|---|
| Toggle integrated terminalShows or hides the terminal panel; the key is the backtick, with Ctrl on both systems. | Ctrl+` | Ctrl+` |
| Create new terminalAdds another terminal instance to the tab list of the panel. | Ctrl+Shift+` | Ctrl+Shift+` |
| Open external terminalStarts the system's own terminal application outside the VS Code window. | Ctrl+Shift+C | Shift+Cmd+C |
| New terminal windowOpens a terminal in a separate VS Code window. | Ctrl+Shift+Alt+` | Ctrl+Shift+Option+` |
| Split terminalCreates a second terminal next to the active one in the same group. | Ctrl+Shift+5 | Cmd+\ |
| Focus previous terminal paneInside a split group, moves focus one terminal pane back. | Alt+Left | Option+Cmd+Left |
| Focus next terminal paneInside a split group, moves focus one terminal pane onward. | Alt+Right | Option+Cmd+Right |
| Focus next terminal groupMoves to the following terminal group in the tab list. | Ctrl+Page Down | Shift+Cmd+] |
| Focus previous terminal groupMoves to the preceding terminal group in the tab list. | Ctrl+Page Up | Shift+Cmd+[ |
| Scroll terminal up a lineMoves one line back through the scrollback of the terminal buffer. | Ctrl+Alt+Page Up | Option+Cmd+Page Up |
| Scroll terminal down a lineMoves one line forward through the terminal buffer. | Ctrl+Alt+Page Down | Option+Cmd+Page Down |
| Scroll terminal up a pageOn Windows hold Shift; the Mac binding is the bare Page Up key. | Shift+Page Up | Page Up |
| Scroll terminal down a pageA Mac needs only the Page Down key, without a modifier. | Shift+Page Down | Page Down |
| Scroll terminal to topJumps to the oldest line kept in the scrollback. | Ctrl+Home | Cmd+Home |
| Scroll terminal to bottomJumps to the most recent line of the terminal buffer. | Ctrl+End | Cmd+End |
| Scroll to previous commandJumps to the prompt of the command before; it needs shell integration. | Ctrl+Up | Cmd+Up |
| Scroll to next commandJumps forward to the following command's prompt in the buffer. | Ctrl+Down | Cmd+Down |
| Find in terminalSearches the terminal buffer while the terminal has focus. | Ctrl+F | Cmd+F |
| Copy terminal selectionCopies the text selected in the terminal, following the platform's standard key. | Ctrl+C | Cmd+C |
| Paste into terminalPastes the clipboard at the terminal prompt. | Ctrl+V | Cmd+V |
| Fit terminal to content widthWidens the terminal columns to the longest wrapped line, or restores them. | Alt+Z | Option+Z |
Debugging and tasks 9
| Action | Windows | Mac |
|---|---|---|
| Start or continue debuggingLaunches a debug session, or resumes the program when it is paused. | F5 | F5 |
| Toggle breakpointSets or clears a breakpoint on the current line. | F9 | F9 |
| Start without debuggingRuns the program without attaching the debugger; the Mac binding also uses Ctrl. | Ctrl+F5 | Ctrl+F5 |
| Pause debuggingHalts the running program so its state can be inspected. | F6 | F6 |
| Step overRuns the current line without entering the functions it calls. | F10 | F10 |
| Step intoEnters the function called on the current line. | F11 | F11 |
| Step outFinishes the current function and stops back at its caller. | Shift+F11 | Shift+F11 |
| Stop debuggingEnds the debug session that is currently running. | Shift+F5 | Shift+F5 |
| Run build taskRuns the task marked as the default build task of the workspace. | Ctrl+Shift+B | Shift+Cmd+B |
Chat and inline suggestions 9
| Action | Windows | Mac |
|---|---|---|
| Open Chat viewBrings up the Chat view for a conversation with the AI agent. | Ctrl+Alt+I | Ctrl+Cmd+I |
| Open agent mode chatOpens the Chat view with the agent mode already selected. | Ctrl+Shift+I | Shift+Cmd+I |
| Start editor inline chatOpens a chat prompt inside the editor at the cursor or selection. | Ctrl+I | Cmd+I |
| Start terminal inline chatSame key as the editor version, used while the terminal has focus. | Ctrl+I | Cmd+I |
| Toggle quick chatOpens a small chat prompt without switching to the Chat view, or closes it. | Ctrl+Shift+Alt+L | Shift+Option+Cmd+L |
| Open agent pickerIn the chat input, lists the available agents to switch between. | Ctrl+. | Cmd+. |
| Open language model pickerIn the chat input, lists the language models that can answer the request. | Ctrl+Alt+. | Option+Cmd+. |
| New chat sessionShares its key with New File; in chat it starts an empty conversation. | Ctrl+N | Cmd+N |
| Accept inline suggestionInserts the greyed-out AI suggestion shown at the cursor. | Tab | Tab |
No row on this page matches that filter.
Notes
Learn the two palettes before anything else
Two shortcuts do more work than the rest of this page combined. Ctrl + P opens Quick Open, a fuzzy file switcher that matches partial names and path fragments, so uscontr finds UserController.ts without touching the explorer. Ctrl + Shift + P opens the Command Palette, which is the real menu of the editor: every action, including ones with no keybinding, is one typed word away. Once those two are muscle memory, Ctrl + G for a line number and Ctrl + Shift + O for a symbol in the current file cover most in-file jumps, and F12 / Alt + F12 handle cross-file definition lookups without leaving the current editor.
Multi-cursor is the feature people switch editors for
VS Code treats multiple cursors as a first-class editing mode rather than a plugin. Ctrl + D selects the word under the cursor, and pressing it again adds the next occurrence to the selection, so renaming a local variable in a small scope is three keypresses. Ctrl + Shift + L selects every occurrence at once, which is faster than replace when you can see all the hits on screen. Ctrl + Alt + Up and Ctrl + Alt + Down stack cursors on adjacent lines for column edits, and Shift + Alt + I drops a cursor at the end of every selected line — the trick for turning a pasted list into an array. When a multi-cursor edit goes wrong, Ctrl + U undoes the last cursor operation and a single click anywhere collapses back to one cursor.
Bindings that behave differently than their names suggest
Ctrl + C and Ctrl + X with nothing selected act on the whole line, which surprises people coming from other editors and is also why Ctrl + Shift + K exists — it deletes the line without polluting the clipboard. Ctrl + Enter inserts a line below regardless of where the cursor sits, so you do not have to press End first. Alt + Up and Alt + Down move a line but Shift + Alt + Up and Shift + Alt + Down copy it, and the two are easy to confuse in the first week. Ctrl + ` toggles the integrated terminal, which is different from Ctrl + J: the latter toggles the entire bottom panel, including Problems and Output, and that is the one to use when you want screen space back.
The Mac column is not Ctrl swapped for Cmd
Most Mac bindings replace Ctrl with Cmd and Alt with Option, but a fair number do not, and those are the ones that trip people who move between machines. Go to Line stays on Ctrl + G (the Mac sheet gives Cmd + G to find-next), and the terminal toggle Ctrl + ` and Trigger Suggest Ctrl + Space keep Ctrl as well. Replace is Option + Cmd + F rather than a Cmd version of the Windows key, Go Back is Ctrl + -, folding uses Option + Cmd + [, and Save All is the single combination Option + Cmd + S where Windows needs the chord Ctrl + K, S.
Questions
Why do some VS Code shortcuts list two key presses, like Ctrl+K Ctrl+S?
They are chords: two separate key presses in sequence. For Ctrl + K, Ctrl + S press Ctrl+K, release, then press Ctrl+S. When the second part has no modifier, as in Ctrl + K, Z for Zen Mode, let go of Ctrl before pressing the letter; Ctrl + K, W and Ctrl + K, Ctrl + W are different commands.
What is the difference between Go to Definition and Peek Definition?
F12 navigates to the definition in the editor; Alt + F12 opens it in an inline window under the cursor so you can read it and press Esc to return without losing your place. Ctrl + K, F12 is the third option: it opens the definition in an editor group to the side.
How do I see all keybindings, including ones not listed here?
Press Ctrl + K, Ctrl + S (Cmd + K, Cmd + S on a Mac), or open the Command Palette with Ctrl + Shift + P and run "Preferences: Open Keyboard Shortcuts". It lists every command with its current binding and lets you search by key. "Preferences: Open Default Keyboard Shortcuts (JSON)" shows the full default list for your system.
Do these shortcuts work in the terminal panel?
Most editor shortcuts do not apply inside the integrated terminal because the shell receives the keystrokes. Ctrl + ` still toggles it, and Ctrl + Shift + P works because the palette is global. The terminal also has its own bindings, for example Ctrl + Shift + 5 to split it and Ctrl + Alt + Page Up to scroll up a line.
Are the Linux defaults the same as the Windows column?
Mostly, but not everywhere. Microsoft's Linux sheet gives Ctrl+Shift+I for Format Document, Ctrl+Shift+F10 for Peek Definition, Ctrl+Alt+- and Ctrl+Shift+- for Go Back and Go Forward, Shift+Alt+Up/Down for a cursor above or below, and Ctrl+Shift+A for a block comment. In the terminal, Linux copies with Ctrl+Shift+C and pastes with Ctrl+Shift+V.
Sources and checks
- Visual Studio Code — Keyboard shortcuts for Windows (reference sheet, PDF dated August 2021) Windows keys for the rows the reference page does not list: mouse and column selection, F3, Ctrl+W, editor layout, Step Over, Step Out, Stop
- Visual Studio Code — Keyboard shortcuts for macOS (reference sheet, PDF dated August 2021) Mac keys for the same sheet-only rows
- Visual Studio Code — Keyboard shortcuts for Linux (reference sheet, PDF dated September 2024) Linux differences mentioned in the table notes
- VS Code Docs — Default keyboard shortcuts reference (page dated 9/30/2026, as rendered for Windows) Windows column for most rows
- VS Code Docs — Default keyboard shortcuts reference (page dated 9/30/2026, as rendered for macOS) Mac column for most rows
- VS Code Docs — Terminal Basics (page dated 9/30/2026, as rendered for Windows) Windows keys of the integrated terminal rows
3 more source pages
- VS Code Docs — Terminal Basics (page dated 9/30/2026, as rendered for macOS) Mac keys of the integrated terminal rows
- VS Code Docs — Tips and Tricks (page dated 9/30/2026, as rendered for Windows) Windows keys for Toggle Panel, Open Recent, References view, Compare with Clipboard, Fold All Block Comments
- VS Code Docs — Tips and Tricks (page dated 9/30/2026, as rendered for macOS) Mac keys for the same five rows
Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.
1 row from the earlier version of this page was removed in that check: duplicates, and bindings the documentation does not list or lists differently.
Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.