Skip to content

↑↓ moveEnter openEsc close

Visual Studio keyboard shortcuts

Visual Studio 2022 (17.14) · 55 shortcuts · checked Nov 2026 · Source: Microsoft docs

Visual Studio is Microsoft's IDE for .NET and C++ on Windows. These are the default General profile keys for building, debugging, refactoring and moving around a solution.

Most used Visual Studio keyboard shortcuts

The Visual Studio shortcuts worth learning first. The full list follows, grouped by task.

55 shortcuts
Keys:

Build and debug

11 shortcuts
ActionKeys
Build the solutionCtrlShiftB
Start debuggingF5
Start without debuggingCtrlF5
Stop debuggingShiftF5
Restart debuggingCtrlShiftF5
Toggle a breakpointF9
Step overF10
Step intoF11
Step outShiftF11
Run to the cursorCtrlF10
Apply Hot Reload changesDebuggingAltF10

Navigation

13 shortcuts
ActionKeys
Go to anything (files, types, members)CtrlTorCtrl,
Go to a lineCtrlG
Go to the definitionF12
Peek the definitionAltF12
Go to the implementationCtrlF12
Find all referencesShiftF12
Switch between open documentsCtrlTab
Close the documentCtrlF4
Toggle a bookmarkCtrlK,CtrlK
Next bookmarkCtrlK,CtrlN

Editing

19 shortcuts
ActionKeys
Quick actions and refactoringsCtrl.orAltEnter
RenameCtrlR,CtrlR
Extract methodCtrlR,CtrlM
Comment the selectionCtrlK,CtrlC
Uncomment the selectionCtrlK,CtrlU
Format the documentCtrlK,CtrlD
Format the selectionCtrlK,CtrlF
Duplicate the line or selectionCtrlD
Delete the lineCtrlShiftL
Move the line upAlt↑
Move the line downAlt↓
Add the next match to the selectionAltShift.
Select every matchAltShift;
Show IntelliSense completionsCtrlSpaceorCtrlJ
Show parameter infoCtrlShiftSpace
Surround with a snippetCtrlK,CtrlS
Insert a snippetCtrlK,CtrlX
Collapse or expand the blockCtrlM,CtrlM
Collapse or expand all blocksCtrlM,CtrlL

Search and windows

12 shortcuts
ActionKeys
FindCtrlF
ReplaceCtrlH
Find in filesCtrlShiftF
Replace in filesCtrlShiftH
Show Solution ExplorerCtrlAltL
Show the Error ListCtrl\,E
Show the Output windowCtrlAltO
Show the terminalCtrl`
Add a new itemCtrlShiftA
New projectCtrlShiftN
Save allCtrlShiftS
Full screenAltShiftEnter
Show the key map: which keys Visual Studio uses mostDarker orange = used by more shortcuts

Comment, format and collapse code in Visual Studio

Collapse to definitions
Ctrl+M, Ctrl+O folds every method to its signature; Ctrl+M, Ctrl+L expands or collapses everything.
Uppercase and lowercase
Ctrl+Shift+U makes the selection uppercase and Ctrl+U lowercase.
Remove unused usings
Ctrl+R, Ctrl+G removes and sorts using directives in the current file.

Build, run and debug shortcuts in Visual Studio

Continue
While stopped at a breakpoint, F5 continues to the next one.

IntelliSense, quick actions and refactoring in Visual Studio

GitHub Copilot
Tab accepts a grey Copilot suggestion; in recent Visual Studio 2022 versions, Alt+/ opens Copilot Chat inline in the editor.

Solution Explorer, terminal and project shortcuts in Visual Studio

New class
Shift+Alt+C adds a new class to the selected project; Ctrl+Shift+A offers every item type.

Change Visual Studio keyboard shortcuts and schemes

Change a shortcut
Tools > Options > Environment > Keyboard: find the command, click in Press shortcut keys, press the keys and choose Assign.
Use VS Code keys
The mapping scheme menu on the same page switches to the Visual Studio Code or Visual C# 2005 schemes. Reset puts the default keys back.

Visual Studio keyboard shortcuts: questions

How do I comment out code in Visual Studio?
Select the lines and press Ctrl+K then Ctrl+C. Ctrl+K then Ctrl+U removes the comment. Ctrl+K then Ctrl+/ toggles it.
Why are Visual Studio keyboard shortcuts not working?
Check Tools > Options > Environment > Keyboard for a changed mapping scheme, and that an extension (such as ReSharper) has not replaced the keys. Two-step shortcuts like Ctrl+K, Ctrl+C need both steps; the status bar shows when Visual Studio is waiting for the second.

These are the default key bindings in Microsoft Visual Studio 2022 (17.14), as published by Microsoft. Shortcuts that need an extension, an add-in or a changed keymap are left out. Where two combinations do the same thing, both are shown.

Each shortcut has its own page with the keys for every system, related shortcuts and the same action in other apps. The printable cheat sheet fits the whole list on one or two pages.