Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What combination of keys produce a right-click and a left-click?

share|improve this question

migrated from stackoverflow.com Oct 2 '10 at 18:40

This question came from our site for professional and enthusiast programmers.

1  
You should probably specify the OS, and window manager (if applicable). – Robert Kluin Oct 2 '10 at 16:57
    
windows7 system – Anonymous Oct 2 '10 at 16:58

There isn't one for left-click, though spacebar and Enter are often usable.

Right-clicking is usually a request for a context-sensitive menu which is performed on the keyboard either by clicking the Context key (menu/pointer looking thing usually to the right of the space bar between Alt and Ctrl (along with the Windows key), or by pressing Shift+F10.

Note that about 65% of programmers who write Windows applications think that they should open a context menu in response to a right-click (WM_RBUTTONUP--which a true amateur thinks is WM_RBUTTONDOWN). This is of course incorrect. The correct event to open a context menu from is WM_CONTEXTMENU (which is sent immediately following WM_RBUTTONUP or if the keyboard key is pressed).

What that means is that 65% of applications out there won't respond to the keyboard request for a context menu.

share|improve this answer
2  
+1 for "menu/pointer looking thing usually to the right of the space bar between Alt and Ctrl". Thanks. – Xavierjazz Oct 2 '10 at 21:03
4  
+1 for Shift+F10 as my stupid Logitech keyboard at work doesn't have the context key, it has a Fn key instead. If I could another +1 for the tip on trigger events too. – BeowulfNode42 May 21 '14 at 1:41
    
Ironically, SQL Server Management Studio falls within the 65%. ;-\ – Brad Christie Jan 11 '15 at 3:55
    
@BeowulfNode42 oddly enough, my Logitech keyboard has a <kbd>FN</kbd> inbetween the <kbd>Alt Gr</kbd> and the <kbd>Ctrl</kbd> keys, right of the <kbd>SPACE</kbd>. If I press the <kbd>FN</kbd> key and left click, I get a context menu. – Junto Apr 21 '15 at 14:21
    
Got stuck RDPing to a server and was trying to right click in a VM with no mouse; Shift+F10 saved the day. – Chris Nov 14 '15 at 3:06

You can define your own using software like autohotkey:

Example

This code replaces:

  • left alt to left mouse click
  • right alt to right mouse click

Code:

LAlt::LButto
RAlt::RButton

Link to autohotkey keyboard remapping: link
Link to autohotkey download : link

share|improve this answer
3  
If you're actually after the context menu (and not a physical rt-click) use ~RAlt::AppsKey in your AutoHotKey script. – yhw42 May 27 '11 at 18:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.