Share via


Accessing the Menu Bar

Versions:  2005,2008, 2010
Code:  vstipEnv0060

 

This tip came up recently and has been around for a while.  Did you know you can access the Menu Bar using the keyboard?  By default the Menu Bar looks like this:

image

 

 

But, if you press the ALT key it sets the focus to the Menu Bar and the accelerator keys (underlined letters) become visible:

image

 

 

To access the View Menu, for example, you can press ALT + V anytime in the application:

 image

 

Notice there are accelerator keys for the Menu Items as well.  These don’t require you to press the ALT key just press the underlined letter.  To get to Solution Explorer you would press “P” (case doesn’t matter).

 

So there are two main keyboard shortcuts to get to Solution Explorer:

1.  CTRL + ALT + L

2.  ALT + V, P

 

Typically you will choose the first option but, for those items that don’t have a shortcut key assigned, the Menu Bar option can be a quick and easy way to access functionality.

 

 

 

Turning On the Accelerator Keys

There is a way to make it so the accelerator keys are always visible if you want.  In Windows 7, just go to Start –> Control Panel:

image

 

 

Then click on Ease of Access:

image

 

 

Select Change How Your Keyboard Works:

image

 

 

Finally, select Underline Keyboard Shortcuts And Access Keys and click OK:

image

 

Now the accelerator keys on Menu Bars will show up without having to press ALT to see them.

Comments

  • Anonymous
    January 10, 2011
    Hey Now Zain, Nice post! When we have the 'Productivity Power Tools' extensions installed in VS10 we can also use Alt +V, S to open the 'Solution Navigator' which is a great feature.  has some nice features. Thx 4 the info, Catto

  • Anonymous
    January 10, 2011
    Hey Catto :) Yeah everyone should install the Productivity Power Tools if they haven't already.  I am even thinking of doing some posts on the tools.  Haven't decided yet. Z

  • Anonymous
    January 11, 2011
    Believe it or not, this is a Window settings (to turn off menu underlining or not). www.vistax64.com/.../42125-always-show-menu-underline-keyboard-accelerators.html

  • Anonymous
    January 11, 2011
    Hey Flip :) Great point!  I completely forgot about that.  I'll update the post to reflect the new information.  Thanks you rock! Zain

  • Anonymous
    January 11, 2011
    There's another handy trick you can do with this - if any window has ended up off screen somehow then you can get it back on screen by pressing a few keys. It's especially useful when the window has no task bar entry.

  1. Give the window focus. Alt-tab can be helpful here.
  2. Press these keys in order: Alt, Space, M,  any cursor key.
  3. Move the mouse. The window should now be attached to it. You can try it with a visible window to see how it works.
  • Anonymous
    January 11, 2011
    Nice Tip Adam! I've known that tip for years and never realized that you could use the mouse with it (I've always used the arrow keys).  The only step I would add would be to press ENTER when you have the window where you want it.  Hitting ESC will cancel the move if you decide you don't want to move it. Z