Find Keyboard Shortcuts
Menu: Tools -> Options -> Keyboard
Command: Tools.CustomizeKeyboard
Versions: 2008,2010
Published: 8/2/2010
Code: vstipTool0061
Ever just want to see what keyboard shortcuts there are for something? Let's say, for example, that you want to see if View -> Code has any keyboard shortcuts. A quick look at the Menu doesn't reveal anything:
But that's not the end of the story. If we go to Tools -> Options -> Keyboard we get this dialog:
Pretty much everything you do in Visual Studio has a command that runs to execute that action. In our case, we know that View -> Code was the path to the command we wanted so let's start by trying to see if there is a "View.Code" command. Notice that commands use dot notation between items:
Sadly, what we want isn't there. Okay, so either it isn't there or it's called something else. We still know it's off the View Menu so let's put in "View." and browse to see if anything pops up:
If we scroll down far enough we actually find an entry for "View.ViewCode". If we look under the "Shortcuts for selected command" we see a couple of shortcut entries:
It looks like pressing F7 in the Designer will do the trick, let's try it. Go to the Designer:
Press F7 and--
Voila! Sure enough we have discovered the shortcut key for viewing code in the Designer.
There as also another entry for the Class Diagram that should use ENTER to show us code. Let's whip up a Class Diagram and select a class:
Then press ENTER and--
Sure enough it takes us to the code as well. So now you know how to find shortcut keys (if they exist) for a command.
We also produce keyboard shortcut "posters" that can help you in your day-to-day work. Here is where you can find them:
Visual Studio 2010
All Languages 2010: https://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=92ced922-d505-457a-8c9c-84036160639f
Visual Studio 2008
Visual Studio 2005