Skip to content

Visual Studio Keyboard Shortcuts

ShortcutAction
Ctrl+TGo to All (files, types, members, symbols)
Ctrl+GGo to line number
F12Go to definition
Alt+F12Peek definition (inline)
Shift+F12Find all references
Ctrl+F12Go to implementation
Ctrl+-Navigate back
Ctrl+Shift+-Navigate forward
Ctrl+K, Ctrl+OToggle between .cs and designer file
Ctrl+[, SSync solution explorer to current file

ShortcutAction
Ctrl+DDuplicate line
Ctrl+LDelete line
Alt+↑ / Alt+↓Move line up/down
Ctrl+Shift+VClipboard ring (cycle through clipboard history)
Ctrl+Shift+LDelete line
Ctrl+K, Ctrl+CComment selection
Ctrl+K, Ctrl+UUncomment selection
Ctrl+K, Ctrl+DFormat document
Ctrl+K, Ctrl+FFormat selection
TabIncrease indent
Shift+TabDecrease indent
Ctrl+Shift+SpaceShow parameter info
Ctrl+.Quick actions and refactorings

ShortcutAction
Ctrl+SpaceTrigger IntelliSense
Ctrl+Shift+SpaceParameter info tooltip
Alt+InsertGenerate code (constructor, properties, etc.)
Tab / EnterCommit IntelliSense suggestion
Ctrl+JList members
Ctrl+K, Ctrl+XInsert code snippet
Ctrl+K, Ctrl+SSurround with snippet

ShortcutAction
Ctrl+FFind in current file
Ctrl+HReplace in current file
Ctrl+Shift+FFind in all files
Ctrl+Shift+HReplace in all files
F3Find next
Shift+F3Find previous
Ctrl+F3Find next (word under cursor)
Alt+F3Find selected text next

ShortcutAction
F2Rename symbol
Ctrl+R, Ctrl+RRename (older shortcut)
Ctrl+R, Ctrl+EEncapsulate field
Ctrl+R, Ctrl+MExtract method
Ctrl+R, Ctrl+IExtract interface
Ctrl+.Show suggested actions (lightbulb)
Alt+EnterShow error/warning actions

ShortcutAction
F5Start debugging
Ctrl+F5Start without debugging
Shift+F5Stop debugging
Ctrl+Shift+F5Restart debugging
F9Toggle breakpoint
Ctrl+Shift+F9Delete all breakpoints
F10Step over
F11Step into
Shift+F11Step out
F5Continue (when paused)
Ctrl+Alt+QQuick watch (inspect expression)
Ctrl+Alt+W, 1Watch window 1
Ctrl+Alt+IImmediate window

ShortcutAction
Ctrl+TabSwitch between open documents
Ctrl+F4Close current document
Ctrl+W, SOpen Solution Explorer
Ctrl+W, EOpen Error List
Ctrl+W, OOpen Output window
Ctrl+W, TOpen Task List
Ctrl+W, POpen Properties window
Alt+F7Open Team Explorer
Ctrl+\, Ctrl+MOpen Test Explorer

ShortcutAction
Ctrl+Shift+BBuild solution
Ctrl+BBuild current project
Ctrl+F7Compile current file
Ctrl+BreakCancel build
F5Run with debugger
Ctrl+F5Run without debugger

ShortcutAction
Ctrl+M, Ctrl+OCollapse all to definitions
Ctrl+M, Ctrl+LToggle all outlining
Ctrl+M, Ctrl+MToggle current region
Ctrl+M, Ctrl+PStop outlining
Ctrl+K, Ctrl+KToggle bookmark
Ctrl+K, Ctrl+NNext bookmark
Ctrl+K, Ctrl+WBookmark window

Customize shortcuts: Tools → Options → Environment → Keyboard

Chord shortcuts (two-key sequences like Ctrl+K, Ctrl+D) require holding the first chord, releasing, then pressing the second.

Ctrl+T (Go to All) is the most powerful navigation shortcut — prefix with:

  • f to search files only
  • t to search types only
  • m to search members only
  • # to search symbols