General

Action Shortcut
Go To All (files, types, members, symbols) CtrlTCtrlTCtrlT
Quick Launch (search menus & options) CtrlQCtrlQCtrlQ
Open File CtrlOCtrlOCtrlO
Save All CtrlShiftSCtrlShiftSCtrlShiftS
Show Quick Actions and Refactorings Ctrl.Ctrl.Ctrl.
View Solution Explorer CtrlAltLCtrlAltLCtrlAltL

Editing

Action Shortcut
Format Document Ctrl+K, Ctrl+DCtrl+K, Ctrl+DCtrl+K, Ctrl+D
Format Selection Ctrl+K, Ctrl+FCtrl+K, Ctrl+FCtrl+K, Ctrl+F
Comment Selection Ctrl+K, Ctrl+CCtrl+K, Ctrl+CCtrl+K, Ctrl+C
Uncomment Selection Ctrl+K, Ctrl+UCtrl+K, Ctrl+UCtrl+K, Ctrl+U
Duplicate Line or Selection CtrlDCtrlDCtrlD
Delete Line CtrlShiftLCtrlShiftLCtrlShiftL
Move Line Up AltUpAltUpAltUp
Move Line Down AltDownAltDownAltDown
Trigger IntelliSense CtrlSpaceCtrlSpaceCtrlSpace
Toggle Outlining Expansion Ctrl+M, Ctrl+MCtrl+M, Ctrl+MCtrl+M, Ctrl+M

Build & Debug

Action Shortcut
Build Solution CtrlShiftBCtrlShiftBCtrlShiftB
Start Debugging F5F5F5
Start Without Debugging CtrlF5CtrlF5CtrlF5
Stop Debugging ShiftF5ShiftF5ShiftF5
Step Over F10F10F10
Step Into F11F11F11
Step Out ShiftF11ShiftF11ShiftF11
Toggle Breakpoint F9F9F9
Run to Cursor CtrlF10CtrlF10CtrlF10

Refactoring

Action Shortcut
Rename Ctrl+R, Ctrl+RCtrl+R, Ctrl+RCtrl+R, Ctrl+R
Extract Method Ctrl+R, Ctrl+MCtrl+R, Ctrl+MCtrl+R, Ctrl+M
Encapsulate Field Ctrl+R, Ctrl+ECtrl+R, Ctrl+ECtrl+R, Ctrl+E
Remove and Sort Usings Ctrl+R, Ctrl+GCtrl+R, Ctrl+GCtrl+R, Ctrl+G
Quick Actions (refactor menu) Ctrl.Ctrl.Ctrl.

Find & Replace

Action Shortcut
Find CtrlFCtrlFCtrlF
Replace CtrlHCtrlHCtrlH
Find in Files CtrlShiftFCtrlShiftFCtrlShiftF
Replace in Files CtrlShiftHCtrlShiftHCtrlShiftH
Find Next F3F3F3
Incremental Search CtrlICtrlICtrlI

Windows & Layout

Action Shortcut
Solution Explorer CtrlAltLCtrlAltLCtrlAltL
Properties Window F4F4F4
Output Window CtrlAltOCtrlAltOCtrlAltO
Error List Ctrl+\, ECtrl+\, ECtrl+\, E
Full Screen ShiftAltEnterShiftAltEnterShiftAltEnter
Close Document CtrlF4CtrlF4CtrlF4
No shortcuts found. Try a different search term.

Frequently Asked Questions

Is Visual Studio the same as VS Code?
No — they are two different Microsoft products that share a brand name. Visual Studio is a full-featured IDE for .NET, C++, and Windows development, available on Windows. VS Code (Visual Studio Code) is a free, lightweight, cross-platform code editor that runs on Mac, Windows, and Linux. Their keyboard shortcuts are different: Visual Studio opens the command search with Ctrl+Q and builds with Ctrl+Shift+B, while VS Code uses Ctrl+Shift+P for its command palette. This page covers Visual Studio the IDE.
What's the keyboard shortcut to build in Visual Studio?
Press Ctrl+Shift+B to build the entire solution in Visual Studio. To run with the debugger attached, press F5; to run without debugging, press Ctrl+F5. These use the default General profile keybindings — if you chose a language-specific profile during setup, some shortcuts may differ.
How do I format code in Visual Studio?
Visual Studio uses chord shortcuts for formatting. Press Ctrl+K then Ctrl+D to format the whole document, or Ctrl+K then Ctrl+F to format just the selection. The same Ctrl+K prefix handles commenting: Ctrl+K, Ctrl+C comments the selection and Ctrl+K, Ctrl+U uncomments it.
What is Go To All in Visual Studio?
Press Ctrl+T to open Go To All — a unified search that finds files, types, members, and symbols across your solution from one box. It's Visual Studio's equivalent of a command palette for code navigation. For searching menus and IDE options instead, use Quick Launch with Ctrl+Q.
How do I rename a symbol across the project in Visual Studio?
Press Ctrl+R then Ctrl+R (the Rename chord) to rename a variable, method, class, or other symbol everywhere it's referenced. Visual Studio previews every change before applying it. Other refactorings live under the same Ctrl+R prefix — Ctrl+R, Ctrl+M extracts a method, for example — or open the full Quick Actions menu with Ctrl+ (period).
Do Visual Studio shortcuts work on Mac?
Visual Studio is a Windows IDE. Visual Studio for Mac was retired by Microsoft in August 2024, so there is no current Mac version of Visual Studio itself. On a Mac, the usual choices are VS Code (cross-platform) or, for mobile development, Xcode and Android Studio. The shortcuts on this page reflect Visual Studio on Windows using the default General profile.