VS Code keyboard shortcuts let you edit, jump between files, drive the terminal and open Copilot chat without the mouse. Most chords match on Windows and Linux and swap Ctrl for Cmd on a Mac. A handful change meaning between platforms, and those are the ones that cost you a morning.
This cheat sheet groups the keys by job, from editing and multiple cursors to debugging and AI chat, with a printable PDF. We checked every Linux key against the Default Keyboard Shortcuts file of VS Code 1.148 on Ubuntu 26.04 in November 2026, and the Windows and macOS columns against Microsoft’s printed reference sheets.
Which VS Code shortcuts should you learn first?
Learn the Command Palette first, because every other command in this sheet is reachable from it. It also prints the current key next to each command name, so the palette teaches you as you go. The fifteen chords below cover most of a working day in the editor.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Command Palette | Ctrl+Shift+P, F1 | Shift+Cmd+P, F1 | Ctrl+Shift+P, F1 |
| Quick Open (go to file) | Ctrl+P | Cmd+P | Ctrl+P |
| Settings | Ctrl+, | Cmd+, | Ctrl+, |
| Keyboard Shortcuts editor | Ctrl+K Ctrl+S | Cmd+K Cmd+S | Ctrl+K Ctrl+S |
| Toggle line comment | Ctrl+/ | Cmd+/ | Ctrl+/ |
| Move line up or down | Alt+Up / Down | Option+Up / Down | Alt+Up / Down |
| Add next match to selection | Ctrl+D | Cmd+D | Ctrl+D |
| Format document | Shift+Alt+F | Shift+Option+F | Ctrl+Shift+I |
| Go to definition | F12 | F12 | F12 |
| Rename symbol | F2 | F2 | F2 |
| Toggle terminal | Ctrl+` | Ctrl+` | Ctrl+` |
| Toggle sidebar | Ctrl+B | Cmd+B | Ctrl+B |
| Start or continue debugging | F5 | F5 | F5 |
| Open Chat view | Ctrl+Alt+I | Ctrl+Cmd+I | Ctrl+Alt+I |
| Inline chat in editor or terminal | Ctrl+I | Cmd+I | Ctrl+I |
Notice the Format document row: Linux uses a completely different chord from Windows. That pattern repeats through the sheet. If you move between a Windows laptop and a Linux workstation, the platform differences section is the part worth reading twice.
Which editing shortcuts save the most time?
Line operations save the most time, because they replace the select, cut, move and paste routine with one chord. With nothing selected, Ctrl+X and Ctrl+C act on the whole line. That is the fastest way to lift a line out of one block and drop it into another.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Cut or copy line (empty selection) | Ctrl+X / Ctrl+C | Cmd+X / Cmd+C | Ctrl+X / Ctrl+C |
| Copy line down | Shift+Alt+Down | Shift+Option+Down | Ctrl+Shift+Alt+Down |
| Delete line | Ctrl+Shift+K | Shift+Cmd+K | Ctrl+Shift+K |
| Insert line below / above | Ctrl+Enter / Ctrl+Shift+Enter | Cmd+Enter / Shift+Cmd+Enter | Ctrl+Enter / Ctrl+Shift+Enter |
| Indent / outdent line | Ctrl+] / Ctrl+[ | Cmd+] / Cmd+[ | Ctrl+] / Ctrl+[ |
| Toggle block comment | Shift+Alt+A | Shift+Option+A | Ctrl+Shift+A |
| Format selection | Ctrl+K Ctrl+F | Cmd+K Cmd+F | Ctrl+K Ctrl+F |
| Quick Fix | Ctrl+. | Cmd+. | Ctrl+. |
| Trigger suggestion | Ctrl+Space | Ctrl+Space | Ctrl+Space |
| Jump to matching bracket | Ctrl+Shift+\ | Shift+Cmd+\ | Ctrl+Shift+\ |
| Fold / unfold region | Ctrl+Shift+[ / ] | Option+Cmd+[ / ] | Ctrl+Shift+[ / ] |
| Toggle word wrap | Alt+Z | Option+Z | Alt+Z |
| Find / replace | Ctrl+F / Ctrl+H | Cmd+F / Option+Cmd+F | Ctrl+F / Ctrl+H |
| Find / replace in files | Ctrl+Shift+F / Ctrl+Shift+H | Shift+Cmd+F / Shift+Cmd+H | Ctrl+Shift+F / Ctrl+Shift+H |
| Save all | Ctrl+K S | Option+Cmd+S | not bound |
Two rows surprise people on Linux, and both are easy to confirm on your own install:
- Copy line down needs all three modifiers on Linux, and Shift+Alt+Down adds a cursor below there instead.
- Save all has no default key on Linux. Ctrl+K S still fires there, but it runs Save without Formatting on the current file only.
If you want Save all on a key, bind it yourself in the Keyboard Shortcuts editor. The steps are in the section on changing a shortcut further down.
How do you use multiple cursors in VS Code?
Select a word and press Ctrl+D (Cmd+D on a Mac) for each next occurrence you want to edit at once. Every selection gets its own cursor, so whatever you type lands in all of them. Ctrl+K Ctrl+D skips an occurrence you did not mean to grab.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Insert cursor at click | Alt+Click | Option+Click | Alt+Click |
| Add cursor above / below | Ctrl+Alt+Up / Down | Option+Cmd+Up / Down | Ctrl+Shift+Up / Down or Shift+Alt+Up / Down |
| Add next match / skip it | Ctrl+D / Ctrl+K Ctrl+D | Cmd+D / Cmd+K Cmd+D | Ctrl+D / Ctrl+K Ctrl+D |
| Select all occurrences of selection | Ctrl+Shift+L | Shift+Cmd+L | Ctrl+Shift+L |
| Select all occurrences of word | Ctrl+F2 | Cmd+F2 | Ctrl+F2 |
| Cursor at end of each selected line | Shift+Alt+I | Shift+Option+I | Shift+Alt+I |
| Undo last cursor operation | Ctrl+U | Cmd+U | Ctrl+U |
| Select current line | Ctrl+L | Cmd+L | Ctrl+L |
| Expand selection | Shift+Alt+Right | Ctrl+Shift+Cmd+Right | Shift+Alt+Right |
| Column (box) selection with mouse | Shift+Alt+drag | Shift+Option+drag | Shift+Alt+drag |
Ctrl+D is smarter than a plain text search, and our test showed exactly how. In a small Python inventory file we double-clicked the role string web and kept pressing Ctrl+D. VS Code picked up the three standalone web values and skipped the web inside web01 and web02.
The find options explain it: Match Whole Word and Match Case were both switched on for that run. The selection count in the status bar then confirms what you are about to change before you type.

- 1Match Whole Word
- 2selection count
If you need the partial matches too, that whole-word behaviour is the thing to check first. Ctrl+Shift+L is the blunter tool, since it selects every occurrence of the current selection in one go, which makes it quicker for a rename across a short file but riskier in a long one.
How do you navigate files and symbols?
Use Ctrl+P to jump to any file by typing part of its name, then Ctrl+Shift+O to jump to a function or class inside it. Those two chords replace most clicking around in the Explorer, and Ctrl+T searches symbols across the whole workspace when you do not know which file holds them.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Go to file | Ctrl+P | Cmd+P | Ctrl+P |
| Go to line | Ctrl+G | Ctrl+G | Ctrl+G |
| Go to symbol in file | Ctrl+Shift+O | Shift+Cmd+O | Ctrl+Shift+O |
| Show all symbols (workspace) | Ctrl+T | Cmd+T | Ctrl+T |
| Go to definition | F12 | F12 | F12 |
| Peek definition | Alt+F12 | Option+F12 | Ctrl+Shift+F10 |
| Show references | Shift+F12 | Shift+F12 | Shift+F12 |
| Go back / forward | Alt+Left / Alt+Right | Ctrl+- / Ctrl+Shift+- | Ctrl+Alt+- / Ctrl+Shift+- |
| Next error or warning | F8 | F8 | F8 |
| Problems panel | Ctrl+Shift+M | Shift+Cmd+M | Ctrl+Shift+M |
| Split editor | Ctrl+\ | Cmd+\ | Ctrl+\ |
| Close editor / reopen closed | Ctrl+W / Ctrl+Shift+T | Cmd+W / Shift+Cmd+T | Ctrl+W / Ctrl+Shift+T |
| Zen Mode | Ctrl+K Z | Cmd+K Z | Ctrl+K Z |
Go back is the key most people miss after an F12 jump into a library. On Linux it is Ctrl+Alt+Minus rather than the Alt+Left Windows users expect. If you installed VS Code on Ubuntu after years on Windows, these are the navigation keys to retrain first:
- Ctrl+Alt+Minus returns you to the line you jumped from with F12.
- Ctrl+Shift+F10 opens the peek window that Alt+F12 opens on Windows.
- Ctrl+Shift+Minus moves forward again, where Windows uses Alt+Right.
Everything else in the navigation table matches Windows, so the muscle memory for Ctrl+P, Ctrl+G and F12 carries straight over.
Which shortcuts control the integrated terminal?
Ctrl+` (the backtick key) shows and hides the integrated terminal on every platform, and Ctrl+Shift+` opens a fresh one. Copy and paste follow each platform’s terminal habits. Linux uses Ctrl+Shift+C and Ctrl+Shift+V, while Windows keeps Ctrl+C for copying a selection.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Toggle terminal | Ctrl+` | Ctrl+` | Ctrl+` |
| New terminal | Ctrl+Shift+` | Ctrl+Shift+` | Ctrl+Shift+` |
| Split terminal | Ctrl+Shift+5 | Cmd+\ | Ctrl+Shift+5 |
| Copy / paste in terminal | Ctrl+C / Ctrl+V | Cmd+C / Cmd+V | Ctrl+Shift+C / Ctrl+Shift+V |
| Scroll one line up / down | Ctrl+Alt+PageUp / PageDown | Option+Cmd+PageUp / PageDown | Ctrl+Shift+Up / Down |
| Scroll one page up / down | Shift+PageUp / PageDown | PageUp / PageDown | Shift+PageUp / PageDown |
| Inline chat in terminal | Ctrl+I | Cmd+I | Ctrl+I |
We split the terminal with Ctrl+Shift+5 and ran a different job in each pane, with the sidebar hidden through Ctrl+B to give the panes room. A split is worth it when one pane runs a long job and the other stays free for commands. Three checks tell you the split works:
- Two panes appear side by side in the terminal panel after Ctrl+Shift+5.
- Alt+Left and Alt+Right move the focus between the panes.
- On Linux and macOS the new pane starts in the current directory of the first one. Windows starts it where the parent terminal was launched.

Inside the terminal, most keys go to the shell rather than to VS Code, so your readline habits mostly still work. The exception is a short list of commands VS Code keeps for itself: on Linux, Ctrl+P and Ctrl+E open Quick Open instead of walking shell history or jumping to the end of the line. The terminal.integrated.commandsToSkipShell setting changes that list. The Linux terminal shortcuts cheat sheet covers those.
What are the VS Code debugging shortcuts?
F9 sets a breakpoint on the current line and F5 starts the debugger. The stepping keys are the same function keys on all three platforms. Only Restart and the Run and Debug view change modifiers, with Cmd taking the place of Ctrl on a Mac.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Toggle breakpoint | F9 | F9 | F9 |
| Start / continue | F5 | F5 | F5 |
| Run without debugging | Ctrl+F5 | Ctrl+F5 | Ctrl+F5 |
| Step over | F10 | F10 | F10 |
| Step into / step out | F11 / Shift+F11 | F11 / Shift+F11 | F11 / Shift+F11 |
| Stop | Shift+F5 | Shift+F5 | Shift+F5 |
| Restart | Ctrl+Shift+F5 | Shift+Cmd+F5 | Ctrl+Shift+F5 |
| Run and Debug view | Ctrl+Shift+D | Shift+Cmd+D | Ctrl+Shift+D |
On a laptop, check the Fn lock first. Many laptop keyboards send brightness or volume on the top row unless Fn is held, which makes F5 and F10 look broken when the keyboard is really sending a media key. Before you blame VS Code, run through these:
- F9 puts a red dot in the gutter next to the current line.
- F5 opens the debug toolbar instead of changing screen brightness.
- On a Mac, the standard function keys option is on in the Keyboard settings.
The macOS keyboard shortcuts guide lists the system chords on a Mac that can compete with VS Code for the same keys.
Which keys open Copilot and AI chat in VS Code?
Ctrl+Alt+I opens the Chat view on Windows and Linux (Ctrl+Cmd+I on a Mac). Ctrl+I starts inline chat right where your cursor sits in the editor or the terminal. Agent mode has its own chord, and it is the one that differs most between platforms.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Open Chat view | Ctrl+Alt+I | Ctrl+Cmd+I | Ctrl+Alt+I |
| Open chat in agent mode | Ctrl+Shift+I | Shift+Cmd+I | Ctrl+Shift+Alt+I |
| Inline chat (editor or terminal) | Ctrl+I | Cmd+I | Ctrl+I |
| Quick chat | Ctrl+Shift+Alt+L | Shift+Option+Cmd+L | Ctrl+Shift+Alt+L |
| New chat session (chat focused) | Ctrl+N | Cmd+N | Ctrl+N or Ctrl+L |
| Agent picker / model picker | Ctrl+. / Ctrl+Alt+. | Cmd+. / Option+Cmd+. | Ctrl+. / Ctrl+Alt+. |
| Accept inline suggestion | Tab | Tab | Tab |
| Accept next word of suggestion | Ctrl+Right | Cmd+Right | Ctrl+Right |
| Dismiss inline suggestion | Escape | Escape | Escape |
To confirm what a chord does on your own install, open the Keyboard Shortcuts editor, switch on Record Keys and press the chord. We pressed Ctrl+Alt+I and VS Code listed three commands on it: Chat: Open Chat, View: Toggle Chat and a Toggle Chat Update Requirement entry. The when column decides which one runs, so sharing the chord is safe.

The new-chat keys only work when the chat panel has focus. In the editor, Ctrl+L selects the current line and Ctrl+N opens an untitled file, so pressing them in your code will not clear the conversation. If you use Claude Code alongside Copilot, its keys live in the Claude Code cheat sheet.
Where do Windows, macOS and Linux keys differ?
macOS mostly swaps Ctrl for Cmd and Alt for Option, so a Windows chord translates predictably. Linux is the odd one out. Its defaults reassign several Alt chords, so a handful of keys there mean something different from the Windows chord you remember.
- Shift+Alt+Down copies the line on Windows but adds a cursor below on Linux.
- Ctrl+Shift+I opens agent mode on Windows but formats the document on Linux.
- Go back is Alt+Left on Windows but Ctrl+Alt+Minus on Linux.
- Shift+Alt+A toggles a block comment on Windows, while Linux uses Ctrl+Shift+A.
- Save all is Ctrl+K S on Windows. On Linux the same chord saves only the current file without formatting it.
Test each of these once on your own machine and you will know which habits to keep. Microsoft lists every default per platform in its default keybindings reference. The copy that matches your build exactly, though, is the one VS Code generates for you, shown in the next section.
The same platform split runs through the desktop itself. Our Windows 11 keyboard shortcuts and Ubuntu keyboard shortcuts guides cover the system keys that sit around the editor.
How do you find or change a VS Code shortcut?
Press Ctrl+K Ctrl+S (Cmd+K Cmd+S on a Mac) to open the Keyboard Shortcuts editor, then type a command name into the Search box. Each row shows the command, its keybinding, the when condition that has to be true, and whether the binding came from the system, an extension or you.

- 1Search box
- 2Record Keys
- 3Open Keyboard Shortcuts (JSON)
Searching “add cursor” on Linux shows why this editor beats any printed sheet. Add Cursor Above has two bindings, Ctrl+Shift+UpArrow and Shift+Alt+UpArrow, and the Linux PDF lists only one. The Record Keys button flips the search to matching by chord instead of by name. Open Keyboard Shortcuts (JSON) opens the file that stores your own overrides.
Every override lands in keybindings.json in your user profile, which on Linux is ~/.config/Code/User/keybindings.json. We used it to turn Ctrl+Shift+D into a duplicate-line key. That takes two entries: one adds the new binding, and one with a minus in front of the command removes the default Run and Debug binding from the chord.
[
{
"key": "ctrl+shift+d",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+d",
"command": "-workbench.view.debug"
}
]
VS Code picks the file up on save, with no restart. Pressing Ctrl+Shift+D in the editor then duplicated the line instead of opening Run and Debug. Typing @source:user into the search box lists only your own bindings, which is the quickest way to audit what you have changed.

For the full list of defaults on your build, open the Command Palette and run Preferences: Open Default Keyboard Shortcuts (JSON). On our Ubuntu install it listed 1,202 bindings. The palette also offers Help: Keyboard Shortcuts Reference, which opens Microsoft’s printable PDF for your platform. Run it from the palette: its chord, Ctrl+K Ctrl+R, reverts the selected Git changes when the cursor sits in a tracked file.

The same keybindings file works whether you installed VS Code on Fedora or Ubuntu, so copy it between machines (or let Settings Sync carry it) and your custom keys follow you.
Fix a shortcut that does nothing
When a chord does nothing, or does the wrong thing, turn on Developer: Toggle Keyboard Shortcuts Troubleshooting from the Command Palette and press the chord again. VS Code writes each key it receives to the Output panel, along with the binding it matched and the command it ran. We trimmed the timestamps, the [Window] tags and the keydown event lines from our log below to keep the matches readable.
[info] [KeybindingService]: | Resolving ctrl+[KeyD]
[info] [KeybindingService]: \ From 3 keybinding entries, matched editor.action.addSelectionToNextFindMatch, when: editorFocus, source: built-in.
[info] [KeybindingService]: + Invoking command editor.action.addSelectionToNextFindMatch.
[info] [KeybindingService]: | Resolving ctrl+alt+[KeyI]
[info] [KeybindingService]: \ From 3 keybinding entries, matched workbench.panel.chat, when: workbench.panel.chat.view.copilot.active, source: built-in.
[info] [KeybindingService]: + Invoking command workbench.panel.chat.
Read it from the top. “From 3 keybinding entries” tells you three bindings compete for that chord, and the when clause shows which condition won. If pressing the chord adds no “Received keydown event” line at all, VS Code never received the key. Something outside it, such as the desktop, a keyboard layout tool or a remote session, took it first.

Work through these checks in order, and stop at the first one that explains the problem:
- The troubleshooting log shows a “Resolving” line when you press the chord.
- The matched command in the log is the one you expected, not an extension’s binding.
- The
whenclause is true where your focus is (editor, terminal or chat). - Searching
@source:usershows no old override of yours on the same chord. - On a laptop, the function keys send F5 and F10, not media keys.
Most dead shortcuts come down to check three: the chord is bound, but only where your focus isn’t. Turn the troubleshooting log off again when you’re done, since it logs every key you press, and browse the rest of our cheat sheets for the tools you use next to the editor.