Popular keyboard shortcuts for Visual Studio

You can access frequently used commands in Visual Studio by choosing these default keyboard shortcuts. For a complete list of commands that have default shortcuts, see Default keyboard shortcuts.

The Global context means that the shortcut is applicable in any tool window in Visual Studio.


You can look up the shortcut for any command by opening the Options dialog box, expanding the Environment node, and then choosing Keyboard.


Commands Keyboard shortcuts [Contexts]
Build.BuildSolution Ctrl+Shift+B [Global]
Build.Cancel Ctrl+Break [Global]
Build.Compile Ctrl+F7 [Global]
Build.RunCodeAnalysisonSolution Alt+F11 [Global]


Commands Keyboard shortcuts [Contexts]
Debug.BreakatFunction Ctrl+B [Global]
Debug.BreakAll Ctrl+Alt+Break [Global]
Debug.DeleteAllBreakpoints Ctrl+Shift+F9 [Global]
Debug.Exceptions Ctrl+Alt+E [Global]
Debug.QuickWatch Ctrl+Alt+Q [Global]

or Shift+F9 [Global]
Debug.Restart Ctrl+Shift+F5 [Global]
Debug.RunToCursor Ctrl+F10 [Global]
Debug.SetNextStatement Ctrl+Shift+F10 [Global]
Debug.Start F5 [Global]
Debug.StartWithoutDebugging Ctrl+F5 [Global]
Debug.StepInto F11 [Global]
Debug.StepOut Shift+F11 [Global]
Debug.StepOver F10 [Global]
Debug.StopDebugging Shift+F5 [Global]
Debug.ToggleBreakpoint F9 [Global]


Commands Keyboard shortcuts [Contexts]
Edit.BreakLine Enter [Text Editor, Report Designer, Windows Forms Designer]

or Shift+Enter [Text Editor]
Edit.CollapseToDefinitions Ctrl+M, Ctrl+O [Text Editor]
Edit.CommentSelection Ctrl+K, Ctrl+C [Text Editor]
Edit.CompleteWord Alt+Right Arrow [Text Editor, Workflow Designer]

or Ctrl+Spacebar [Text Editor, Workflow Designer]

or Ctrl+K, W [Workflow Designer]

or Ctrl+K, Ctrl+W [Workflow Designer]
Edit.Copy Ctrl+C [Global]

or Ctrl+Insert [Global]
Edit.Cut Ctrl+X [Global]

or Shift+Delete [Global]
Edit.Delete Delete [Global, Team Explorer]

or Shift+Delete [Sequence Diagram, UML Activity Diagram, Layer Diagram]

or Ctrl+Delete [Class Diagram]
Edit.Find Ctrl+F [Global]
Edit.FindAllReferences Shift+F12 [Global]
Edit.FindinFiles Ctrl+Shift+F [Global]
Edit.FindNext F3 [Global]
Edit.FindNextSelected Ctrl+F3 [Global]
Edit.FormatDocument Ctrl+K, Ctrl+D [Text Editor]
Edit.FormatSelection Ctrl+K, Ctrl+F [Text Editor]
Edit.GoTo Ctrl+G [Global]
Edit.GoToDeclaration Ctrl+F12 [Global]
Edit.GoToDefinition F12
Edit.GoToFindCombo Ctrl+D [Global]
Edit.GoToNextLocation F8 [Global]
Edit.InsertSnippet Ctrl+K, Ctrl+X [Global]
Edit.InsertTab Tab [Report Designer, Windows Forms Designer, Text Editor]
Edit.LineCut Ctrl+L [Text Editor]
Edit.LineDownExtendColumn Shift+Alt+Down Arrow [Text Editor]
Edit.LineOpenAbove Ctrl+Enter [Text Editor]
Edit.ListMembers Ctrl+J [Text Editor, Workflow Designer]

or Ctrl+K, Ctrl+L [Workflow Designer]

or Ctrl+K, L [Workflow Designer]
Edit.NavigateTo Ctrl+, [Global]
Edit.OpenFile Ctrl+Shift+G [Global]
Edit.OvertypeMode Insert [Text Editor]
Edit.ParameterInfo Ctrl+Shift+Spacebar [Text Editor, Workflow Designer]

or Ctrl+K, Ctrl+P [Workflow Designer]

or Ctrl+K, P [Workflow Designer]
Edit.Paste Ctrl+V [Global]

or Shift+Insert [Global]
Edit.PeekDefinition Alt+F12 [Text Editor]
Edit.Redo Ctrl+Y [Global]

or Shift+Alt+Backspace [Global]

or Ctrl+Shift+Z [Global]
Edit.Replace Ctrl+H [Global]
Edit.SelectAll Ctrl+A [Global]
Edit.SelectCurrentWord Ctrl+W [Text Editor]
Edit.SelectionCancel Esc [Text Editor, Report Designer, Settings Designer, Windows Forms Designer, Managed Resources Editor]
Edit.SurroundWith Ctrl+K, Ctrl+S [Global]
Edit.TabLeft Shift+Tab [Text Editor, Report Designer, Windows Forms Editor]
Edit.ToggleAllOutlining Ctrl+M, Ctrl+L [Text Editor]
Edit.ToggleBookmark Ctrl+K, Ctrl+K [Text Editor]
Edit.ToggleCompletionMode Ctrl+Alt+Space [Text Editor]
Edit.ToggleOutliningExpansion Ctrl+M, Ctrl+M [Text Editor]
Edit.UncommentSelection Ctrl+K, Ctrl+U [Text Editor]
Edit.Undo Ctrl+Z [Global]

or Alt+Backspace [Global]
Edit.WordDeleteToEnd Ctrl+Delete [Text Editor]
Edit.WordDeleteToStart Ctrl+Backspace [Text Editor]


Commands Keyboard shortcuts [Contexts]
File.Exit Alt+F4 [Global]
File.NewFile Ctrl+N [Global]
File.NewProject Ctrl+Shift+N [Global]
File.NewWebSite Shift+Alt+N [Global]
File.OpenFile Ctrl+O [Global]
File.OpenProject Ctrl+Shift+O [Global]
File.OpenWebSite Shift+Alt+O [Global]
File.Rename F2 [Team Explorer]
File.SaveAll Ctrl+Shift+S [Global]
File.SaveSelectedItems Ctrl+S [Global]
File.ViewinBrowser Ctrl+Shift+W [Global]


Commands Keyboard shortcuts [Contexts]
Project.AddExistingItem Shift+Alt+A [Global]
Project.AddNewItem Ctrl+Shift+A [Global]


Command Keyboard shortcut [Context]
Refactor.ExtractMethod Ctrl+R, Ctrl+M [Global]


Command Keyboard shortcut [Context]
Tools.AttachtoProcess Ctrl+Alt+P [Global]


Commands Keyboard shortcuts [Contexts]
View.ClassView Ctrl+Shift+C [Global]
View.EditLabel F2 [Global]
View.ErrorList Ctrl+\, Ctrl+E [Global]

or Ctrl+\, E [Global]
View.NavigateBackward Ctrl+- [Global]
View.NavigateForward Ctrl+Shift+- [Global]
View.ObjectBrowser Ctrl+Alt+J [Global]
View.Output Ctrl+Alt+O [Global]
View.PropertiesWindow F4
View.Refresh F5 [Team Explorer]
View.ServerExplorer Ctrl+Alt+S [Global]
View.ShowSmartTag Ctrl+. [Global]

or Shift+Alt+F10 [Global, HTML Editor Design View]
View.SolutionExplorer Ctrl+Alt+L [Global]
View.TfsTeamExplorer Ctrl+\, Ctrl+M [Global]
View.Toolbox Ctrl+Alt+X [Global]
View.ViewCode Enter [Class Diagram]

or F7 [Settings Designer]
View.ViewDesigner Shift+F7 [HTML Editor Source View]


Commands Keyboard shortcuts [Contexts]
Window.ActivateDocumentWindow Esc [Global]
Window.CloseDocumentWindow Ctrl+F4 [Global]
Window.NextDocumentWindow Ctrl+F6 [Global]
Window.NextDocumentWindowNav Ctrl+Tab [Global]
Window.NextSplitPane F6 [Global]

See also