Visual Studio Code Keyboard Shortcuts for Windows

Keyboard shortcuts for Visual Studio Code on Windows. Navigate the editor, manage files, and use the integrated terminal on Windows.
Key label style

General

Show Command Palette
Ctrl+Shift+P
or
F1
Quick Open, Go to File…
Ctrl+P
New window/instance
Ctrl+Shift+N
Close window/instance
Ctrl+Shift+W
User Settings
Ctrl+,
Keyboard Shortcuts
Ctrl+K,Ctrl+S

Basic editing

Cut line (empty selection)
Ctrl+X
Copy line (empty selection)
Ctrl+C
Move line up/down
Alt+Up
or
Alt+Down
Copy line up/down
Alt+Shift+Down
or
Alt+Shift+Up
Delete line
Ctrl+Shift+K
Insert line below
Ctrl+Enter
Insert line above
Ctrl+Shift+Enter
Jump to matching bracket
Ctrl+Shift+\
Indent/outdent line
Ctrl+]
or
Ctrl+[
Go to beginning/end of line
Home
or
End
Go to beginning of file
Ctrl+Home
Go to end of file
Ctrl+End
Scroll line up/down
Ctrl+Up
or
Ctrl+Down
Scroll page up/down
Alt+Pg Up
or
Alt+Pg Dn
Fold (collapse) region
Ctrl+Shift+[
Unfold (uncollapse) region
Ctrl+Shift+]
Fold (collapse) all subregions
Ctrl+K,Ctrl+[
Unfold (uncollapse) all subregions
Ctrl+K,Ctrl+]
Fold (collapse) all regions
Ctrl+K,Ctrl+0
Unfold (uncollapse) all regions
Ctrl+K,Ctrl+J
Add line comment
Ctrl+K,Ctrl+C
Remove line comment
Ctrl+K,Ctrl+U
Toggle line comment
Ctrl
or
Ctrl
Toggle block comment
Alt+Shift+A
Toggle word wrap
Alt+Z

Search and replace

Find
Ctrl+F
Replace
Ctrl+H
Find next/previous
F3
or
Shift+F3
Select all occurences of Find match
Alt+Enter
Add selection to next Find match
Ctrl+D
Move last selection to next Find match
Ctrl+K,Ctrl+D
Toggle case-sensitive / regex / whole word
Alt+C
or
Alt+R
or
Alt+W

Multi-cursor and selection

Insert cursor
Alt+Click
Insert cursor above / below
Ctrl+Alt+Up
or
Ctrl+Alt+Down
Undo last cursor operation
Ctrl+U
Insert cursor at end of each line selected
Alt+Shift+I
Select current line
Ctrl+L
Select all occurrences of current selection
Ctrl+Shift+L
Select all occurrences of current word
Ctrl+F2
Expand selection
Alt+Shift+Right
Shrink selection
Alt+Shift+Left
Column (box) selection
Alt+Shift+Drag
Column (box) selection
Ctrl+Alt+Shift+UpDownLeftRight
Column (box) selection page up/down
Ctrl+Alt+Shift+Pg Up
or
Ctrl+Alt+Shift+Pg Dn

Rich languages editing

Trigger suggestion
Ctrl+Space
or
Ctrl+I
Trigger parameter hints
Ctrl+Shift+Space
Format document
Alt+Shift+F
Format selection
Ctrl+K,Ctrl+F
Go to Definition
F12
Peek Definition
Alt+F12
Open Definition to the side
Ctrl+K,F12
Quick Fix
Ctrl+.
Show References
Shift+F12
Rename Symbol
F2
Trim trailing whitespace
Ctrl+K,Ctrl+X
Change file language
Ctrl+K,M

Editor management

Close editor
Ctrl+F4
or
Ctrl+W
Close folder
Ctrl+K,F
Split editor
Ctrl+\
Focus into 1st, 2nd or 3rd editor group
Ctrl+1
or
Ctrl+2
or
Ctrl+3
Focus into previous/next editor group
Ctrl+K,Ctrl+Left
or
Ctrl+K,Ctrl+Right
Move active editor group
Ctrl+K,Left
or
Ctrl+K,Right

File management

New File
Ctrl+N
Open File...
Ctrl+O
Save
Ctrl+S
Save As...
Ctrl+Shift+S
Save All
Ctrl+K,S
Close
Ctrl+F4
Close All
Ctrl+K,Ctrl+W
Reopen closed editor
Ctrl+Shift+T
Keep preview mode editor open
Ctrl+K,Enter
Open next
Ctrl+Tab
Open previous
Ctrl+Shift+Tab
Copy path of active file
Ctrl+K,P
Reveal active file in Explorer
Ctrl+K,R
Show active file in new window/instance
Ctrl+K,O

Display

Toggle full screen
F11
Toggle editor layout (horizontal/vertical)
Alt+Shift+0
Zoom in/out
Ctrl+=
or
Ctrl+-
Toggle Sidebar visibility
Ctrl+B
Show Explorer / Toggle focus
Ctrl+Shift+E
Show Source Control
Ctrl+Shift+G
Show Debug
Ctrl+Shift+D
Show Extensions
Ctrl+Shift+X
Replace in files
Ctrl+Shift+H
Toggle Search details
Ctrl+Shift+J
Show Output panel
Ctrl+Shift+U
Open Markdown preview
Ctrl+Shift+V
Open Markdown preview to the side
Ctrl+K,V

Debug

Toggle breakpoint
F9
Start/Continue
F5
Stop
Shift+F5
Step into/out
F11
or
Shift+F11
Step over
F10
Show hover
Ctrl+K,Ctrl+I

Integrated terminal

Show integrated terminal
Ctrl+`
Create new terminal
Ctrl+Shift+`
Copy selection
Ctrl+C
Paste into active terminal
Ctrl+V
Scroll up/down
Ctrl+Up
or
Ctrl+Down
Scroll page up/down
Shift+Pg Up
or
Shift+Pg Dn
Scroll to top/bottom
Ctrl+Home
or
Ctrl+End

Intro

VS Code on Windows uses Ctrl as its primary modifier. The shortcut set is the most-referenced version of VS Code shortcuts, VS Code's own documentation and most tutorials default to showing Windows/Ctrl shortcuts. If you've seen VS Code shortcuts written without a platform qualifier, they're almost certainly the Windows version.

Windows-specific shortcut notes

Command Palette. Ctrl+Shift+P opens the command palette. F1 is an alternative that also works and is the same across all platforms.

Word-by-word cursor movement. On Windows, Ctrl+Left and Ctrl+Right move the cursor one word at a time. This is standard Windows text navigation behavior. On Mac, the same operation uses Option+Left and Option+Right, one of the clearest differences between the two platforms in VS Code.

Multi-cursor on Windows. Adding a cursor at an arbitrary click position uses Alt+Click. Adding cursors above or below uses the Ctrl+Alt combination. The multi-cursor shortcuts use Alt where Mac uses Option.

F-key shortcuts. On Windows, F-keys work without a Fn modifier by default. F5 starts debugging. F9 toggles a breakpoint. These are convenient single-key actions available on Windows that require Fn+F-key on Mac unless keyboard settings are changed.

Quick open. Ctrl+P opens the file finder by name, one of the highest-frequency shortcuts for any editor workflow that involves navigating between files.

Integrated terminal. Ctrl+ opens and closes the integrated terminal. This is the same shortcut across all platforms, Ctrl+ on Windows, Mac, and Linux.

Menu bar. VS Code on Windows has a standard menu bar. Pressing Alt activates menu navigation, allowing keyboard access to all VS Code menu items and their submenus. This is Windows-standard behavior.

Printable PDF

The VS Code Windows shortcut list is available as a printable PDF. The debugger shortcuts (F5, F9, step controls) are grouped in the table, printing them alongside an active debugging session helps during the initial period of building those habits.

FAQ

Need more than shortcuts?
Visit the Visual Studio Code app page for an overview and helpful links.

Want to suggest a new app, report a bug, or get help? Email us at info@hkeys.app.

For anything else or just a quick hello, write to us at info@hkeys.app.