VS Code Keyboard Shortcuts

20 keyboard shortcuts for Windows and Mac, grouped by task. VS Code 1.100 and later, default keymap.

VS Code

VS Code 1.100 and later, default keymap

General

ActionWindowsMacSave or copy
Command paletteCtrl+Shift+PCmd+Shift+P
Go to fileCtrl+PCmd+P
SettingsCtrl+,Cmd+,
Toggle terminalCtrl+`Ctrl+`
Toggle sidebarCtrl+BCmd+B
Search in all filesCtrl+Shift+FCmd+Shift+F
Split editorCtrl+\Cmd+\
Zen modeCtrl+K then ZCmd+K then Z

Editing

ActionWindowsMacSave or copy
Move line up or downAlt+Up / Alt+DownOption+Up / Option+Down
Copy line up or downShift+Alt+Up / Shift+Alt+DownShift+Option+Up / Shift+Option+Down
Delete lineCtrl+Shift+KCmd+Shift+K
Add next match to selectionCtrl+DCmd+D
Select all matchesCtrl+Shift+LCmd+Shift+L
Add cursor above or belowCtrl+Alt+Up / Ctrl+Alt+DownCmd+Option+Up / Cmd+Option+Down
Toggle line commentCtrl+/Cmd+/
Format documentShift+Alt+FShift+Option+F
Rename symbolF2F2
Go to definitionF12F12
Quick fixCtrl+.Cmd+.
Go to lineCtrl+GCtrl+G

More developer

Checked 2 Dec 2026. Product names belong to their owners; this is an independent guide.

How to use it

  1. Search by what you want to do, like "new tab" or "bold".
  2. Switch between Windows and Mac keys, or show both.
  3. Save the ones you use and print a cheat sheet for one app.

Questions

Are these shortcuts up to date?

We checked them on 2 Dec 2026 against current versions of each app. Apps change shortcuts from time to time, and many apps show their own list (often with Ctrl+/ or ?).

What do Cmd and Option mean?

On a Mac keyboard, Cmd is the Command key and Option is the Alt key. Ctrl is the Control key on both Windows and Mac.

Can I print a cheat sheet?

Yes. Pick one app and press Print cheat sheet. The page prints only the shortcuts, sized for paper.