Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I would like to write a simple script (one-liner?) to map the left shift + right mouse button to the middle mouse button (I don't actually have a middle mouse button, as it is a trackpad).

I have tried variations of this:

#(LShift & RButton)::MButton

or

(LShift & RButton::MButton

or

LShift & RButton::MButton

always with the error Error: Invalid Hotkey. I came here through the somewhat less specific question: Emulate middle mouse click on a two button mouse in Windows 7

share|improve this question
    
You can use <+RButton to get rid of the error. However, the behavior I get on my machine is weird and I couldn't get what you want... – m4573r Jun 4 '14 at 0:30
    
This seems to work for me!: <+RButton::MButton Happy to accept it as an answer, but it is odd that it is not behaving well for you. – bbarker Jun 4 '14 at 0:35
    
Odd indeed. I'll post it as an answer anyway. – m4573r Jun 4 '14 at 9:24
up vote 1 down vote accepted

You can use <+RButton::MButton to get what you want.

I'm not sure why your last line didn't work though. But <+ is a shortcut for left shift, and apparently Autohotkey prefers it.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .