Appendix C. Shortcut Key Guide

Appendix C. Shortcut Key Guide

This appendix describes keyboard shortcuts in the following categories:

  • General

  • Project related

  • Window manipulation

  • Text navigation

  • Text manipulation

  • Text selection

  • Control editor (designer)

  • Search and replace

  • Help

  • Debugging

  • Object browser

  • Tool window

  • HTML designer

  • Macro

  • Dialog editor

  • Accelerator and string editor

Table C-1. General

Command

Shortcut

Description

Edit.Copy

CTRL-C

CTRL-INSERT

Copies the currently selected item to the system clipboard.

Edit.Cut

CTRL-X

SHIFT-DELETE

Deletes the currently selected item and moves it to the system clipboard.

Edit.CycleClipboardRing

CTRL-SHIFT- INS

CTRL-SHIFT-V

Pastes an item from the Clipboard Ring tab of the Toolbox at the cursor in the file and automatically selects the pasted item. You can cycle through the items on the clipboard by pressing the shortcut keys repeatedly.

Edit.GoToNextLocation

F8

Moves the cursor to the next item, such as a task in the TaskList window or a search match in the Find Results window.

Edit.GoToPreviousLocation

SHIFT-F8

Moves the cursor to the previous item in the TaskList window or Find Results window.

Edit.GoToReference

SHIFT-F12

Finds a reference to the selected item or the item under the cursor.

Edit.OpenFile

CTRL-SHIFT-G

Opens the file whose name is under the cursor or is currently selected (e.g., if you use this shortcut in a C++ file when the cursor is on a line with a #include statement, it will open the file being included).

Edit.Paste

CTRL-V

SHIFT-INSERT

Inserts the item in the clipboard at the cursor.

Edit.Redo

CTRL-SHIFT-Z

CTRL-Y

SHIFT-ALT-BACKSPACE

Redoes the previously undone action.

Edit.SelectionCancel

ESC

Closes a menu or dialog, cancels an operation in progress, or places focus in the current document window.

Edit.Undo

ALT-BACKSPACE

CTRL-Z

Reverses the last editing action.

File.Print

CTRL-P

Displays the Print dialog.

File.SaveAll

CTRL-SHIFT-S

Saves all documents and projects.

File.SaveSelectedItems

CTRL-S

Saves the selected items in the current project (usually whichever source file is currently visible).

Tools.GoToCommandLine

CTRL-/

Switches focus to the Find/Command box on the Standard toolbar.

View.NextTask

CTRL-SHIFT-F12

Moves to the next task in the TaskList window.

View.PopBrowseContext

CTRL-SHIFT-8

Moves backward in the browse history. Available in the object browser or Class View window.

View.ViewCode

F7

Switches from a design view to a code view in the editor.

View.ViewDesigner

SHIFT-F7

Switches from a code view to a design view in the editor.

View.WebNavigateBack

ALT-LEFT ARROW

Goes back in the web browser history.

View.WebNavigateForward

ALT-RIGHT ARROW

Goes forward in the web browser history.

Table C-2. Project-related

Command

Shortcut

Description

Build.BuildSolution

CTRL-SHIFT-B

Builds the solution.

Build.Compile

CTRL-F7

Compiles the selected file. C++ projects only.NET projects do not support compilation of individual files, only whole projects.

File.AddExistingItem

SHIFT-ALT-A

Displays the Add Existing Item dialog.

File.AddNewItem

CTRL-SHIFT-A

Displays the Add New Item dialog.

File.BuildandBrowse

CTRL-F8

Builds the current project and then displays the start page for the project in the browser. Available only for web projects.

File.NewFile

CTRL-N

Displays the New File dialog. Files created in this way are not associated with any project. Use File.AddNewItem (Ctrl-Shift-A) to create a new file in a project.

File.NewProject

CTRL-SHIFT-N

Displays the New Project dialog.

File.OpenFile

CTRL-O

Displays the Open File dialog.

File.OpenProject

CTRL-SHIFT-O

Displays the Open Project dialog.

Project.Override

CTRL-ALT-INSERT

Allows you to override base class methods in a derived class when an overridable method is highlighted in the Class View pane.

Table C-3. Window manipulation

Command

Shortcut

Description

View.FullScreen

SHIFT-ALT-ENTER

Toggles full screen mode.

View.NavigateBackward

CTRL-+

Goes back to the previous location in the navigation history. (For example, if you press Ctrl-Home to go to the start of a document, this shortcut will take the cursor back to wherever it was before you pressed Ctrl-Home.)

View.NavigateForward

CTRL-SHIFT-+

Moves forward in the navigation history. This is effectively an undo for the View.NavigateBackward operation.

Window.ActivateDocumentWindow

ESC

Closes a menu or dialog, cancels an operation in progress, or places focus in the current document window.

Window.CloseDocumentWindow

CTRL-F4

Closes the current MDI child window.

Window.CloseToolWindow

SHIFT-ESC

Closes the current tool window.

Window.MoveToDropDownBar

CTRL-F2

Moves the cursor to the navigation bar at the top of a code view.

Window.NextDocumentWindow

CTRL-TAB

CTRL-F6

Cycles through the MDI child windows one window at a time.

Window.PreviousDocumentWindow

CTRL-SHIFT-TAB

CTRL-SHIFT-F6

Moves to the previous MDI child window.

Window.NextPane

ALT-F6

Moves to the next tool window.

Window.PreviousPane

SHIFT-ALT-F6

Moves to the previously selected window.

Window.NextSplitPane

F6

Moves to the next pane of a split pane view of a single document.

Window.PreviousSplitPane

SHIFT-F6

Moves to the previous pane of a document in split pane view.

Window.NextTab

CTRL-PAGEDOWN

Moves to the next tab in the document or window (e.g., you can use this to switch the HTML editor from its design view to its HTML view.

Window.PreviousTab

CTRL-PAGE UP

Moves to the previous tab in the document or window.

Table C-4. Text navigation

Command

Shortcut

Description

Edit.CharLeft

LEFT ARROW

Moves the cursor one character to the left.

Edit.CharRight

RIGHT ARROW

Moves the cursor one character to the right.

Edit.DocumentEnd

CTRL-END

Moves the cursor to the end of the document.

Edit.DocumentStart

CTRL-HOME

Moves the cursor to the start of the document.

Edit.GoTo

CTRL-G

Displays the Go to Line dialog. If the debugger is running, the dialog also lets you specify addresses or function names to go to.

Edit.GoToBrace

CTRL-]

Moves the cursor to the matching brace in the document. If the cursor is on an opening brace, this will move to the corresponding closing brace and vice versa.

Edit.LineDown

DOWN ARROW

Moves the cursor down one line.

Edit.LineEnd

END

Moves the cursor to the end of the current line.

Edit.LineStart

HOME

Moves the cursor to the beginning of the line. If you press Home when the cursor is already at the start of the line, it will toggle the cursor between the first non-whitespace character and the real start of the line.

Edit.LineUp

UP ARROW

Moves the cursor up one line.

Edit.NextBookmark

CTRL-K, CTRL-N

Moves to the next bookmark in the document.

Edit.PageDown

PAGE DOWN

Scrolls down one screen in the editor window.

Edit.PageUp

PAGE UP

Scrolls up one screen in the editor window.

Edit.PreviousBookmark

CTRL-K, CTRL-P

Moves to the previous bookmark.

Edit.QuickInfo

CTRL-K, CTRL-I

Displays Quick Info, based on the current language.

Edit.ScrollLineDown

CTRL-DOWN ARROW

Scrolls text down one line but does not move the cursor. This is useful for scrolling more text into view without losing your place. Available only in text editors.

Edit.ScrollLineUp

CTRL-UP ARROW

Scrolls text up one line but does not move the cursor. Available only in text editors.

Edit.WordNext

CTRL-RIGHT ARROW

Moves the cursor one word to the right.

Edit.WordPrevious

CTRL-LEFT ARROW

Moves the cursor one word to the left.

View.BrowseNext

CTRL-SHIFT-1

Navigates to the next definition, declaration, or reference of an item. Available in the object browser and Class View window. Also available in source editing windows if you have already used the Edit.GoToReference (Shift-F12) shortcut.

View.BrowsePrevious

CTRL-SHIFT-2

Navigates to the previous definition, declaration, or reference of an item.

Table C-5. Text manipulation

Command

Shortcut

Description

Edit.BreakLine

ENTER

SHIFT-ENTER

Inserts a new line.

Edit.CharTranspose

CTRL-T

Swaps the characters on either side of the cursor. (For example, AC|BD becomes AB|CD.) Available only in text editors.

Edit.ClearBookmarks

CTRL-K, CTRL-L

Removes all unnamed bookmarks in the current document.

Edit.CollapseToDefinitions

CTRL-M, CTRL-O

Automatically determines logical boundaries for creating regions in code, such as procedures, and then hides them. This collapses all such regions in the current document.

Edit.CommentSelection

CTRL-K, CTRL-C

Marks the current line or selected lines of code as a comment, using the correct comment syntax for the programming language.

Edit.CompleteWord

ALT-RIGHT ARROW

CTRL-SPACEBAR

Displays statement completion based on the current language or autocompletes word if existing text unambiguously identifies a single symbol.

Edit.Delete

DELETE

Deletes one character to the right of the cursor.

Edit.DeleteBackwards

BACKSPACE

SHIFT-BACKSPACE

Deletes one character to the left of the cursor.

Edit.DeleteHorizontalWhitespace

CTRL-K, CTRL-\

Removes horizontal whitespace in the selection or deletes whitespace adjacent to the cursor if there is no selection.

Edit.FormatDocument

CTRL-K, CTRL-D

Applies the indenting and space formatting for the language as specified on the Formatting pane of the language in the Text Editor section of the Options dialog to the document. This shortcut is available only in VB.NETin other languages you must first select the whole document with Ctrl-A and then format the selection with Ctrl-K, Ctrl-F.

Edit.FormatSelection

CTRL-K, CTRL-F

Applies the indenting and space formatting for the language as specified on the Formatting pane of the language in the Text Editor section of the Options dialog to the selected text.

Edit.HideSelection

CTRL-M, CTRL-H

Hides the selected text. A signal icon marks the location of the hidden text in the file. VB.NET only.

Edit.InsertTab

TAB

Indents the currently selected line or lines by one tab stop. If there is no selection, this inserts a tab stop.

Edit.LineCut

CTRL-L

Cuts all selected lines or the current line if nothing has been selected to the clipboard.

Edit.LineDelete

CTRL-SHIFT-L

Deletes all selected lines or the current line if no selection has been made.

Edit.LineOpenAbove

CTRL-ENTER

Inserts a blank line above the cursor.

Edit.LineOpenBelow

CTRL-SHIFT-ENTER

Inserts a blank line below the cursor.

Edit.LineTranspose

SHIFT-ALT-T

Moves the line containing the cursor below the next line.

Edit.ListMembers

CTRL-J

Lists members for statement completion when editing code.

Edit.MakeLowercase

CTRL-U

Changes the selected text to lowercase characters.

Edit.MakeUppercase

CTRL-SHIFT-U

Changes the selected text to uppercase characters.

Edit.OverTypeMode

INSERT

Toggles between insert and overtype insertion modes.

Edit.ParameterInfo

CTRL-SHIFT-SPACEBAR

Displays a tooltip that contains information for the current parameter, based on the current language.

Edit.StopHidingCurrent

CTRL-M, CTRL-U

Removes the outlining information for the currently selected region.

Edit.StopOutlining

CTRL-M, CTRL-P

Removes all outlining information from the entire document.

Edit.SwapAnchor

CTRL-R, CTRL-P

Swaps the anchor and endpoint of the current selection.

Edit.TabLeft

SHIFT-TAB

Moves current line or selected lines one tab stop to the left.

Edit.ToggleAllOutlining

CTRL-M, CTRL-L

Toggles all previously marked hidden text sections between hidden and display states.

Edit.ToggleBookmark

CTRL-K, CTRL-K

Sets or removes a bookmark at the current line.

Edit.ToggleOutliningExpansion

CTRL-M, CTRL-M

Toggles the currently selected hidden text section or the section containing the cursor if there is no selection between the hidden and display states.

Edit.ToggleTaskListShortcut

CTRL-K, CTRL-H

Sets or removes a shortcut in the tasklist to the current line.

Edit.ToggleWordWrap

CTRL-R, CTRL-R

Enables or disables word wrap in an editor.

Edit.UncommentSelection

CTRL-K, CTRL-U

Removes the comment syntax from the current line or currently selected lines of code.

Edit.ViewWhiteSpace

CTRL-R, CTRL-W

Shows or hides spaces and tab marks.

Edit.WordDeleteToEnd

CTRL-DELETE

Deletes the word to the right of the cursor.

Edit.WordDeleteToStart

CTRL-BACKSPACE

Deletes the word to the left of the cursor.

Edit.WordTranspose

CTRL-SHIFT-T

Transposes the two words that follow the cursor. (For example, |End Sub would be changed to read Sub End|.)

Table C-6. Text selection

Command

Shortcut

Description

Edit.CharLeftExtend

SHIFT-LEFT ARROW

Moves the cursor to the left one character, extending the selection.

Edit.CharLeftExtendColumn

SHIFT-ALT-LEFT ARROW

Moves the cursor to the left one character, extending the column selection.

Edit.CharRightExtend

SHIFT-RIGHT ARROW

Moves the cursor to the right one character, extending the selection.

Edit.CharRightExtendColumn

SHIFT-ALT-RIGHT ARROW

Moves the cursor to the right one character, extending the column selection.

Edit.DocumentEndExtend

CTRL-SHIFT-END

Moves the cursor to the end of the document, extending the selection.

Edit.DocumentStartExtend

CTRL-SHIFT-HOME

Moves the cursor to the start of the document, extending the selection.

Edit.GoToBraceExtend

CTRL-SHIFT-]

Moves the cursor to the next brace, extending the selection.

Edit.LineDownExtend

SHIFT-DOWN ARROW

Moves the cursor down one line, extending the selection.

Edit.LineDownExtendColumn

SHIFT-ALT-DOWN ARROW

Moves the cursor down one line, extending the column selection.

Edit.LineEndExtend

SHIFT-END

Moves the cursor to the end of the current line, extending the selection.

Edit.LineEndExtendColumn

SHIFT-ALT-END

Moves the cursor to the end of the line, extending the column selection.

Edit.LineStartExtend

SHIFT-HOME

Moves the cursor to the start of the line, extending the selection.

Edit.LineStartExtendColumn

SHIFT-ALT-HOME

Moves the cursor to the start of the line, extending the column selection.

Edit.LineUpExtend

SHIFT-UP ARROW

Moves the cursor up one line, extending the selection.

Edit.LineUpExtendColumn

SHIFT-ALT-UP ARROW

Moves the cursor up one line, extending the column selection.

Edit.PageDownExtend

SHIFT-PAGE DOWN

Extends selection down one page.

Edit.PageUpExtend

SHIFT-PAGE UP

Extends selection up one page.

Edit.SelectAll

CTRL-A

Selects everything in the current document.

Edit.SelectCurrentWord

CTRL-W

Selects the word containing the cursor or the word to the right of the cursor.

Edit.SelectToLastGoBack

CTRL-=

Selects from the current location in the editor back to the previous location in the navigation history.

Edit.ViewBottomExtend

CTRL-SHIFT-PAGE DOWN

Moves the cursor to the last line in view, extending the selection.

Edit.ViewTopExtend

CTRL-SHIFT-PAGE UP

Moves the cursor to the top of the current window, extending the selection.

Edit.WordNextExtend

CTRL-SHIFT-RIGHT ARROW

Moves the cursor one word to the right, extending the selection.

Edit.WordNextExtendColumn

CTRL-SHIFT-ALT-RIGHT ARROW

Moves the cursor to the right one word, extending the column selection.

Edit.WordPreviousExtend

CTRL-SHIFT-LEFT ARROW

Moves the cursor one word to the left, extending the selection.

Edit.WordPreviousExtendColumn

CTRL-SHIFT-ALT-LEFT ARROW

Moves the cursor to the left one word, extending the column selection.

Table C-7. Control editor (designer)

Command

Shortcut

Description

Edit.MoveControlDown

CTRL-DOWN ARROW

Moves the selected control down in increments of one on the design surface.

Edit.MoveControlDownGrid

DOWN ARROW

Moves the selected control down to the next grid position on the design surface.

Edit.MoveControlLeft

CTRL-LEFT ARROW

Moves the control to the left in increments of one on the design surface.

Edit.MoveControlLeftGrid

LEFT ARROW

Moves the control to the left to the next grid position on the design surface.

Edit.MoveControlRight

CTRL-RIGHT ARROW

Moves the control to the right in increments of one on the design surface.

Edit.MoveControlRightGrid

RIGHT ARROW

Moves the control to the right into the next grid position on the design surface.

Edit.MoveControlUp

CTRL-UP ARROW

Moves the control up in increments of one on the design surface.

Edit.MoveControlUpGrid

UP ARROW

Moves the control up into the next grid position on the design surface.

Edit.SelectNextControl

TAB

Moves to the next control in the tab order.

Edit.SelectPreviousControl

SHIFT-TAB

Moves to the previous control in the tab order.

Edit.SizeControlDown

CTRL-SHIFT-DOWN ARROW

Increases the height of the control in increments of one on the design surface.

Edit.SizeControlDownGrid

SHIFT-DOWN ARROW

Increases the height of the control to the next grid position on the design surface.

Edit.SizeControlLeft

CTRL-SHIFT-LEFT ARROW

Reduces the width of the control in increments of one on the design surface.

Edit.SizeControlLeftGrid

SHIFT-LEFT ARROW

Reduces the width of the control to the next grid position on the design surface.

Edit.SizeControlRight

CTRL-SHIFT-RIGHT ARROW

Increases the width of the control in increments of one on the design surface.

Edit.SizeControlRightGrid

SHIFT-LEFT ARROW

Increases the width of the control to the next grid position on the design surface.

Edit.SizeControlUp

CTRL-SHIFT-UP ARROW

Decreases the height of the control in increments of one on the design surface.

Edit.SizeControlUpGrid

SHIFT-UP ARROW

Decreases the height of the control to the next grid position on the design surface.

Table C-8. Search and replace

Command

Shortcut

Description

Edit.Find

CTRL-F

Displays the Find dialog.

Edit.FindInFiles

CTRL-SHIFT-F

Displays the Find in Files dialog.

Edit.FindNext

F3

Finds the next occurrence of the previous search text.

Edit.FindNextSelected

CTRL-F3

Finds the next occurrence of the currently selected text or the word under the cursor if there is no selection.

Edit.FindPrevious

SHIFT-F3

Finds the previous occurrence of the search text.

Edit.FindPreviousSelected

CTRL-SHIFT-F3

Finds the previous occurrence of the currently selected text or the word under the cursor.

Edit.GoToFindCombo

CTRL-D

Places the cursor in the Find/Command line on the Standard toolbar.

Edit.HiddenText

ALT-F3, H

Selects or clears the Search Hidden Text option for the Find dialog.

Edit.IncrementalSearch

CTRL-I

Starts an incremental searchafter pressing Ctrl-I, you can type in text, and for each letter you type, VS.NET will find the first occurrence of the sequence of letters you have typed so far. This is a very convenient facility, as it lets you find text by typing in exactly as many characters as are required to locate the text and no more.

If you press Ctrl-I a second time without typing any characters, it recalls the previous pattern. If you press it a third time or you press it when an incremental search has already found a match, VS.NET searches for the next occurrence.

Edit.MatchCase

ALT-F3, C.

Selects or clears the Match Case option for Find and Replace operations.

Edit.RegularExpression

ALT-F3, R

Selects or clears the Regular Expression option so that special characters can be used in Find and Replace operations.

Edit.Replace

CTRL-H

Displays the Replace dialog.

Edit.ReplaceInFiles

CTRL-SHIFT-H

Displays the Replace in Files dialog.

Edit.ReverseIncrementalSearch

CTRL-SHIFT-I

Performs an incremental search in reverse direction.

Edit.StopSearch

ALT-F3, S

Halts the current Find in Files operation.

Edit.Up

ALT-F3, B

Selects or clears the Search Up option for Find and Replace operations.

Edit.WholeWord

ALT-F3, W

Selects or clears the Match Whole Word option for Find and Replace operations.

Edit.Wildcard

ALT-F3, P

Selects or clears the Wildcard option for Find and Replace operations.

Table C-9. Help

Command

Shortcut

Description

Help.Contents

CTRL-ALT-F1

Displays the Contents window for the documentation.

Help.DynamicHelp

CTRL-F1

Displays the Dynamic Help window, which displays different topics depending on what items currently have focus. If the focus is in a source window, the Dynamic Help window will display help topics that are relevant to the text under the cursor.

Help.F1Help

F1

Displays a topic from Help that corresponds to the part of the user interface that currently has the focus. If the focus is in a source window, Help will try to display a topic relevant to the text under the cursor.

Help.Index

CTRL-ALT-F2

Displays the Help Index window.

Help.Indexresults

SHIFT-ALT-F2

Displays the Index Results window, which lists the topics that contain the keyword selected in the Index window.

Help.NextTopic

ALT-DOWN ARROW

Displays the next topic in the table of contents. Available only in the Help browser window.

Help.PreviousTopic

ALT-UP ARROW

Displays the previous topic in the table of contents. Available only in the Help browser window.

Help.Search

CTRL-ALT-F3

Displays the Search window, which allows you to search for words or phrases in the documentation.

Help.Searchresults

SHIFT-ALT-F3

Displays the Search Results window, which displays a list of topics that contain the string searched for from the Search window.

Help.WindowHelp

SHIFT-F1

Displays a topic from Help that corresponds to the user interface item that has the focus.

Table C-10. Debugging

Command

Shortcut

Description

Debug.ApplyCodeChanges

ALT-F10

Starts an edit and continue build to apply changes to code being debugged. Edit and continue is available only in C++ projects.

Debug.Autos

CTRL-ALT-V, A

Displays the Auto window to view the values of variables currently in the scope of the current line of execution within the current procedure.

Debug.BreakAll

CTRL-ALT-Break

Temporarily stops execution of all processes in a debugging session. Available only in run mode.

Debug.Breakpoints

CTRL-ALT-B

Displays the Breakpoints dialog, where you can add and modify breakpoints.

Debug.CallStack

CTRL-ALT-C

Displays the Call Stack window to display a list of all active procedures or stack frames for the current thread of execution. Available only in break mode.

Debug.ClearAllBreakpoints

CTRL-SHIFT-F9

Clears all of the breakpoints in the project.

Debug.Disassembly

CTRL-ALT-D

Displays the Disassembly window.

Debug.EnableBreakpoint

CTRL-F9

Enables or disables the breakpoint on the current line of code. The line must already have a breakpoint for this to work.