views:

395

answers:

4

Argggg!,

I'm trying to force myself to use as little mouse as possible and I can't find the answer to this simple short-cut anywhere! Here the the steps:

  1. Open up Visual Studio. Open any C# file (or any code file I believe)
  2. Point your mouse anywhere on the window/file.
  3. Right Click

Is there a shortcut key for this so I don't have to move my hand to the mouse?

Thanks, - Matt

+11  A: 

Taken from lytebyte, you've got two options:

  • Shift-F10
  • That nutty key on the bottom-right of a modern Windows keyboard, the Menu key
boflynn
Yes! thank you :-)
matt_dev
+1  A: 

Assuming you just want a key you can press to right click, most\many keyboards have a key between alt and ctrl that right clicks.

notJim
+3  A: 

Depends on where/why you're right-clicking.

The context-menu key is on the right of the keyboard nowadays, usually between the Windows key and the Control key on the right of your spacebar. That will open the context menu whereever the current focus is (usually in the text editor).

If you're using the right mouse button just to open the refactoring tools, you can use Ctrl+. (control period) to pop open the "smart tag" on any identifier. That'll get you the "generate method stub" menu item and the like.

Matt Hamilton
Good suggestion with "Ctrl+." I love this key combo and use it all the time, it's SO much quicker and less fiddly than using the mouse.
lennyk
+2  A: 

Does your keyboard have the extra 'Windows' keys, ie. the Windows logo (Start key) and the one on the right-hand side of the spacebar that looks like a menu? Cause that button on the right-hand side is the 'Context menu key'.

See the key between the right-hand side 'Windows' key and the 'Ctrl' key? Windows Keyboard layout

If your keyboard is less than 10 years old you should have these keys, unless you have an IBM laptop or a Mac.!

lennyk