Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 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 at 0:35
    
Odd indeed. I'll post it as an answer anyway. –  m4573r Jun 4 at 9:24
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.