Skip to content

↑↓ moveEnter openEsc close

VS Code keyboard shortcuts for Mac

VS Code 1.96 · 138 shortcuts · checked Nov 2026 · Source: Microsoft docs

138 default VS Code shortcuts on Mac, grouped by task.

138 shortcuts
Keys:

General

7 shortcuts
ActionKeys
Show Command PaletteShiftCmdPorF1
Quick Open, go to fileCmdP
New windowShiftCmdN
Close windowShiftCmdW
Open User SettingsCmd,
Open the keybindings editorCmdK,CmdS
Open Microsoft's shortcut referenceCmdK,CmdR

Basic editing

33 shortcuts
ActionKeys
Cut line (empty selection)CmdX
Copy line (empty selection)CmdC
Move line downOption↓
Move line upOption↑
Copy line downOptionShift↓
Copy line upOptionShift↑
Delete lineShiftCmdK
Insert line belowCmdEnter
Insert line aboveShiftCmdEnter
Jump to matching bracketShiftCmd\
Indent lineCmd]
Outdent lineCmd[
Go to beginning of lineHomeorCmd←
Go to end of lineEndorCmd→
Go to beginning of fileCmd↑
Go to end of fileCmd↓
Scroll line upCtrlPageUp
Scroll line downCtrlPageDown
Scroll page upCmdPageUp
Scroll page downCmdPageDown
Fold (collapse) regionOptionCmd[
Unfold (uncollapse) regionOptionCmd]
Toggle foldCmdK,CmdL
Fold all subregionsCmdK,Cmd[
Unfold all subregionsCmdK,Cmd]
Fold all regionsCmdK,Cmd0
Unfold all regionsCmdK,CmdJ
Fold all block commentsCmdK,Cmd/
Add line commentCmdK,CmdC
Remove line commentCmdK,CmdU
Toggle line commentCmd/
Toggle block commentOptionShiftA
Toggle word wrapOptionZ

Navigation

10 shortcuts
ActionKeys
Show all symbolsCmdT
Go to lineCtrlG
Go to symbol in fileShiftCmdO
Show Problems panelShiftCmdM
Go to next error or warningF8
Go to previous error or warningShiftF8
Navigate editor group historyCtrlShiftTab
Go backCtrl-
Go forwardCtrlShift-
Toggle Tab moves focusCtrlShiftM
ActionKeys
FindCmdF
ReplaceOptionCmdF
Find nextFind widget openEnterorCmdG
Find previousFind widget openShiftEnterorShiftCmdG
Select all occurrences of find matchFind widget openOptionEnter
Toggle case-sensitiveFind widget openOptionCmdC
Toggle regexFind widget openOptionCmdR
Toggle whole wordFind widget openOptionCmdW
ActionKeys
Insert cursor aboveOptionCmd↑
Insert cursor belowOptionCmd↓
Undo last cursor operationCmdU
Insert cursor at end of each selected lineOptionShiftI
Select current lineCmdL
Select all occurrences of current selectionShiftCmdL
Add selection to next find matchCmdD
Select allCmdA
Expand selectionCtrlShiftCmd→
Shrink selectionCtrlShiftCmd←
Column (box) selection downOptionShiftCmd↓
ActionKeys
Trigger suggestionCtrlSpaceorCmdI
Trigger parameter hintsShiftCmdSpace
Format documentOptionShiftF
Format selectionCmdK,CmdF
Go to definitionF12
Peek definitionOptionF12
Open definition to the sideCmdK,F12
Quick FixCmd.
Show referencesShiftF12
Rename symbolF2
Trim trailing whitespaceCmdK,CmdX
Change file languageCmdK,M

Editor management

10 shortcuts
ActionKeys
Close editorCmdW
Close folderCmdK,F
Split editorCmd\
Focus into 1st, 2nd or 3rd editor groupCmd1
Focus into previous editor groupCmdK,Cmd←
Focus into next editor groupCmdK,Cmd→
Move editor leftCmdK,ShiftCmd←
Move editor rightCmdK,ShiftCmd→
Move active editor group leftCmdK,←
Move active editor group rightCmdK,→

File management

14 shortcuts
ActionKeys
Open folderCmdO
New fileCmdN
Open fileCmdO
SaveCmdS
Save asShiftCmdS
Save allOptionCmdS
Close all editorsCmdK,CmdW
Reopen closed editorShiftCmdT
Keep preview mode editor openCmdK,Enter
Open next editorCtrlTab
Open previous editorCtrlShiftTab
Copy path of active fileCmdK,P
Reveal active file in Explorer or FinderCmdK,R
Show active file in new windowCmdK,O

Display

17 shortcuts
ActionKeys
Toggle full screenCtrlCmdF
Toggle Zen ModeCmdK,Z
Zoom inCmd=
Zoom outCmd-
Toggle Sidebar visibilityCmdB
Show ExplorerShiftCmdE
Show Source ControlCtrlShiftG
Show Run and DebugShiftCmdD
Show ExtensionsShiftCmdX
Replace in filesShiftCmdH
Toggle Search detailsShiftCmdJ
Show Output panelShiftCmdU
Toggle panelCmdJ
Show Debug ConsoleShiftCmdY
Open Markdown previewShiftCmdV
Open Markdown preview to the sideCmdK,V

Debug

8 shortcuts
ActionKeys
Toggle breakpointF9
Start or continue debuggingF5
Start without debuggingCtrlF5
Stop debuggingShiftF5
Step intoF11
Step outShiftF11
Step overF10
Show hoverCmdK,CmdI
ActionKeys
Toggle integrated terminalCtrl`
Create new terminalCtrlShift`
Scroll up (terminal)Terminal focusedCmd↑
Scroll down (terminal)Terminal focusedCmd↓
Scroll page up (terminal)Terminal focusedPageUp
Scroll page down (terminal)Terminal focusedPageDown
Scroll to top (terminal)Terminal focusedCmdHome
Scroll to bottom (terminal)Terminal focusedCmdEnd

These are the default Visual Studio Code key bindings on Mac, from Microsoft's official list for version 1.96. Shortcuts that exist only on another system are left out here; the all-systems view shows every binding side by side.

Other systems: VS Code shortcuts for Windows, VS Code shortcuts for Linux. Or print the VS Code cheat sheet.