Default keyboard shortcuts of Visual Studio on Windows, in the General profile of Visual Studio 2022 and 2026. It covers Microsoft's Global list and the text editors: the code editor, the HTML, XML and T-SQL editors, and the diff and merge views; the context-specific lists for designers, diagrams, resource editors, database designers, Team Explorer and other tool windows are left out. Many bindings are two-step sequences: Ctrl + K, Ctrl + C is Ctrl + K, then Ctrl + C.
439 shortcuts in 26 sections.Checked row by row against Microsoft Learn on .Edited by Jay.
Search and navigation 14
Visual Studio 2026 made Ctrl + P a second key for Code Search (Go To All), next to Ctrl + T. Microsoft's list still shows Ctrl + P for Print as well; Tools > Options > Environment > Keyboard tells you what it runs in your version.
Action
Windows
Go To AllSearch and jump to any file, type, member, or symbol; Ctrl + P is the newest of the three keys.
Ctrl+TorCtrl+,orCtrl+P
Feature SearchOpens feature search; Microsoft added the key to match other code editors.
Ctrl+Shift+P
Quick LaunchSearch commands, options, recent items and open documents from one box.
Ctrl+Q
Quick Launch Previous CategoryInside the Quick Launch results, moves back to the preceding group of results.
Ctrl+Shift+Q
Solution Explorer SearchPuts the cursor in the search box of Solution Explorer, ready to filter the tree.
Ctrl+;
Window SearchJumps to the search box of the focused tool window; in the text editor the same key opens the navigate menu.
Alt+`
Go To LineJump to a specific line number.
Ctrl+G
Go To MemberOpens the Go To search filtered to members, for jumping to a method or property by name.
Ctrl+1thenCtrl+MorCtrl+1thenMorAlt+\
Go To RecentOpens the Go To search limited to recently visited files; press Ctrl + T, release, then R.
Ctrl+TthenR
Open File Under CursorOpens the document whose name the caret is on, without going through the Open dialog.
Ctrl+Shift+G
Navigate BackwardGo back to the previous cursor location; Ctrl + Shift + - goes forward.
Ctrl+-
Navigate ForwardReturns to the cursor location you just navigated back from.
Ctrl+Shift+-
BackwardA separate command from Navigate Backward on Ctrl + -; Microsoft notes the two act differently in the text editor.
Alt+Left
ForwardCounterpart of Backward; in the text editor, Alt + Right completes a word instead.
Alt+Right
Find and replace 17
Action
Windows
FindFind text in the current file.
Ctrl+F
ReplaceFind and replace text in the current file.
Ctrl+H
Find in FilesSearch text across the entire solution.
Ctrl+Shift+F
Replace in FilesReplace text across the entire solution.
Ctrl+Shift+H
Find NextJump to the next match; Shift + F3 goes to the previous one.
F3
Find PreviousJumps back to the match before the current one.
Shift+F3
Find Next SelectedSearch for the word or selection at the caret.
Ctrl+F3
Find Previous SelectedSearches backward for the word or selection at the caret.
Ctrl+Shift+F3
Stop SearchHalts a Find in Files operation that is still running; press Alt + F3, release, then S.
Alt+F3thenS
Incremental SearchSearches as you type, moving to the nearest match with each character; a text editor command.
Ctrl+I
Reverse Incremental SearchThe same type-to-search, but looking toward the top of the file.
Ctrl+Shift+I
Quick Find Next ResultWith focus in the Quick Find box, moves to the following match.
Enter
Quick Find Previous ResultWith focus in the Quick Find box, steps back one match.
Shift+Enter
Expand Quick Find Drop-DownOpens the list attached to the search field of Quick Find.
Alt+Down
Dismiss FindCloses the Quick Find box and returns to the editor.
Esc
Replace NextIn Quick Replace, swaps in the new text for the current match and moves on.
Alt+R
Replace AllIn Quick Replace, changes every match in one step.
Alt+A
Code navigation 26
Action
Windows
Go To DefinitionJump to the definition of the symbol at the caret.
F12
Go To DeclarationJump to the declaration of the symbol.
Ctrl+F12
Peek DefinitionShow the definition inline without leaving the file.
Alt+F12
Peek BackwardGoes back to the previous Peek Definition view when several are open.
Ctrl+Alt+-
Peek ForwardMoves ahead again through the Peek Definition views you have opened.
Ctrl+Alt+=
Find All ReferencesList everywhere the symbol is used.
Shift+F12
Quick Find SymbolRun a fast symbol search for the identifier at the caret.
Shift+Alt+F12
Find Symbol ResultsOpens the Find Symbol Results window, where symbol searches list their hits.
Ctrl+Alt+F12
Next LocationGo to the next item in the Error List or Output window.
F8
Previous LocationGo to the previous item in the Error List or Output window.
Shift+F8
Next ErrorMoves to the following error and shows where it is in the code.
Ctrl+Shift+F12
Browse NextMoves to the next definition, declaration or reference of an item in Object Browser or Class View.
Ctrl+Shift+1
Browse PreviousGoes back to the preceding definition, declaration or reference in Object Browser or Class View.
Ctrl+Shift+2
Forward Browse ContextMoves forward again in the Go To Definition stack after going back with Ctrl + Shift + 8.
Ctrl+Shift+7
Pop Browse ContextGoes back one step in the Go To Definition stack; Microsoft marks it as C++ only.
Ctrl+Shift+8
View Call HierarchyShows calls to and from the member at the caret in the Call Hierarchy window.
Ctrl+KthenCtrl+TorCtrl+KthenT
Toggle Header Code FileSwitches between a C++ header and its matching source file; the second key is the letter O.
Ctrl+KthenCtrl+O
Next Highlighted ReferenceMoves the caret to the following highlighted occurrence of the symbol it is on.
Ctrl+Shift+Down
Previous Highlighted ReferenceMoves the caret back to the preceding highlighted occurrence of the symbol.
Ctrl+Shift+Up
Next Issue in FileJumps to the following error, warning or suggestion marked in the open document.
Alt+Page Down
Previous Issue in FileJumps back to the issue marked before the caret in the open document.
Alt+Page Up
Show Navigate MenuOpens a menu of navigation targets for the symbol at the caret.
Alt+`
Show CodeLens MenuOpens the CodeLens menu for the code element the caret is in, without the mouse.
Ctrl+KthenCtrl+`
Go To Enclosing BlockJumps the caret out to the code block surrounding its position.
Ctrl+Alt+Up
Move to Navigation BarMoves focus to the drop-down bar above the code that lists types and members.
Ctrl+F2
Show on Code MapAdds the code element at the caret to a code map; a code-window context-menu command.
Ctrl+`
Bookmarks 8
Action
Windows
Toggle BookmarkAdd or remove a bookmark on the current line.
Ctrl+KthenCtrl+K
Next BookmarkMoves the caret on to the following bookmarked line.
Ctrl+KthenCtrl+N
Previous BookmarkMoves the caret back to the bookmarked line before it.
Ctrl+KthenCtrl+P
Next Bookmark in FolderLike Next Bookmark, but stays inside the current folder of the Bookmarks window.
Ctrl+Shift+KthenCtrl+Shift+N
Previous Bookmark in FolderGoes backward through the bookmarks of the current Bookmarks-window folder only.
Ctrl+Shift+KthenCtrl+Shift+P
Clear BookmarksRemoves every bookmark in all open documents at once.
Ctrl+KthenCtrl+L
Bookmark WindowOpens the Bookmarks tool window, the list of all bookmarks you have set.
Ctrl+KthenCtrl+W
Toggle Task List ShortcutSets or clears a Task List shortcut on the line the caret is on.
Ctrl+KthenCtrl+H
Editing 36
Action
Windows
CopyPuts a duplicate of the selection on the clipboard.
Ctrl+CorCtrl+Insert
CutDeletes the selection from the document and places it on the clipboard.
Ctrl+XorShift+Delete
PasteInserts the clipboard contents at the caret.
Ctrl+VorShift+Insert
Cycle Clipboard RingPastes from the clipboard history; pressing it again steps to an earlier copied item.
Ctrl+Shift+VorCtrl+Shift+Insert
DeleteRemoves the selected item; in an editor, the character to the right of the caret.
Delete
DuplicateCopies the current line, or the selected text, and inserts it right after.
Ctrl+D
UndoTakes back the latest edit, and each further press steps one edit further back.
Ctrl+ZorAlt+Backspace
RedoReapplies the edit that Undo just reversed.
Ctrl+YorCtrl+Shift+ZorShift+Alt+Backspace
Select AllSelects everything in the active document or list.
Ctrl+A
Break LineStarts a new line at the caret in the text editor.
EnterorShift+Enter
Insert TabIndents at the caret, or indents every selected line by one level.
Tab
Tab LeftRemoves one level of indentation from the selected lines.
Shift+Tab
Delete BackwardsErases the character to the left of the caret.
BackspaceorShift+Backspace
Word Delete to EndErases from the caret to the last letter of the word.
Ctrl+Delete
Word Delete to StartErases from the caret back to the first letter of the word.
Ctrl+Backspace
Delete Horizontal White SpaceCollapses the spaces and tabs around the caret, or within the selection.
Ctrl+KthenCtrl+\
Line CutCuts every selected line to the clipboard, or just the caret's line when nothing is selected.
Ctrl+L
Line DeleteDeletes the selected lines, or the caret's line, without copying them to the clipboard.
Ctrl+Shift+L
Line Open AboveInsert a blank line above the current one.
Ctrl+Enter
Line Open BelowInserts a blank line under the current one and moves the caret there.
Ctrl+Shift+Enter
Line TransposeSwaps the current line with the one below it.
Shift+Alt+T
Word TransposeExchanges the word before the caret with the word after it.
Ctrl+Shift+T
Move Selected Lines DownShifts the current line, or every line in the selection, one place lower.
Alt+Down
Move Selected Lines UpShifts the current line, or every line in the selection, one place higher.
Alt+Up
Make LowercaseConverts the selected text to small letters.
Ctrl+U
Make UppercaseConverts the selected text to capital letters.
Ctrl+Shift+U
Overtype ModeSwitches between inserting text and typing over existing characters.
Insert
Toggle Word WrapTurns wrapping of long lines on or off in the editor.
Ctrl+EthenCtrl+W
View White SpaceShows or hides markers for spaces and tabs.
Ctrl+RthenCtrl+W
Comment SelectionTurns the selected lines into comments using the language's comment syntax.
Ctrl+KthenCtrl+C
Uncomment SelectionRemoves the comment markers from the selected lines.
Ctrl+KthenCtrl+U
Toggle Line CommentComments or uncomments the current line; the single chord Ctrl + / needs Visual Studio 2022 17.11 or later.
Ctrl+/orCtrl+KthenCtrl+/
Format DocumentReformat the whole document to the code style rules.
Ctrl+KthenCtrl+D
Format SelectionApplies the indentation and spacing rules of the language to the highlighted lines only, not the whole document.
Ctrl+KthenCtrl+F
Execute in InteractiveSends the selected code to the Interactive window and runs it.
Alt+Enter
Execute Line in InteractiveRuns just the line the caret is on in the Interactive window.
Alt+'
Code completion and snippets 16
Action
Windows
Complete WordTrigger IntelliSense completion at the caret.
Ctrl+SpaceorAlt+Right
List MembersShows the IntelliSense completion list for the type or namespace at the caret.
Ctrl+J
Parameter InfoShow the parameters of the method being called.
Ctrl+Shift+Space
Quick InfoShows a tooltip with the full declaration of the identifier at the caret.
Ctrl+KthenCtrl+I
Toggle Completion ModeSwitches IntelliSense between its normal behaviour and suggestion mode.
Ctrl+Alt+Space
Copy Parameter TipPuts the text of the IntelliSense parameter tooltip on the clipboard.
Ctrl+Shift+Alt+C
Paste Parameter TipInserts the parameter text taken with Copy Parameter Tip at the caret.
Ctrl+Shift+Alt+P
Increase Filter LevelSwitches an open IntelliSense list from its Common tab to the All tab; a Visual Basic feature.
Alt+.
Decrease Filter LevelSwitches an open IntelliSense list from its All tab back to Common; a Visual Basic feature.
Alt+,
Accept SuggestionWith a Copilot inline suggestion showing, inserts all of it; the key is remappable under the Inline Suggestion Active scope.
Tab
Accept Next WordWith a Copilot suggestion showing, takes just its next word rather than the whole text.
Ctrl+Right
Accept Next LineWith a Copilot suggestion showing, takes just its next line rather than the whole text.
Ctrl+Down
Paste With CopilotPastes the clipboard and at once shows a Copilot-adjusted version to accept or dismiss.
Shift+Alt+V
Insert SnippetOpens the snippet picker at the cursor, where a code template is chosen by folder and name.
Ctrl+KthenCtrl+X
Code Snippets ManagerOpens the dialog for adding, removing and browsing snippet folders.
Ctrl+KthenCtrl+B
Generate MethodCreates a stub for a method that is called but does not exist yet.
Ctrl+KthenCtrl+M
Refactoring 8
Action
Windows
RenameRename the symbol and update every reference.
Ctrl+RthenCtrl+R
Extract MethodTurn the selected code into a new method.
Ctrl+RthenCtrl+M
Extract InterfaceCreate an interface from the members of a class.
Ctrl+RthenCtrl+I
Encapsulate FieldWrap a field in a property.
Ctrl+RthenCtrl+E
Remove ParametersDeletes parameters from a method and updates the calls to it.
Ctrl+RthenCtrl+V
Reorder ParametersChange the order of a method's parameters everywhere.
Ctrl+RthenCtrl+O
Quick ActionsShow refactorings and code fixes for the caret position; Microsoft's list names the command Show smart tag.
Ctrl+.orShift+Alt+F10
Remove and Sort UsingsRemove unused using directives and sort the rest.
Ctrl+RthenCtrl+G
Moving the caret 17
A key that is bound both globally and in an editor runs the editor command while that editor has focus: Ctrl + Down scrolls the text editor, yet moves a control in a designer.
Action
Windows
Char LeftMoves the caret one character toward the start of the line.
Left
Char RightMoves the caret one character toward the end of the line.
Right
Word PreviousMoves the caret back to the start of the word on its left.
Ctrl+Left
Word NextMoves the caret ahead to the start of the word on its right.
Ctrl+Right
Line UpMoves the caret straight up by one row of text.
Up
Line DownMoves the caret straight down by one row of text.
Down
Line StartMoves the caret to the beginning of the line it is on.
Home
Line EndMoves the caret past the last character of the line it is on.
End
Document StartMoves the caret to the very top of the file.
Ctrl+Home
Document EndMoves the caret to the very bottom of the file.
Ctrl+End
Page UpScrolls one screen toward the top and takes the caret along.
Page Up
Page DownScrolls one screen toward the bottom and takes the caret along.
Page Down
View TopMoves the caret to the first line visible in the editor window.
Ctrl+Page Up
View BottomMoves the caret to the last line visible in the editor window.
Ctrl+Page Down
Scroll Line UpScrolls the editor by a single line toward the top of the file.
Ctrl+Up
Scroll Line DownScrolls the editor by a single line toward the bottom of the file.
Ctrl+Down
Go To BraceJumps between a brace, bracket or parenthesis and its matching partner.
Ctrl+]
Selecting text 21
Action
Windows
Char Left ExtendGrows the selection by one character toward the start of the line.
Shift+Left
Char Right ExtendGrows the selection by one character toward the end of the line.
Shift+Right
Word Previous ExtendSelects back to the start of the word on the caret's left.
Ctrl+Shift+Left
Word Next ExtendSelects ahead to the start of the word on the caret's right.
Ctrl+Shift+Right
Line Up ExtendCarries the selection to the same column one row higher.
Shift+Up
Line Down ExtendCarries the selection to the same column one row lower.
Shift+Down
Line Start ExtendSelects from the caret back to the beginning of the line.
Shift+Home
Line End ExtendSelects from the caret to the last character of the line.
Shift+End
Document Start ExtendSelects everything from the caret up to the top of the file.
Ctrl+Shift+Home
Document End ExtendSelects everything from the caret down to the bottom of the file.
Ctrl+Shift+End
Page Up ExtendSelects one screen of text upward from the caret.
Shift+Page Up
Page Down ExtendSelects one screen of text downward from the caret.
Shift+Page Down
View Top ExtendSelects from the caret to the first line visible in the window.
Ctrl+Shift+Page Up
View Bottom ExtendSelects from the caret to the last line visible in the window.
Ctrl+Shift+Page Down
Go To Brace ExtendSelects everything between the caret and the matching brace or bracket.
Ctrl+Shift+]
Expand SelectionWidens the selection to the next larger syntax element, such as the enclosing expression or block.
Shift+Alt+=
Contract SelectionShrinks the selection by one step, undoing the last Expand Selection.
Shift+Alt+-
Select Containing BlockJumps the selection straight out to the code block that contains it.
Shift+Alt+]
Select to Go-Back LocationSelects from the caret to the place that Navigate Backward (Ctrl + -) would return to.
Ctrl+=
Swap AnchorMoves the caret to the opposite end of the selection so the other end can be adjusted.
Ctrl+KthenCtrl+A
Selection CancelClears the selection and leaves the caret in place.
Esc
Column selection and multiple carets 12
Action
Windows
Char Left Extend ColumnMoves the edge of a box selection one character to the left.
Shift+Alt+Left
Char Right Extend ColumnMoves the edge of a box selection one character to the right.
Shift+Alt+Right
Line Up Extend ColumnStretches a box selection one line upward, keeping its columns.
Shift+Alt+Up
Line Down Extend ColumnStretches a box selection one line downward, keeping its columns.
Shift+Alt+Down
Line Start Extend ColumnTakes a box selection back to the beginning of the lines it covers.
Shift+Alt+Home
Line End Extend ColumnTakes a box selection out to the end of the lines it covers.
Shift+Alt+End
Word Previous Extend ColumnMoves the edge of a box selection one whole word to the left.
Ctrl+Shift+Alt+Left
Word Next Extend ColumnMoves the edge of a box selection one whole word to the right.
Ctrl+Shift+Alt+Right
Insert Next Matching CaretAdds a caret at the following occurrence of the selected text and selects it too.
Shift+Alt+.
Carets at All MatchesSelects every occurrence of the selected text and puts a caret on each.
Shift+Alt+;
Add Caret With MousePlaces an extra insertion point wherever you click, for typing in several places at once.
Ctrl+Alt+Click
Block Selection With MouseDragging with Alt held selects a rectangle of text instead of whole lines.
Alt+Drag
Outlining 11
Action
Windows
Toggle OutliningExpand or collapse the region at the caret.
Ctrl+MthenCtrl+M
Toggle All OutliningCollapses every region in the file, or expands them all again.
Ctrl+MthenCtrl+L
Collapse to DefinitionsCollapse all members to their signatures.
Ctrl+MthenCtrl+O
Collapse All OutliningFolds all regions so that only the outermost groups of the file stay visible.
Ctrl+MthenCtrl+A
Expand All OutliningUnfolds every collapsed region in the document.
Ctrl+MthenCtrl+X
Collapse Current RegionFolds only the block that contains the caret.
Ctrl+MthenCtrl+S
Expand Current RegionUnfolds only the block that contains the caret.
Ctrl+MthenCtrl+E
Collapse TagFolds the selected HTML tag down to an ellipsis.
Ctrl+MthenCtrl+T
Hide SelectionCollapses the selected text into an outlining region of its own.
Ctrl+MthenCtrl+H
Stop Hiding CurrentRemoves the custom region made with Hide Selection around the caret.
Ctrl+MthenCtrl+U
Stop OutliningRemoves all outlining from the document until it is switched back on.
Ctrl+MthenCtrl+P
Build 5
Action
Windows
Build SolutionBuilds all projects in the solution, compiling only what has changed.
Ctrl+Shift+B
Build SelectionBuilds only the project that is selected, together with what it depends on; a Visual Studio 2019 key per Microsoft.
Ctrl+B
CompileCompiles the single source file in the editor rather than the whole project.
Ctrl+F7
Cancel BuildStops the build that is running; Break is the Pause/Break key.
Ctrl+Break
Run Code AnalysisRuns the code analyzers over every project in the solution and lists what they find.
Alt+F11
Debugging 21
Action
Windows
Start DebuggingRun the app with the debugger attached.
F5
Start Without DebuggingRun the app without the debugger.
Ctrl+F5
Stop DebuggingEnds the debug session and returns the IDE to its editing layout; a program launched by the debugger is closed.
Shift+F5
RestartStops the running debug session and starts the program again under the debugger in one step.
Ctrl+Shift+F5
Break AllPauses every process the debugger is attached to.
Ctrl+Alt+Break
Attach to ProcessOpens the dialog for debugging a program that is already running.
Ctrl+Alt+P
Reattach to ProcessAttaches again to the program you last attached to, skipping the dialog.
Shift+Alt+P
Apply Code ChangesApplies edits made while debugging to the running program without restarting it.
Alt+F10
Step OverRuns the current line and stops at the next; pressed outside a session, it starts debugging and pauses on your first line.
F10
Step IntoStep into the method call on the current line.
F11
Step OutRun until the current method returns.
Shift+F11
Step Into SpecificLets you choose which of the calls on the current line to enter.
Shift+Alt+F11
Step Into Current ProcessEnters the next call in the active process only, for sessions debugging several programs.
Ctrl+Alt+F11
Step Over Current ProcessAdvances one statement in the active process only when several are being debugged.
Ctrl+Alt+F10
Step Out Current ProcessFinishes the function in the active process only, for multi-process sessions.
Ctrl+Shift+Alt+F11
Run to CursorContinue execution until the line at the caret.
Ctrl+F10
Set Next StatementMove the execution point to the current line.
Ctrl+Shift+F10
Show Next StatementScrolls to the line that will run next; the key is * on the numeric keypad.
Alt+Num *
Toggle DisassemblySwitches between source code and its machine instructions at the current location.
Ctrl+F11
Previous IntelliTrace Call or EventSteps back through recorded history to the call or event before the current one.
Ctrl+Shift+F11
Refresh Windows AppReloads the Windows app that is running under the debugger.
Ctrl+Shift+R
Breakpoints 12
Action
Windows
Toggle BreakpointAdd or remove a breakpoint on the current line.
F9
Enable BreakpointTurns the breakpoint on the current line off or back on without deleting it.
Ctrl+F9
Delete All BreakpointsRemove every breakpoint in the solution.
Ctrl+Shift+F9
Function BreakpointOpens the New Function Breakpoint dialog to break by function name; Visual Studio 2017 used Ctrl + B.
Ctrl+KthenB
Breakpoints WindowOpen the window listing all breakpoints.
Ctrl+Alt+B
Breakpoint ConditionsOpens the condition settings of the breakpoint on the current line; press Alt + F9, then C.
Alt+F9thenC
Edit Breakpoint LabelsOpens the label editor for the breakpoint on the current line.
Alt+F9thenL
Insert Temporary BreakpointSets a breakpoint that removes itself the first time it is hit.
Shift+Alt+F9thenT
Delete BreakpointA Breakpoints window command that removes the breakpoint selected in the list.
Alt+F9thenD
Go To DisassemblyFrom the Breakpoints window, shows the selected breakpoint's location in the Disassembly view.
Alt+F9thenA
Go To Source CodeFrom the Breakpoints window, opens the file at the selected breakpoint.
Alt+F9thenS
Exception SettingsOpens the window where you choose which exception types make the debugger break.
Ctrl+Alt+E
Debugger windows 33
Action
Windows
Immediate WindowOpen the Immediate window to evaluate expressions.
Ctrl+Alt+I
Quick WatchInspect the value of the expression at the caret.
Shift+F9orCtrl+Alt+Q
AutosOpens the Autos window, which shows the variables used around the current statement.
Ctrl+Alt+VthenA
LocalsOpens the Locals window with the variables of the current scope.
Ctrl+Alt+VthenL
Watch 1Opens the first of four Watch windows, each a separate list of expressions to monitor.
Ctrl+Alt+Wthen1
Watch 2Opens the second Watch window with its own list of expressions.
Ctrl+Alt+Wthen2
Watch 3Opens the third Watch window, another independent list.
Ctrl+Alt+Wthen3
Watch 4Opens the fourth and last Watch window.
Ctrl+Alt+Wthen4
Call StackOpens the window listing the chain of calls that led to the current statement.
Ctrl+Alt+C
ThreadsOpens the Threads window for inspecting and switching between threads.
Ctrl+Alt+H
ModulesOpens the list of DLLs and executables the program has loaded.
Ctrl+Alt+U
ProcessesOpens the list of every process the debugger is attached to.
Ctrl+Alt+Z
Memory 1Opens the first of four Memory windows, for large buffers and strings that Watch shows poorly.
Ctrl+Alt+Mthen1
Memory 2Opens the second Memory window, so two address ranges can be watched.
Ctrl+Alt+Mthen2
Memory 3Shows the third of four Memory windows, each of which can display a different address range while debugging.
Ctrl+Alt+Mthen3
Memory 4Opens the fourth and last Memory window.
Ctrl+Alt+Mthen4
RegistersOpens the Registers window showing the contents of the processor registers.
Ctrl+Alt+G
DisassemblyOpens the Disassembly window with the machine instructions behind the current code.
Ctrl+Alt+D
Parallel StacksOpens a combined diagram of the call stacks of all threads.
Ctrl+Shift+DthenS
Parallel Watch 1Opens the first of four windows that evaluate one expression across all threads.
Ctrl+Shift+Dthen1
Parallel Watch 2Opens the second cross-thread watch window.
Ctrl+Shift+Dthen2
Parallel Watch 3Opens the third cross-thread watch window.
Ctrl+Shift+Dthen3
Parallel Watch 4Opens the fourth and last cross-thread watch window.
Ctrl+Shift+Dthen4
TasksOpens the Tasks window listing the program's tasks; the sequence ends with K.
Ctrl+Shift+DthenK
IntelliTrace CallsOpens the calls view of IntelliTrace.
Ctrl+Alt+YthenT
IntelliTrace EventsOpens the events view of IntelliTrace.
Ctrl+Alt+YthenF
JavaScript ConsoleOpens the console window used while debugging script.
Ctrl+Alt+VthenC
DOM ExplorerOpens the tool for inspecting the elements of a running page.
Ctrl+Alt+VthenD
Process BoxMoves focus to the Process list on the Debug Location toolbar.
Ctrl+5
Thread BoxMoves focus to the Thread list on the Debug Location toolbar.
Ctrl+6
Stack Frame BoxMoves focus to the Stack Frame list on the Debug Location toolbar.
Ctrl+7
Flag Current ThreadFlags or unflags the thread shown on the Debug Location toolbar.
Ctrl+8
Toggle Flagged ThreadsA Debug Location toolbar switch that limits the lists to flagged threads.
Ctrl+9
Profiling and diagnostics 9
Action
Windows
Launch Diagnostics HubOpens the diagnostics hub, the start page of the performance profiling tools.
Alt+F2
Stop CollectionEnds the data gathering of a running Diagnostics Hub session.
Ctrl+Alt+F2
Start Graphics DiagnosticsStarts the app under Graphics Diagnostics, the Direct3D debugging tools.
Alt+F5
Stop Performance AnalysisEnds the profiling run that is in progress.
Shift+Alt+F2
Windows Phone App AnalysisStarts the monitoring and profiling tool for Windows Phone application projects.
Alt+F1
Navigate Backward (Analyze)An Analyze-group command with its own key; the View command of that name uses Ctrl + -.
Shift+Alt+3
Navigate Forward (Analyze)Analyze-group counterpart; the View command of that name is on Ctrl + Shift + -.
Shift+Alt+4
Force GCForces a garbage collection; the four-key chord has to be pressed twice in a row.
Ctrl+Shift+Alt+F12thenCtrl+Shift+Alt+F12
Call Stack Code MapDraws the current call stack as a code map while debugging.
Ctrl+Shift+`
Testing 12
Action
Windows
Test ExplorerOpens the window that lists the unit tests of the solution, where they are run and their results shown.
Ctrl+EthenT
Run All TestsRuns every test in the solution; the second key is A with Ctrl released.
Ctrl+RthenA
Debug All TestsRuns every test under the debugger; here Ctrl stays down for the A.
Ctrl+RthenCtrl+A
Run Tests in ContextRuns the tests that belong to the method, class or namespace at the caret.
Ctrl+RthenT
Debug Tests in ContextDebugs the tests for the method, class or namespace at the caret.
Ctrl+RthenCtrl+T
Repeat Last RunExecutes again the set of tests that ran most recently.
Ctrl+RthenL
Debug Last RunStarts the debugger on the tests from the most recent test session.
Ctrl+RthenD
Live Unit Testing WindowShows the Live Unit Testing tab, where results update while you edit.
Ctrl+EthenL
Code Coverage ResultsOpens the window that shows which lines the last coverage run exercised.
Ctrl+EthenC
Coded UI Test BuilderStarts the recorder used to build a coded UI test.
Ctrl+\thenCtrl+C
Use Existing Action RecordingGenerates a coded UI test from an action recording made earlier.
Ctrl+\thenCtrl+A
Jump to Counter PaneA load-test command that moves focus to the counters pane.
Ctrl+RthenQ
Files and projects 23
Action
Windows
New FileOpens the dialog for creating a single document.
Ctrl+N
New ProjectOpens the dialog for creating a project from a template.
Ctrl+Shift+N
New Web SiteOpens the dialog that creates a web site instead of a regular project.
Shift+Alt+N
Open FileOpens the standard dialog for choosing documents; the key is the letter O.
Ctrl+O
Open ProjectLoads a project or solution through its own Open dialog.
Ctrl+Shift+O
Open Web SiteOpens the dialog for loading an existing web site.
Shift+Alt+O
SaveSaves the active document, or the items selected in Solution Explorer.
Ctrl+S
Save AllWrites every modified file to disk, including the project and solution files, not only the active document.
Ctrl+Shift+S
PrintSends the active document to the Print dialog.
Ctrl+P
ExitCloses the IDE and asks first whether to save files with unsaved changes.
Alt+F4
View in BrowserShows the file selected in Solution Explorer, or the one being edited, in a web browser.
Ctrl+Shift+W
Add New ItemOpens the dialog for adding a file from a template to the selected project.
Ctrl+Shift+A
Add Existing ItemAdds files that are already on disk to the selected project.
Shift+Alt+A
Class WizardOpens the Class Wizard, a tool of C++ projects.
Ctrl+Shift+X
OverrideLets a derived class override a method of its base class.
Ctrl+Alt+Insert
Preview ChangesWeb publishing command that compares the selected files with the published copies.
Alt+;thenAlt+C
Publish Selected FilesPublishes just the files selected in Solution Explorer to the web server.
Alt+;thenAlt+P
Replace Files From ServerOverwrites the selected local files with the copies on the web server.
Alt+;thenAlt+R
Move Item DownA project-item context-menu command for changing the order of items in the list.
Alt+Down
Move Item UpCounterpart of Move Item Down that raises the selected project item one place.
Alt+Up
PropertiesOpens the properties of the selected item; the command sits on the Class View context menus.
Alt+Enter
Property PagesOpens the property pages dialog of the selected project or item.
Shift+F4
Edit LabelPuts the name of the selected item into edit mode so it can be retyped.
F2
Tool windows 27
Sequences such as Ctrl + \, E and Ctrl + [, S rely on punctuation keys, and Microsoft warns that shortcuts can differ with the keyboard layout and language settings.
Action
Windows
Solution ExplorerShows or focuses the tree of projects, folders and files that make up the open solution.
Ctrl+Alt+L
Open Files FilterLimits Solution Explorer to the files that are open in the editor; the second key is the letter O.
Ctrl+[thenOorCtrl+[thenCtrl+O
Pending Changes FilterLimits Solution Explorer to files with uncommitted changes.
Ctrl+[thenPorCtrl+[thenCtrl+P
Sync With Active DocumentSelects the file of the document being edited in the Solution Explorer tree.
Ctrl+[thenSorCtrl+[thenCtrl+S
Properties WindowShows the pane with the settings of the selected item.
F4
Output WindowShows the pane where build, debug and other tool messages are logged.
Ctrl+Alt+O
Error ListShows the window listing build errors, warnings and messages; double-clicking an entry jumps to its line of code.
Ctrl+\thenEorCtrl+\thenCtrl+E
ToolboxShows the pane of controls and components that can be dragged onto a designer surface.
Ctrl+Alt+X
Class ViewOpens a tree of the namespaces and types in the solution.
Ctrl+Shift+C
Class View Search BoxMoves focus to the search field of the Class View window.
Ctrl+KthenCtrl+V
Object BrowserOpens the browser for exploring types in projects and referenced assemblies.
Ctrl+Alt+J
Object Browser Search BoxMoves focus to the search field of the Object Browser.
Ctrl+KthenCtrl+R
Code Definition WindowOpens the pane that keeps showing the definition of the symbol at the caret.
Ctrl+\thenDorCtrl+\thenCtrl+D
Command WindowOpens the pane where Visual Studio commands are typed by name.
Ctrl+Alt+A
Data SourcesOpens the Data Sources window of the project.
Shift+Alt+D
Document OutlineOpens a structural tree of the open document.
Ctrl+Alt+T
F# InteractiveOpens the F# Interactive window for running F# code.
Ctrl+Alt+F
NotificationsOpens the Notifications window; a sequence, Ctrl + W and then N.
Ctrl+WthenNorCtrl+WthenCtrl+N
Resource ViewOpens the Resource View window used by C++ projects.
Ctrl+Shift+E
Server ExplorerOpens the window for browsing data connections and servers.
Ctrl+Alt+S
SQL Server Object ExplorerOpens the tree of SQL Server instances and their databases.
Ctrl+\thenCtrl+S
Task ListOpens the Task List window with TODO comments and user tasks.
Ctrl+\thenTorCtrl+\thenCtrl+T
UML Model ExplorerOpens the UML Model Explorer window.
Ctrl+\thenCtrl+U
Architecture Explorer
Ctrl+\thenCtrl+R
Web BrowserOpens the browser window built into Visual Studio.
Ctrl+Alt+R
Call HierarchyBrings up the Call Hierarchy tool window itself.
Ctrl+Alt+K
All Windows
Shift+Alt+M
Window management 28
In the Visual C# profile Ctrl + W is not assigned to closing the document tab; it can be mapped under Tools > Options > Environment > Keyboard.
Action
Windows
Close DocumentCloses the active document tab; the C# profile does not assign Ctrl + W.
Ctrl+WorCtrl+F4
Switch DocumentsOpens the IDE Navigator, a pop-up list of open files and tool windows, and moves through it while held.
Ctrl+Tab
Switch Documents BackwardOpens the IDE Navigator and moves through the open files in reverse.
Ctrl+Shift+Tab
Next Document WindowGoes straight to the following open file without showing the IDE Navigator.
Ctrl+F6
Previous Document WindowGoes straight to the preceding open file without showing the IDE Navigator.
Ctrl+Shift+F6
Next TabActivates the following tab in the document well; inside the text editor, Ctrl + Page Down is View Bottom instead.
Ctrl+Alt+Page DownorCtrl+Page Down
Previous TabActivates the preceding tab in the document well; inside the text editor, Ctrl + Page Up is View Top instead.
Ctrl+Alt+Page UporCtrl+Page Up
Add Next Tab to SelectionExtends a multi-tab selection to include the one on the right.
Ctrl+Shift+Alt+Page Down
Add Previous Tab to SelectionExtends a multi-tab selection to include the one on the left.
Ctrl+Shift+Alt+Page Up
Add Tab to SelectionPuts the active tab into a multi-tab group without leaving it.
Ctrl+Shift+Alt+Space
Keep Tab OpenTurns a preview tab, or a Peek Definition view, into a regular tab that stays open.
Ctrl+Alt+Home
Activate Document WindowReturns focus from a tool window to the file you were editing.
Esc
Close Tool WindowCloses whichever docked or floating pane currently has focus.
Shift+Esc
Next PaneMoves to the following pane of the current tool window or document.
Alt+F6
Previous PaneMoves to the preceding pane of the current tool window or document.
Shift+Alt+F6
Next Split PaneMoves to the other half of a split editor window.
F6
Previous Split PaneMoves back to the preceding half of a split editor window.
Shift+F6
Switch Tool WindowsOpens the IDE Navigator on its list of tool windows and steps forward through it.
Alt+F7
Switch Tool Windows BackwardSteps through the IDE Navigator's list of tool windows in the opposite direction.
Shift+Alt+F7
Show Dock MenuOpens the menu with Float, Dock, Auto Hide and similar choices for the active window.
Alt+-
Show Open File ListDrops down the list of open documents at the edge of the tab well.
Ctrl+Alt+Down
Full ScreenHides the title bar and tool windows so the editor fills the screen; the same shortcut restores the layout.
Shift+Alt+Enter
Zoom InEnlarges the text in the editor by one step.
Ctrl+Shift+.
Zoom OutShrinks the text in the editor by one step.
Ctrl+Shift+,
View CodeSwitches from a designer to the code behind it.
F7
View DesignerSwitches from the code file to its visual designer.
Shift+F7
Maximize Floating WindowDouble-clicking the title bar of a floating window enlarges it to fill the screen.
Double-click
Redock Floating WindowSends a floating window back to the place where it was last docked.
Ctrl+Double-click
Git and Team Explorer 15
Action
Windows
Go To Git ChangesOpens the Git Changes window for staging and committing; the first key is Ctrl with the digit zero.
Ctrl+0thenCtrl+GorCtrl+0thenG
Go To Git BranchesJumps to the branch list of the Git tooling.
Ctrl+0thenCtrl+NorCtrl+0thenN
Go To Git CommitsJumps to the Git commits page; the last key is the letter O.
Ctrl+0thenCtrl+OorCtrl+0thenO
Team ExplorerOpens the Team Explorer window itself.
Ctrl+\thenCtrl+M
Team Explorer SearchPuts the cursor in the search box of Team Explorer.
Ctrl+'
Go To HomeShows the Home page of Team Explorer.
Ctrl+0thenCtrl+HorCtrl+0thenH
Go To ConnectShows the Connect page of Team Explorer, where a server or repository is chosen.
Ctrl+0thenCtrl+CorCtrl+0thenC
Go To Pending ChangesShows the Pending Changes page of Team Explorer.
Ctrl+0thenCtrl+PorCtrl+0thenP
Go To My WorkShows the My Work page of Team Explorer.
Ctrl+0thenCtrl+MorCtrl+0thenM
Go To BuildsShows the Builds page of Team Explorer.
Ctrl+0thenCtrl+BorCtrl+0thenB
Go To Work ItemsNow opens work items in the web portal; the page inside Visual Studio is deprecated.
Ctrl+0thenCtrl+WorCtrl+0thenW
Go To ReportsShows the Reports page of Team Explorer.
Ctrl+0thenCtrl+RorCtrl+0thenR
Go To DocumentsShows the Documents page of Team Explorer.
Ctrl+0thenCtrl+DorCtrl+0thenD
Go To SettingsShows the Settings page of Team Explorer.
Ctrl+0thenCtrl+SorCtrl+0thenS
Go To Web AccessOpens the web portal of the connected team project.
Ctrl+0thenCtrl+AorCtrl+0thenA
Designer controls 20
Action
Windows
Move Control Down GridMoves the selected control down on the design surface, by the grid step.
Down
Move Control DownMoves the selected control down on the design surface without snapping to the grid.
Ctrl+Down
Move Control Left GridMoves the selected control left on the design surface, by the grid step.
Left
Move Control LeftMoves the selected control left on the design surface without snapping to the grid.
Ctrl+Left
Move Control Right GridMoves the selected control right on the design surface, by the grid step.
Right
Move Control RightMoves the selected control right on the design surface without snapping to the grid.
Ctrl+Right
Move Control Up GridMoves the selected control up on the design surface, by the grid step.
Up
Move Control UpMoves the selected control up on the design surface without snapping to the grid.
Ctrl+Up
Size Control Down GridResizes the selected control downward by the grid step.
Shift+Down
Size Control DownResizes the selected control downward without snapping to the grid.
Ctrl+Shift+Down
Size Control Left GridResizes the selected control leftward by the grid step.
Shift+Left
Size Control LeftResizes the selected control leftward without snapping to the grid.
Ctrl+Shift+Left
Size Control Right GridResizes the selected control rightward by the grid step.
Shift+Right
Size Control RightResizes the selected control rightward without snapping to the grid.
Ctrl+Shift+Right
Size Control Up GridResizes the selected control upward by the grid step.
Shift+Up
Size Control UpResizes the selected control upward without snapping to the grid.
Ctrl+Shift+Up
Select Next ControlMoves the selection to the following control on the design surface, in tab order.
Tab
Select Previous ControlMoves the selection back to the preceding control on the design surface.
Shift+Tab
Show Tile GridTurns on the display of the grid on a design surface.
Enter
Add New DiagramA context-menu command of the entity data model designer; the key is Insert on its own.
Insert
HTML and XML editors 7
Action
Windows
Go To ControllerWorks in the HTML editor and its Source view; in code windows the same keys run Go To View.
Ctrl+MthenCtrl+G
Go To ViewA code-window context-menu command; the HTML editor maps the same keys to Go To Controller.
Ctrl+MthenCtrl+G
Next ViewSwitches the HTML editor on to its following view; listed for Source view.
Ctrl+Page Down
Synchronize ViewsBrings the Design view up to date with edits made in Source view.
Ctrl+Shift+Y
View in Page InspectorSends the web page being edited to the Page Inspector tool.
Ctrl+KthenCtrl+G
Start XSLT DebuggingIn the XML editor, runs the style sheet under the debugger.
Alt+F5
Start XSLT Without DebuggingIn the XML editor, runs the transformation and shows the output without a debug session.
Ctrl+Alt+F5
Comparing and merging files 16
Action
Windows
Next DifferenceIn the Difference Viewer, moves to the following changed block; elsewhere F8 is Next Location.
F8
Previous DifferenceIn the Difference Viewer, moves back to the changed block before the caret.
Shift+F8
Inline ViewShows both versions merged in a single pane; press Ctrl + \, then Ctrl + 1.
Ctrl+\thenCtrl+1
Side by Side ViewShows the two versions next to each other in separate panes.
Ctrl+\thenCtrl+2
Left Only ViewShows just the left-hand version of the comparison.
Ctrl+\thenCtrl+3
Right Only ViewShows just the right-hand version of the comparison.
Ctrl+\thenCtrl+4
Switch Left and Right PaneMoves the caret to the other side of the comparison.
Ctrl+\thenCtrl+Tab
Synchronize View ToggleTurns linked scrolling of the two panes on or off.
Ctrl+\thenCtrl+Down
Ignore Trim WhitespaceToggles whether leading and trailing spaces count as differences.
Ctrl+\thenCtrl+Space
Add CommentAdds a review comment at the selection in the Difference Viewer.
Ctrl+Shift+K
Edit Local FileOpens your working copy of the compared file in a normal editor tab.
Ctrl+Shift+P
Focus Left WindowIn the Merge Editor, moves focus to the left source pane.
Alt+1
Focus Right WindowIn the Merge Editor, moves focus to the right source pane.
Alt+3
Focus Result WindowIn the Merge Editor, moves focus to the pane that holds the merged result.
Alt+2
Next Annotate RegionIn the annotate view, jumps to the following region; otherwise the key is Next Issue in File.
Alt+Page Down
Previous Annotate RegionIn the annotate view, jumps back one region; otherwise the key is Previous Issue in File.
Alt+Page Up
T-SQL editor 16
Action
Windows
Execute QueryRuns the query in the T-SQL editor; the T-SQL PDW editor uses the same key.
Ctrl+Shift+E
Cancel QueryStops the query that is executing; Break is the Pause/Break key.
Alt+Break
Execute With DebuggerRuns the script under the T-SQL debugger instead of executing it normally.
Alt+F5
Toggle Execution PlanSwitches inclusion of the actual plan with the next run on or off.
Ctrl+DthenA
Show Estimated PlanDisplays the estimated execution plan without running the query.
Ctrl+DthenE
Results as GridSends query output to a grid; press Ctrl + D, then G.
Ctrl+DthenG
Results as TextSends query output to a plain-text pane; press Ctrl + D, then T.
Ctrl+DthenT
Results as FileSaves query output to a file; press Ctrl + D, then F.
Ctrl+DthenF
Toggle Results PaneShows or hides the area under the query that holds results and messages.
Ctrl+DthenR
Clone QueryOpens another query window with a copy of the current script.
Ctrl+Alt+N
Database BoxMoves focus to the list of databases on the editor toolbar.
Shift+Alt+Page Down
Commit All EditsApplies the pending edits in one go; listed for the T-SQL editor.
Shift+Alt+U
Expand WildcardsRefactoring that replaces SELECT * with the explicit list of columns.
Ctrl+RthenEorCtrl+RthenCtrl+E
Fully Qualify NamesRefactoring that adds schema and object qualifiers to names in the script.
Ctrl+RthenQorCtrl+RthenCtrl+Q
Move to SchemaRefactoring that moves the object at the caret into a different schema.
Ctrl+RthenMorCtrl+RthenCtrl+M
Rename (SQL)Refactoring that renames a database object and updates references to it.
F2orCtrl+RthenRorCtrl+RthenCtrl+R
Help and other commands 9
Action
Windows
F1 HelpOpens the documentation for whatever is selected or under the caret.
F1
View HelpOpens the Visual Studio documentation in the browser or in the local Help Viewer, depending on the Help preference.
Ctrl+F1
Window HelpOpens the documentation about the window that has focus.
Shift+F1
Manage Help ContentOpens the page for installing or removing offline documentation.
Ctrl+Alt+F1
New DiagramStarts a new modeling diagram through the Architecture commands.
Ctrl+\thenCtrl+N
Retry Mobile Service ScriptAn Azure command; the first key is * on the numeric keypad, followed by Ctrl + R.
Ctrl+Num *thenCtrl+R
Script Error Details (Azure)An Azure mobile-service command; press Ctrl with * on the numeric keypad, then Ctrl + D.
Ctrl+Num *thenCtrl+D
ExecuteA code-window context-menu command; the XML editor uses the same keys to start XSLT without debugging.
Ctrl+Alt+F5
Refresh Remote References
Ctrl+Shift+J
No row on this page matches that filter.
Notes
Chords
Many editor commands are chords: press Ctrl + K, Ctrl + C — Ctrl + K, then Ctrl + C — to comment a selection, and Ctrl + K, Ctrl + U to uncomment; Ctrl + K, Ctrl + D formats the document. Refactoring chords start with Ctrl + R: Ctrl + R, Ctrl + R renames, Ctrl + R, Ctrl + M extracts a method, Ctrl + R, Ctrl + G removes and sorts usings. If a chord seems to do nothing, check whether its second key needs Ctrl: Ctrl + R, Ctrl + A debugs all tests, while Ctrl + R, A only runs them. Ctrl + . opens Quick Actions on the current line, which offers most refactorings and fixes without any chord.
Navigation
Ctrl + T is Go To All: type a file, type, member or symbol name with optional prefixes (f for files, t for types). Ctrl + Q searches menus, options and windows by name. F12 goes to a definition, Alt + F12 peeks at it inline, Shift + F12 finds all references and Ctrl + - navigates back. F8 and Shift + F8 step through the Error List or Find Results.
Build and debug
Ctrl + Shift + B builds the solution and Ctrl + F7 compiles just the current file. F5 starts debugging, Ctrl + F5 runs without the debugger, Shift + F5 stops and Ctrl + Shift + F5 restarts. F9 toggles a breakpoint; F10 steps over, F11 into and Shift + F11 out. Ctrl + F10 runs to the cursor, Ctrl + Shift + F10 moves the instruction pointer to the current line, and Shift + F9 opens Quick Watch on the selection. Ctrl + Alt + I opens the Immediate window for evaluating expressions while paused.
Questions
What is the difference between Visual Studio and VS Code shortcuts?
They are different products with different keymaps. VS Code has its own page here; Visual Studio uses chords such as Ctrl + K, Ctrl + C.
How do I press a chord like Ctrl + K, Ctrl + C?
Hold Ctrl, press K, then press C while still holding Ctrl (or release and re-press Ctrl). The status bar shows "(Ctrl+K) was pressed" while waiting.