You are on page 1of 1

Microsoft Visual Basic Default Keybindings

® ®

Introduction Windows Navigation File


This document contains the keyboard shortcuts Navigation Bar CTRL + F2 Moves the cursor to the drop-down Go to Definition F12 or SHIFT + F2 Moves to the declaration for the New Project CTRL + N or Displays the New Project dialog
that are set by default when you use the Visual bar located at the top of the Code selected symbol. (Edit.GoToDefinition) CTRL + SHIFT + N box. (File.NewProject)
Basic Development Settings. To set the Visual Basic Editor. (Window.MoveToNavigationBar)
Navigate Backward CTRL + SHIFT + F2 or Moves to the previously browsed Open Project CTRL + O or Displays the Open Project dialog
Development Settings, on the Tools menu, click Object Browser F2 Displays the Object Browser. CTRL + MINUS SIGN line of code. (View.NavigateBackward) CTRL + SHIFT + O box. (File.OpenProject)
Options. In the Options dialog box, select Show (View.ObjectBrowser) (-)
all settings, and then, under Environment, click Add New Item CTRL + SHIFT + A Displays the Add New Item dialog
Keyboard. Click the Visual Basic 6 keyboard mapping Properties Window F4 Displays the Properties window Navigate Forward CTRL + SHIFT + Moves to the next browsed line of box. (Project.AddNewItem)
scheme in the drop-down list and then click OK. for the currently selected item. MINUS SIGN (-) code. (View.NavigateForward)
(View.PropertiesWindow) Add Existing Item CTRL + D Displays the Add Existing Item
You can customize individual command shortcuts Previous Method or CTRL + UP ARROW Moves to the previous method or dialog box. (Project.AddExistingItem)
yourself. To do so, on the Tools menu, click Options. Solution Explorer CTRL + R Displays Solution Explorer. Type or CTRL + PAGE UP type in the document.
In the Options dialog box, select Show all settings, (View.SolutionExplorer) (Edit.PreviousMethod)

and then, under Environment, click Keyboard. To Snippets


View Server Explorer CTRL + ALT + S Displays Server Explorer. Next Method or Type CTRL + DOWN Moves to the next method or type
edit a shortcut, locate the command name in the (View.ServerExplorer) ARROW or CTRL + in the document (Edit.NextMethod) You can use Code Snippets Manager on the Tools menu to find the
dialog box and then assign it a shortcut key. In this PAGE DOWN snippet shortcuts for the “Insert Snippet from Shortcut” commands
document, names for the commands described are Show Data Sources SHIFT + ALT + D Displays the Data Sources window. listed below. You can also customize snippet shortcuts by editing
Previous and Next CTRL + LEFT ARROW Moves the insertion point left or the Shortcut tag of the snippet XML files. The Code Snippet Editor
provided in parentheses. (Data.ShowDataSources)
for Visual Basic 2005 is a free application that you can download to
Word and CTRL + RIGHT right one word, respectively.
For a complete list of commands, along with their Toolbox CTRL + ALT + X Displays the Toolbox. (View.Toolbox) ARROW (Edit.WordPrevious and Edit.WordNext)
help do this. See http://go.microsoft.com/fwlink/?LinkId=75013 for
more information.
keyboard shortcuts and detailed descriptions, see
http://go.microsoft.com/fwlink/?LinkId=74687. Error List CTRL + \, E Displays the Error List. (View.ErrorList) IDE Navigator CTRL + TAB Displays the IDE Navigator, with
the first document window Insert Snippet Type “?” and press TAB Displays the Code Snippet Picker in
Close Tool Window SHIFT + ESC Closes the current tool window. selected. The IDE Navigator the Code Editor. The selected code
Editing (Window.CloseToolWindow) functions similarly to the Windows snippet is then inserted at the cursor
Navigator (ALT + SHIFT + TAB), position. (Edit.InsertSnippet)
Toggle All Outlining CTRL + M, CTRL + L Toggles all existing regions Close Document CTRL + F4 Closes the current tab. only it is for files and tool windows
between collapsed and expanded Window (Window.CloseDocumentWindow) within Visual Studio. (Window. Insert Snippet from Type the snippet Inserts the expanded code snippet.
states. (Edit.ToggleAllOutlining) NextDocumentWindowNav) Shortcut shortcut and press TAB (Edit.InvokeSnippetFromShortcut)
Toggle Outlining for CTRL + M, CTRL + M Toggles the current region Debugging View All Open CTRL + ALT + DOWN Displays a pop-up listing of all Insert Property Snippet Type “property” and Inserts a Property snippet. (Example of
Current Region between collapsed and expanded Documents ARROW open documents. press TAB Edit.InvokeSnippetFromShortcut)
states. (Edit.ToggleOutliningExpansion) Start Debugging F5 Starts the application in the
(Window.ShowEzMDIFileList)
debugger. When in Break mode, Insert For Snippet Type “for” and press Inserts a For…Next snippet. (Example of
Comment and CTRL + K, CTRL + C Inserts and removes, respectively, invoking this command runs TAB Edit.InvokeSnippetFromShortcut)
the application until the next View Code F7 Displays the selected item in Code
Uncomment and the apostrophe (‘) at the beginning view of the Editor. (View.ViewCode)
CTRL + K, CTRL + U of the current line or every breakpoint. (Debug.Start) List Snippet Shortcuts Type a snippet Displays the Code Snippet Shortcut
selected line. (Edit.CommentSelection and View Designer SHIFT + F7 Displays the selected item in shortcut prefix, type Picker. The shortcut in the list, which
Edit.UncommentSelection) Start Without CTRL + F5 Starts the application without “?”, and press TAB most closely matches the prefix, is
Debugging invoking the debugger. Use this Design view of the Editor.
(View.ViewDesigner) selected.
Undo CTRL + Z Undoes the last action. (Edit.Undo) exclusively rather than F5 for Web
site debugging. List Snippet CTRL + SPACE Invokes an IntelliSense completion
HTML Designer SHIFT + F7 Switches between Source view and
Redo CTRL + SHIFT + Z Redoes the last action. (Edit.Redo) (Debug.StartWithoutDebugging)
Design view for the current HTML. Replacements list for the currently selected snippet
(View.ViewMarkup and View.ViewDesigner) replacement.
Cut Line CTRL + Y Cuts the current line of code. Step Into F8 or F11 Executes code one statement at
(Edit.LineCut) a time, following execution into Escape Replacement ESC Deselects the current text. A second
method calls. (Debug.StepInto) View Document CTRL + ALT + T Displays the Document Outline
Outline window. Particularly useful in the Selection ESC deselects the replacement. Can
Insert Blank Line CTRL + ENTER and Inserts a blank line above and Form Designer and HTML be useful when you want to type at
CTRL + SHIFT + ENTER below the cursor position, Step Out CTRL + SHIFT + F8 or Executes the remaining lines of the end of a replacement without
SHIFT + F11 the method in which the current Designer. (View.DocumentOutline)
respectively. (Edit.LineOpenAbove and extending its bounds.
Edit.LineOpenBelow) execution point is located.
(Debug.StepOut)
Add or Remove CTRL + K, CTRL + K Sets or removes a bookmark at the
Bookmark current line. (Edit.ToggleBookmark) IntelliSense
Select Word CTRL + SHIFT + W Selects the word containing, or to
the right of, the insertion point. Step Over SHIFT + F8 or F10 Executes the next line of code, but
does not follow execution into any Navigate Bookmarks CTRL + K, CTRL + N or Moves to the next or previous Display a Filtered List CTRL + J Displays the IntelliSense®
(Edit.SelectCurrentWord)
method calls. (Debug.StepOver) CTRL + K, CTRL + P bookmark, respectively. completion list for the current
(Edit.NextBookmark and Edit. cursor position. (Edit.ListMembers)
Delete Word CTRL + BACKSPACE and Deletes to the beginning and end PreviousBookmark)
CTRL + DELETE of the word, respectively. Stop Debugging CTRL + ALT + BREAK Stops running the current
(Edit.WordDeleteToStart and Edit. application in the debugger. Display the Global List CTRL + SPACE If invoked while no list is active,
(Debug.StopDebugging)
Delete All Bookmarks CTRL + K, CTRL + L Deletes all bookmarks. or Complete a Word displays the IntelliSense completion
WordDeleteToEnd)
(Edit.ClearBookmarks) list for the current cursor position.
Change Casing CTRL + U and Changes the selected text Toggle Breakpoint F9 Sets or removes a breakpoint at the If a substring has already been
CTRL + SHIFT + U to lowercase and uppercase current line. (Debug.ToggleBreakpoint) Search typed and there is an exact
characters, respectively. (Edit. match in the list, completes the
MakeLowercase and Edit.MakeUppercase) Set Next Statement CTRL + F9 Sets the execution point to the line Find Symbol ALT + F12 Displays the Find Symbol dialog word without invoking the list. If
of code you choose. box. (Edit.FindSymbol) invoked while a filtered list is active,
Replace CTRL + H and Displays the Quick Replace tab (Debug.SetNextStatement) switches to the global list.
CTRL + SHIFT + H and the Replace In Files tab, Find All References ALT + SHIFT + F12 Displays a list of all references for (Edit.CompleteWord)
respectively, of the Find and Break at a Function CTRL + B Displays the New Breakpoint the symbol selected.
Replace dialog box. window. (Debug.BreakatFunction) (Edit.FindAllReferences) Common Tab ALT + COMMA (,) Decreases the filter level of the
(Edit.Replace and Edit.ReplaceInFiles) active IntelliSense list to the
Attach to Process CTRL + ALT + P Displays the Attach to Process Find Text CTRL + F and Displays the Find and Replace Common tab.
Extend Selection SHIFT + ALT + UP Moves the cursor one line up or dialog box. (Tools.AttachToProcess) CTRL + SHIFT + F dialog box for a single-file and
ARROW and SHIFT + down respectively, extending the multiple-file search, respectively. All Tab ALT + PERIOD (.) Increases the filter level of the
ALT + DOWN ARROW line selection. (Edit.LineUpExtendColumn Make Data Tip CTRL Hides the current data tip so that (Edit.Find and Edit.FindInFiles) active IntelliSense list to the All tab.
and Edit.LineDownExtendColumn) Transparent you can see the code beneath.
Must be invoked while a data tip Next and Previous F3 and Finds the next and previous Navigate Up CTRL + PAGE UP Navigates to the first item in the
Format Code CTRL + K, CTRL + D and Formats the current document is active. Search Result SHIFT + F3 occurrence, respectively, of the text IntelliSense completion list.
CTRL + K, CTRL + F or selection, respectively. (Edit. from the most recent search.
FormatDocument and Edit.FormatSelection) Immediate Window CTRL + G Displays the Immediate window. (Edit.FindNext and Edit.FindPrevious) Navigate Down CTRL + PAGE DOWN Navigates to the last item in the
(Debug.Immediate) IntelliSense completion list.
Display Smart Tag CTRL + DOT (.) or Displays the available options Next and Previous CTRL + F3 and Finds the next and previous
SHIFT + ALT + F10 on the Smart Tag menu. (View. Call Stack Window CTRL + L Displays the Call Stack window. Selected CTRL + SHIFT + F3 occurrence, respectively, of Commit an Item TAB or SPACE or ENTER Inserts the currently selected item
ShowSmartTag) (Debug.CallStack) the currently selected text in the list. The following characters
or the word at the insertion can also be used to commit:
Help F1 Displays a topic from Help that QuickWatch Window SHIFT + F9 Displays the QuickWatch dialog point. (Edit.FindNextSelected and Edit. {}().,:;+-*/^!=<>\
corresponds to the current user box. (Debug.QuickWatch) FindPreviousSelected)
interface element or to the code Escape the List ESC Closes the IntelliSense completion
item or error messages selected. Incremental Search ALT + I and Activates incremental search list. This can be useful if you want
(Help.F1Help)
Refactoring ALT + SHIFT + I (forward and reverse). If no input is to prevent the currently selected
typed, the previous search query is item from being inserted.
Refactor! for Visual Basic 2005 is a free plug-in from Developer used. (Edit.IncrementalSearch and
Express Inc., in partnership with Microsoft. Refactor! supports more
Build than 15 individual refactoring features including Extract Method,
Edit.ReverseIncrementalSearch)

Encapsulate Field, Reorder Parameters, Create Overload, and


Build Solution CTRL + SHIFT + B Builds all the projects in the Surrounds With. See http://go.microsoft.com/fwlink/?LinkId=74990 Stop Search ALT + F3, S Halts the current Find In Files
solution. (Build.BuildSolution) for more information. operation. (Edit.StopSearch)

Refactor! CTRL + TILDE (~) Invokes available Developer


Express Inc. refactorings.

You might also like