4

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

  • 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
2

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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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