Partilhar via


Default Keyboard Shortcuts for Frequently Used Commands in Visual Studio

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

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.

Note

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

In this topic

Build

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]

Debug

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]

Edit

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]
dit.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]
dit.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]
dit.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]

File

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]

Project

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

Refactor

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

Tools

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

View

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, Team Foundation Build Detail Editor]
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]
iew.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]

Window

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]