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?
KeyRemap4MacBook does exactly that. It installs under System Preferences and 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
Another program called DoubleCommand might be worth mentioning as well, but it does not emulate clicks.