How to map keyboard to mouse buttons in OS X
Karabiner(formerly known as KeyRemap4MacBook) does exactly that. It allows you to remap the right Command button to a left click:
The same is possible for the right option key too. It worked for me on a 2011 MacBook Pro running Snow Leopard—couldn't test it on a "normal" Mac, but it should work regardless of that.
There's an app called BetterTouchTool. In its Preferences, under Keyboard, you can set any keyboard shortcut to map to a primary or secondary click. The problem is that cmd
and alt
are modifier keys, so they aren't a keyboard shortcut recognized by the app.
Another program called DoubleCommand might be worth mentioning as well, but it does not emulate clicks.
Related videos on Youtube
P i
Updated on September 18, 2022Comments
-
P i over 1 year
Severe RSI is causing me pain each time I click the mouse.
I would like to map the right CMD and OPT (which I never use) to function as left and right mouse button.
How can I accomplish this?
-
brevno over 12 yearsNone of those will make the key bound to a secondary click act like the Windows menu key though. You'll still need to move the cursor before pressing the key.
-
slhck over 12 years@Lri I didn't experience any problems with it – what exactly do you mean?
-
brevno over 12 yearsLike you can't use the primary or secondary click keys to perform actions on items focused with the keyboard.
-
P i over 12 yearsI have never used this functionality in OSX. If I can move the mouse with one hand and click with the other, this is enough.
-
snooze92 almost 10 yearsCan a key be mapped to "Hold mouse button"?