Keyhab
⌘⇧P
VS Code

VS Code Shortcuts on Windows vs Mac: What Actually Changes

Most VS Code shortcuts map straight from Cmd to Ctrl, but a handful genuinely differ. Here are the ones that break when you switch between Windows and Mac, and the keys that only exist on one side.

The rule, and its exceptions

Switching VS Code between Windows and Mac is mostly a find-and-replace in your head:

  • Cmd becomes Ctrl
  • Opt becomes Alt

That covers the large majority of shortcuts. Save, find, command palette, multi-cursor, go to file — all of them translate directly. The problem is the handful that do not, because those are the ones that silently do something else instead of nothing.

This guide lists only the differences. If a shortcut is not here, the rule above applies.

The differences that bite

ActionMacWindows
Go back to the previous locationCtrl + MinusAlt + Left
Go forwardCtrl + Shift + MinusAlt + Right
Fold a code blockCmd + Opt + [Ctrl + Shift + [
Unfold a code blockCmd + Opt + ]Ctrl + Shift + ]
ReplaceCmd + Opt + FCtrl + H
Split the terminalCmd + BackslashCtrl + Shift + 5

Navigate back is the one worth internalizing. On Mac it uses Ctrl, not Cmd, which breaks the translation rule twice over — and on Windows it is not a Ctrl shortcut at all. If you jump to a definition and want to come back, this is the key you need and the one you will fumble.

Folding is the other trap: on Mac the modifier is Cmd + Opt, on Windows it is Ctrl + Shift. Pressing Ctrl + Alt + bracket on Windows does nothing at all.

The terminal split is listed here for completeness, but it is the gentlest of the four: Ctrl + Shift + 5 also works on Mac as a secondary binding, so that one key covers both machines.

The terminal keeps Ctrl on both

One group resists the Cmd rule entirely. Ctrl + Backtick (toggle the terminal) and Ctrl + Shift + Backtick (new terminal) are Ctrl shortcuts on macOS too — not Cmd. They are the same on both platforms, which makes them easy to forget when every other editor shortcut on a Mac starts with Cmd.

What does translate cleanly

For reassurance, these all follow the rule — the Mac key with Cmd becomes the same key with Ctrl on Windows:

ActionMacWindows
Command paletteCmd + Shift + PCtrl + Shift + P
Quick open a fileCmd + PCtrl + P
SaveCmd + SCtrl + S
FindCmd + FCtrl + F
Toggle the terminalCtrl + BacktickCtrl + Backtick
Toggle the sidebarCmd + BCtrl + B
Comment a lineCmd + SlashCtrl + Slash
Move a line up or downOpt + Up / DownAlt + Up / Down
Add a cursor on the next matchCmd + DCtrl + D
Go to a symbolCmd + Shift + OCtrl + Shift + O
Go to a lineCtrl + GCtrl + G
Rename a symbolF2F2
Format the documentShift + Opt + FShift + Alt + F

Format document looks like an exception but is not: Mac uses Shift + Opt + F, Windows Shift + Alt + F — the same keys, since Opt and Alt are the same physical key. The genuine exception is Replace, which is in the table at the top.

If you move between machines often

Three practical options, in increasing order of effort:

  1. Learn the differences above. There are four of them — navigation, folding, replace and the terminal split — and they come up daily.
  2. Use Settings Sync. VS Code syncs keybindings across machines, so a custom binding you set on one follows you to the other.
  3. Normalize the odd ones yourself. In the Keyboard Shortcuts editor, rebind navigate back and forward to the same keys on both platforms — most people pick Ctrl + Minus everywhere, or Alt + arrows everywhere.

Option 3 is tempting, but it only works if every machine you use is yours. On a shared or work-managed machine, you will be back to the defaults — which is the argument for simply learning them.

Why these are worth memorizing at all

Keyboard work is fast because it is automatic, and automatic means your fingers do not stop to check. A shortcut you have to think about is barely quicker than the menu.

That is exactly why the mismatched four hurt more than their number suggests: they interrupt the flow, and interruptions are what you were trying to remove. Learn them once, deliberately, and the rest of the mapping takes care of itself.

⌘⇧P

Learn VSCode shortcuts with quick quizzes

Keyhab quizzes you on 1,050 shortcuts for 15 tools, from Basics to Advanced. Five minutes a day on iPhone or iPad — VSCode (Mac) and Vim Basics are free.

Download free on the App Store

Related