Help assigning action to mouse middle click ?

Joined
Sep 23, 2007
Messages
2
Reaction score
0
Hi all, I hope I'm posting this in the right area of the forum.


I have a standard mac mouse - I see that I can change the middle click from dashboard to opening other files.

I would like my middle click button to instead run a keypress event like F1 instead. Is there a way to do this in the mouse settings? Or is there a way to write some sort of script that i have the middle click run which is equivalent to a key press ?


Any and all help is greatly appreciated - and would help with my workflow - i'm moving over from a pc where i had this set up. I'm just very green as of yet with my new mac.

Thx


(im not sure which mac i bought - it's white with a 22" screen....)
 
Joined
Sep 2, 2007
Messages
452
Reaction score
2
When you go to your Systems Preferences > Keyboard & Mouse, can you re-assign that button to "Other"? I'm sorry, I don't use Apple's mouse and am not familiar with it at all. However, most mice I've used allow for buttons to be customized via the mouse preference. Maybe Apple is different with its own mouse.
 
Joined
Sep 23, 2007
Messages
2
Reaction score
0
Yes, I can set it to other - i just dont know if i can type in there or not the keypress?

that is what my question ultimately is - what do i put under other to represent a keypress ?


- thx
 

Ric

Joined
May 14, 2004
Messages
4,260
Reaction score
5
Hi there and welcome !

you can do it...but you need to cheat a little !

You will need to use an AppleScript, the AppleScript will 'press' whatever key you want.

First you need to turn on GUI scripting support.

Go to System Preferences-->Universal Access and click the "Enable access for assistive devices"

Now you need to write the AppleScript...

Go to your Applications folder-->Utilities-->AppleScript and open Script editor..

then type:

Code:
 tell application "System Events"

    key code 122

end tell
Code:
Function Key     Key Code
  1         122
  2         120
  3         99
  4         118
  5         96
  6         97
  7         98
  8          100
  9          101
 10         109
 11         103
 12         111
 13         105
 14         107
 15         113
Then save the script as an Application...and assign it to the middle button in the Mouse preferences...

Hope that helps !

regards

Ric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top