Visual Studio Keyboard Shortcuts

Complete Visual Studio keyboard shortcuts reference — 69 shortcuts across 7 categories. Quick reference cheat sheet for Windows.

Visual Studio — the Windows IDE, not VS Code — has used the same core keymap for two decades, including the two-key chords that start with Ctrl + K and Ctrl + R. The table is the default "General" profile; C++ and Visual Basic profiles differ slightly, and Tools › Options › Keyboard shows which one is active.

Search & Navigation (10)

ShortcutAction
Ctrl + TGo To All
Ctrl + QQuick Launch
Ctrl + FFind
Ctrl + HReplace
Ctrl + Shift + FFind in Files
Ctrl + Shift + HReplace in Files
F3Find Next
Ctrl + F3Find Next Selected
Ctrl + GGo To Line
Ctrl + -Navigate Backward

Code Navigation (7)

ShortcutAction
F12Go To Definition
Ctrl + F12Go To Declaration
Alt + F12Peek Definition
Shift + F12Find All References
Shift + Alt + F12Quick Find Symbol
F8Next Location
Shift + F8Previous Location

Editing (15)

ShortcutAction
Ctrl + K, Ctrl + CComment Selection
Ctrl + K, Ctrl + UUncomment Selection
Ctrl + /Toggle Line Comment
Ctrl + K, Ctrl + DFormat Document
Ctrl + K, Ctrl + FFormat Selection
Ctrl + DDuplicate
Ctrl + LLine Cut
Ctrl + EnterLine Open Above
Ctrl + SpaceComplete Word
Ctrl + Shift + SpaceParameter Info
Ctrl + K, Ctrl + XInsert Snippet
Ctrl + M, Ctrl + OCollapse to Definitions
Ctrl + M, Ctrl + MToggle Outlining
Ctrl + K, Ctrl + KToggle Bookmark
Ctrl + R, Ctrl + GRemove and Sort Usings

Build (4)

ShortcutAction
Ctrl + Shift + BBuild Solution
Ctrl + F7Compile
Ctrl + BreakCancel Build
Alt + F11Run Code Analysis

Debugging (14)

ShortcutAction
F5Start Debugging
Ctrl + F5Start Without Debugging
Shift + F5Stop Debugging
Ctrl + Shift + F5Restart
F9Toggle Breakpoint
Ctrl + Shift + F9Delete All Breakpoints
F10Step Over
F11Step Into
Shift + F11Step Out
Ctrl + F10Run to Cursor
Ctrl + Shift + F10Set Next Statement
Shift + F9Quick Watch
Ctrl + Alt + BBreakpoints Window
Ctrl + Alt + IImmediate Window

Refactoring (6)

ShortcutAction
Ctrl + R, Ctrl + RRename
Ctrl + R, Ctrl + MExtract Method
Ctrl + R, Ctrl + IExtract Interface
Ctrl + R, Ctrl + EEncapsulate Field
Ctrl + .Quick Actions
Ctrl + R, Ctrl + OReorder Parameters

Windows & Files (13)

ShortcutAction
Ctrl + Alt + LSolution Explorer
F4Properties Window
Ctrl + Alt + OOutput Window
Ctrl + \, EError List
Ctrl + Alt + XToolbox
Ctrl + E, TTest Explorer
Ctrl + WClose Document
Ctrl + TabSwitch Documents
Ctrl + NNew File
Ctrl + Shift + NNew Project
Ctrl + SSave
Ctrl + Shift + SSave All
Shift + Alt + EnterFull Screen
📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

Related Shortcut Pages

VS Code JetBrains Rider Android Studio Windows Eclipse Git

Search 18,500+ shortcuts across 268 platforms

Explore All Platforms Practice Shortcuts
📜 Every shortcut on this page is taken from the official Visual Studio documentation — learn.microsoft.com
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.

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, the second key was pressed without Ctrl. 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.

Frequently asked 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.

What is the fastest way to open a file or type?

Ctrl + T (Go To All), then type part of the name.

How do I run without debugging?

Ctrl + F5. F5 attaches the debugger.

🤖 Ask AI about Visual Studio shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok