Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Enable third button options for generic third-party mice Other Hardware
I won't discuss the pros or cons of Apple's Mighty Mouse here, as mine just broke. Or more to the point, I broke it -- the sticking little ball just drove me round the bend. Anyhow, I ended buying myself a simple, cheap and quite nice USB optical mouse. Nothing fancy. Two main buttons plus a scroll/button wheel (ie: a scroll wheel that you can also click). So far so good. Until I re-installed my System.

Once in I started setting the system up like I wanted it, to my horror, the Mouse preferences didn't show me the third button on my mouse! Now what? Well it turns out that the System treats the Mighty Mouse special. That is, it recognizes it as such and brings up the corresponding preferences. Great, what about the rest of us?

I scoured the net for several days trying to find out if someone had worked it out. I did find one solution. Just plug in a Mighty Mouse, set the preferences, plug it out, use you other mouse -- the preferences will 'stick.' Fine, what if you don't happen to have a Mighty Mouse just lying aroud?

Most people replace their mouse with fancy Logitech, Microsoft or MacAlly mice that bundle their own drivers that allow all kind of wonders to be done. But what about us simple folk that want a no-frills but functional mouse (not to mention five times cheaper)?

Caution: Terminal and root access required.

What you need to do is replace the USB ID of your mouse with the ones that correspond to the Mighty Mouse. Find your mouse's IDs (VendorID and ProductID) in System Profiler, under the USB section. There they will show up in hexadecimal form, ie: 0x0021. You can use the Calculator in Programmer view mode (View » Programmer) to convert these values to decimal form. For example, 0x0021 is 33).

Make a backup of /System » Library » Extensions » AppleHIDMouse.kext just in case. Next you need to edit this file. I used:
sudo nano /System/Library/Extensions/AppleHIDMouse.kext/Contents/PlugIns/AppleUSBHIDMouse.kext/Contents/Info.plist
There are several occurrences of the IDs; I didn't bother finding out which was which, I just changed them all. You are looking for this:
<key>idProduct</key>
<integer>772</integer>
<key>idVendor</key>
<integer>1452</integer>
Change the 722 and 1452 to the respective numbers for your mouse, then save the file. (If you're using nano, you save by pressing Control-X and Return.)

After quitting the editor, unplug your mouse, and then type this command in Terminal:
sudo kextload /System/Library/Extensions/AppleHIDMouse.kext
Plug your mouse back in, and you should be good to go -- when you go into the Mouse tab of the Keyboard & Mouse System Preferences panel, you will see the Mighty Mouse setup. Set up as you like; I use the scroll button with the Application Switcher.

Now, since the preferences stick and in the future you might get an Apple mouse, we can now put back the original numbers. I actually copied my backup back to the extensions folder. The System will ask you to authenticate. I got a message saying that the extension was not properly installed, but a restart fixed that.

You can in fact do all this with a .plist editor, like the one installed with the Developer tools. I did not find any freeware .plist editors. Anyway, you still need to start it up with root access, or your changes will not be saved.

[robg adds: I haven't tested this one, and please heed the backup advice if you intend to try this.]
    •    
  • Currently 1.71 / 5
  You rated: 4 / 5 (7 votes cast)
 
[10,200 views]  

Enable third button options for generic third-party mice | 15 comments | Create New Account
Click here to return to the 'Enable third button options for generic third-party mice' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Enable third button options for generic third-party mice
Authored by: rhowell on Jun 03, '09 07:49:15AM

"Replace the USB ID of your mouse with the ones that correspond to the Mighty Mouse."

The author must have gotten this idea from Palm?



[ Reply to This | # ]
Enable third button options for generic third-party mice
Authored by: Xris on Jun 03, '09 11:18:39PM

I got the idea from a fix (also posted here) for my isight.



[ Reply to This | # ]
Enable third button options for generic third-party mice
Authored by: tempel on Jun 03, '09 07:54:16AM

I guess it might even be safer not to alter the original driver file but instead make a copy of it, rename that to your liking and then make the changes there. That way, if Apple updates the AppleHIDMouse.kext driver, your own changes won't get overwritten.

Thus you end up with your "own" driver suited for your mouse.



[ Reply to This | # ]
Enable third button options for generic third-party mice
Authored by: kyngchaos on Jun 03, '09 09:03:22AM

And remember to update the custom driver if Apple's is updated.

Also, custom kext's on Leopard go in /Library/Extensions and should have owner:

root:wheel



[ Reply to This | # ]
Enable third button options for generic third-party mice
Authored by: uxjw on Jun 03, '09 09:28:44AM
I've been using a program called SteerMouse to customize my 9-button mouse, although it will go up to 16 buttons. http://plentycom.jp/en/steermouse/

[ Reply to This | # ]
Enable third button options for generic third-party mice
Authored by: tuckerch on Jun 03, '09 09:32:17AM

Or... spend a few bucks and make your mouse infinitely more useful.

USB Overdrive will allow you to not only use the third button on the mouse, it will allow you to customize all the buttons and the click/scroll states on the wheel for individual applications.

For example, scroll up down in a browser window/(click & hold) change font size, volume up down in iTunes/(click & hold) Scroll up down the song list in iTunes.

No messing with Terminal required.

I've been using USB Overdrive since my days on a 5500/225 and OS 9.



[ Reply to This | # ]
Enable third button options for generic third-party mice
Authored by: llee on Jun 03, '09 09:33:26AM

I couldn't make this work for my Kensington Ci75m, which sadly can't use the Kensington Mouseworks software that I use for my other Kensington mice. What confuses me, though, is that the author mentions several occurrences of the Product and Vendor ID keys in the "/System/Library/Extensions/AppleHIDMouse.kext/Contents/PlugIns/AppleUSBHIDMouse.kext/Contents/Info.plist" file, but I could only find two, and the names for those weren't the same (the first pair was "idProduct" and "idVendor", while the second pair was "ProductID" and "VendorID". I'm using 10.5.7.



[ Reply to This | # ]
Enable third button options for generic third-party mice
Authored by: Mega_Hertz on Jun 03, '09 09:42:14AM

I have never converted hex to dec before
if i have a letter in my hex 0xc016
do i put it into the hex convertor
your example was numbers only
and i get completely different dec with and without the letter



[ Reply to This | # ]
Enable third button options for generic third-party mice
Authored by: Osc on Jun 03, '09 03:30:20PM

drop the 0x and convert everything else.

hex has a 16 char alphabet, 0-9 + A-F



[ Reply to This | # ]
Enable third button options for generic third-party mice
Authored by: Anonymous on Jun 03, '09 03:32:34PM

Yes. "0x" is a prefix that means "what follows is a hexadecimal number".

So, c016 in denary is 49174.



[ Reply to This | # ]
Enable third button options for generic third-party mice
Authored by: kyngchaos on Jun 03, '09 09:54:25AM

Big problem for me: reversing the primary/secondary buttons for left-handed use does not work, primary is *always* left and whatever I assign to the left (secondary, app switch, ...) is triggered with the right button.

Another issue is that the scroll wheel acceleration may be very different in 3rd party mice, and that info is defined in the plist in binary form. Though the movement acceleration may also be different, that info is not in the plist.



[ Reply to This | # ]
Enable third button options for generic third-party mice
Authored by: osxpounder on Jun 03, '09 09:58:14AM

Thanks for the hint. Because I use computers for many hours, every day, and have dealt with sore hands and wrists for years, I like knowing what my options are.

Part of my day is now spent in a a lab/teaching space with basic iMac setups, including the despicable Mighty Mouse. Most days, I unplug that and use a trackball mouse I carry in the laptop bag. On those Macs, however, I can't install any drivers. Luckily this amidextrous Logitech trackball's two main buttons work without the nice pref pane that its install disk inserts into my own Macs.


(BTW, I won't go into detail here, but, yes, I've seen doctors, I do prescribed stretches, and use prescribed ergonomic tools like keyboard trays, curved keyboards, and a selection of mice and trackballs.)



[ Reply to This | # ]
Enable third button options for generic third-party mice
Authored by: wallybear on Jun 03, '09 01:58:12PM

Strange, I cannot replicate the problem of the missing third button.
I never used the Mighty Mouse on my two iMacs (office and home), I plugged two cheap mice (a 5 buttons one at office, a classic scroll mouse at home) with no drivers.
Never plugged a mighty mouse, and I can configure all buttons from the Expose/Spaces preference panel, that detects the extra buttons.

The only two functionalities you miss (as they are present in the Mighty Mouse pref pane only) are "Application switcher", "Spotlight" and "Other..."



[ Reply to This | # ]
Enable third button options for generic third-party mice
Authored by: Xris on Jun 03, '09 11:38:57PM

Mi problem wasn't that the button didn't show up, it was that I didn't get the extra options as in the Mighty Mouse settings. Most notably the Application Switcher, which was the one I wanted.

@tuckerch:

Yes I also found several app's, preference panes, drivers, etc... But why pay when you can hack for free (apart from the fact that I have no means (credit card) to pay for software over the web ;-( ).

@llee.

As I said in the hint, I changed ALL instances. And don't forget to unplug, load the new .kext, and then replug you mouse.

@tempel:

Since the preferences "stick", you can put the .kext back to its original form and your changes will survive (at least several on my 10.4 installation) updates.



[ Reply to This | # ]
Enable third button options for generic third-party mice
Authored by: helpmymac on Jun 16, '09 09:25:28AM

Hello,

I successfully installed this but now I'm faced with a problem. The mighty mouse preference pane didn't quite live up to my expectations though. I've tried returning to the default settings, but haven't been able to. I edited the file in question and replaced the values, but as you said, the settings would stick. Is there a way to remove this thing again? If so, how? I'd be very thankful if somebody came up with a solution/answer. Thanks.



[ Reply to This | # ]