Posts tagged 'Keyboard Shortcut'

Saturday, November 23, 2013

Tip 0.0: How to Look Up, Change, or Create Visual Studio Keyboard Shortcuts

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Sara Aside

Seriously, she cannot stress enough how imperative it is that you know which development settings you are using, in order to know the right keyboard shortcuts for these commands. This "tip" is so critical that she calls it Tip 0.0. She really wants you to have a good time with this book, so please read this tip before continuing your adventures in Visual Studio Tips Land.


What Will This Keyboard Shortcut Do?

To find out what command a keyboard shortcut is bound to:
  1. Go to the Tools–Options dialog box and navigate to the Environment–Keyboard page.
  2. In the Press Shortcut Keys edit box, press the keyboard shortcut you are inquiring about.
The Shortcuts For Selected Command combo box displays the associated command(s). If there are no commands associated with the keybinding, the combo box is empty. Please be sure to drop down the list if there are multiple commands associated with that command.



What Is the Keyboard Shortcut for This Command?

To view a keyboard shortcut for a given command:
  1. Go to the Tools–Options dialog box and navigate to the Environment–Keyboard page.
  2. Type the command name in the Show Commands Containing edit box or select the command from the list box.
The Shortcuts For Selected Command combo box will display the keyboard shortcut, if it exists.



How to Create or Change a Keyboard Shortcut

To change or create a keyboard shortcut for a given command:
  1. Go to the Tools–Options dialog box and navigate to the Environment–Keyboard page.
  2. Type the command name in the Show Commands Containing edit box or select the command from the list box.
  3. In the Press Shortcut Keys edit box, press the keyboard shortcut you want to associate with the currently selected command. The Press Shortcut Keys edit box will display the keybinding you pressed for your confirmation.
  4. Click Assign.
If there's a conflict, the Shortcut Currently Used By combo box will show the conflict. Click Assign to override the conflict.



Note that there are different scopes. The Use New Shortcut In combo box shows the current scope for a given keyboard shortcut. For example, keyboard shortcuts assigned in the Text Editor scope will work only when focus is in the editor, regardless of whether you are editing a plain text file or a C# file. If there's ever a conflict between a keyboard shortcut in the global scope and any other scope, the more specific scope wins, and that command executes.

Where Are the Keyboard Shortcut Reference Posters?

The Visual Studio team provides some keyboard shortcut reference posters, which are based on the standard U.S. English keyboard layout as shown at http://www.microsoft.com/en-us/download/details.aspx?id=13189.

Note this book explores many of the less-commonly known aspects of the IDE. So it is still a good idea to be familiar with Tip 0.0, in the case that these posters don't cover a specific command or keyboard shortcut.

Keyboard Shortcut Reference Posters for Visual Studio: Visual Basic 2010 keybindings: http://www.microsoft.com/en-us/download/details.aspx?id=13189 Visual C# 2010 keybindings: http://www.microsoft.com/en-us/download/details.aspx?id=13189 Visual C++ 2010 keybindings: http://www.microsoft.com/en-us/download/details.aspx?id=13189 Happy Programming! =)
Posted by Nils-Holger at 12:03 PM with 1665 comments.