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

bbarker
  • 316
  • 3
  • 9
  • 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 04 '14 at 00: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 04 '14 at 00:35
  • Odd indeed. I'll post it as an answer anyway. – m4573r Jun 04 '14 at 09:24

1 Answers1

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.

m4573r
  • 5,561
  • 1
  • 25
  • 37