Featured image of post Visual Studio 2022 Keyboard Shortcuts [Windows]

Visual Studio 2022 Keyboard Shortcuts [Windows]

A guide to common Visual Studio 2022 shortcuts on Windows with the General profile, covering build, debugging, editing, search, and navigation.

Visual Studio 2022 keyboard shortcuts

This list uses the default General profile in Visual Studio 2022 for Windows. These shortcuts are different from Visual Studio for Mac and Visual Studio Code. Keyboard layout, selected profile, and custom mappings can change them.

We checked the previous list against Microsoft’s official defaults and corrected inaccurate bookmark, build, search, and replace shortcuts.

Help

ShortcutCommand
F1Open Help

Build and debug

ShortcutCommand
Ctrl+Shift+BBuild solution
F5Start/continue debugging
Ctrl+F5Start without debugging
F9Toggle breakpoint
Ctrl+F9Enable breakpoint
Ctrl+Shift+F9Delete all breakpoints
F10Step over
F11Step into
Shift+F11Step out

Code navigation

ShortcutCommand
F12Go to definition

Edit and navigate

ShortcutCommand
Ctrl+K, then Ctrl+CComment selection
Ctrl+K, then Ctrl+UUncomment selection

Find and replace

ShortcutCommand
Ctrl+FFind
Ctrl+HReplace
Ctrl+Shift+FFind in files
Ctrl+Shift+HReplace in files

Line navigation

ShortcutCommand
Ctrl+GGo to line

Edit and navigate

ShortcutCommand
Ctrl+LCut line
Ctrl+DDuplicate
Ctrl+Shift+VCycle clipboard ring

Code navigation

ShortcutCommand
Ctrl+]Go to matching brace
Ctrl+Shift+]Extend selection to matching brace
Alt+Up/Down ArrowMove selected lines up/down
Shift+Alt+Up/Down ArrowExtend column selection up/down

Tool windows and Git

ShortcutCommand
Ctrl+TabNext document window
Ctrl+Alt+LOpen Solution Explorer
Ctrl+Shift+EOpen Resource View
Ctrl+0, then Ctrl+GGo to Git Changes
Ctrl+0, then Ctrl+OGo to Git Commits

Bookmarks

ShortcutCommand
Ctrl+K, then Ctrl+KToggle bookmark
Ctrl+K, then Ctrl+NNext bookmark
Ctrl+K, then Ctrl+PPrevious bookmark
Ctrl+K, then Ctrl+LClear all bookmarks

Check or change a shortcut

In Visual Studio, open Tools > Options > Environment > Keyboard and search for a command to see its current shortcut in your profile. For chord shortcuts, press the keys in order, with a pause between the listed sequences. Keyboard layout and language settings can also affect key labels.

comments powered by Disqus