Are there Mac Terminal commands to assign keystrokes to mouse clicks?

The aim here is simple. I have a generic three-button mouse for which there's no customizing driver available, and I want it to do this:

- rightclick = command+leftclick (replacing control+leftclick)
- wheelclickdown = close-window (cmd-w) 

A mouse on another Mac I use does this with its driver, and I could get that one for this machine, but I've found a mouse that feels just right in my hand and I'd like to use it -- if I can create those key assignments.

Or is there some other way to do this? There are third-party generic drivers that do it, but for minimalist purposes I would like to do it with the Mac itself. This seems such a simple basic thing.

link|improve this question
What does this have to do with Terminal? You'd reject any solution that requires you to open a text editor? – Daniel Beck Jun 1 '11 at 23:24
I'm surely open to any method to do this. Terminal just seemed one likely possibility. Do you know a way to do it? Thank you. – R Smith Jun 1 '11 at 23:35
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.