KnockKnock - Some Mac Stuff
Some mad ramblings of a somewhat disappointed and annoyed new Mac user (well, ok, not so new now, but this was written in 2005).
MouseFix - V 1.2 - 20/08/2006
Rant
Despite more years than I care to remember pressing buttons on other machines, I am pretty new to Macs (I bought my first and probably my last in May 2005; just before its obsolescence was announced!).
One of the most obvious and instantly annoying problems (well, apart from the even more obvious fact that it doesn't have a proper UK keyboard which is, frankly, taking the piss on a machine of this price) I found was that the mouse seems to have a mind of its own. Instead of a nice linear movement, the driver insists on implementing a very poor acceleration algorithm (actually, the algorithm is probably fine (well, maybe); it's the parameters it's using that are rubbish).
The worse part of this is of course, that you can't switch this 'feature' off!
There is a shareware program available called 'USB Overdrive' that (apparently) fixes this (and provides support for other mouse-like devices too), but it costs $20 or so, and I strongly resent paying even a trivial amount of money to fix some basic functionality that should never have been knackered up in the first place.
There is also a free utility called 'MouseZoom' but in my experience, it does not actually fix the jumpy acceleration problem; it just allows the speed of the mouse to be changed beyond the limits of the normal mouse control panel.
Just for the record, I'm not having a go at either of the above programs; I'm sure they are both fine as far as they go; they just don't do what I want... for free.
What It Is
So....
I wrote MouseFix. It's a very simple command line program that will allow you to regain control of the situation and makes the Mac at least half-usable. Even with MouseFix, the mouse movement is still pretty ropey. Maybe I've not hit on the optimal parameters or maybe the driver is just ...errr ...not very good.
MouseFix is a trivial program. It really doesn't do anything special. In fact it has taken me considerably longer to write this web page than MouseFix itself.
NOTE: MouseFix was developed (if you can call it that!) and built on a G5 using OS-X 10.4.1. I can't be certiain but I would be rather surprised if it didn't also work on 10.3 and probably many previous version of OS-X too. So if in doubt, I would give it a go; it won't do any harm and at worse it will just not work.
If anyone does have problems running this on other versions of OS-X (or on a G4 or Pentium4 :-) ) and can build a version that DOES work (it will probbaly just need compiling without change), then if you send me the resulting executable, I'm happy to post it up here for others to use.
To answer some questions that have been raised concerning MouseFix...
- How does it work? The program really is trivial. If you look at the code you will clearly see how little it actually does. All it does is to poke some numbers into the mouse driver which set up the acceleration curve and the speed of the mouse / cursor relationship. It does NOT patch any code; it simply explains to the mouse driver the error of its ways :-)
- Does it use any CPU time? None. When you run it, it does its work and then exits.
- Can you add a pretty user interface and make it less geeky? Sorry - my knowledge of Macs is very limited and my knowledge of the GUI is non-existent. I've only had my Mac a couple of months and I use it to do my work. I simply do not have the time to learn how to make pretty user interfaces. Besides, once it's running, forget it - there is no need to twiddle with it again. And a user interface would add massively to the size of the program (which I know is not really the point, but I hate bloat). If you disagree then feel free to take the code and wrap a nice interface round it. Be nice and make it free for everyone to use though :-)
UPDATE - A GUI version is now available - see 'Download' below.
- Why do bogus (empty) files exist in the tarball? If you get multiple (blank) files when you uncompress the tarball then I'm sorry but I have no idea why this happens. It's fine for me (unless I use Stuffit then I get some extra, bogus, files - I assume this is a bug in Stuffit). The extra files were certainly not there when I made the archive. Just ignore them.
Bugs...
- MouseFix uses a deprecated API (NXSetMouseScaling). I don't know how I missed this at the time, but there you go. As of OS-X v 10.4, this API is deprecated. So, it looks like MouseFix will not work at some point in the future when the OS is updated and the API is finally removed. Unfortunately, I can't find an alternative to use; it would seem that like so many things on the Mac, Apple seem to want to restrict what you can and can't do with it for no reason other than they can, because they're right and you're worng... right?. If anyone knows of a replacement for this API then I would be very interested to hear about it.
Download
There are presently two versions of MouseFix available - V 1.1 and V 1.2.
V 1.1 includes a very small (but very worthwhile) change suggested by Lance Burns. The change improves the linear response of the mouse. For further details, see the README file in the tar archive.
Anyway, if you are interested, you can download a tar archive of V 1.1 containing both the source code and a pre-compiled executable from HERE. The executable was built from the enclosed source on a G5 running OS-X V 10.4.3 and is ready to run.
The MD5 hash for the V 1.1 archive is 064ec265c3ede40bdc248c086bba0391.
V 1.2 includes a further change to the acceleration curve based on data from Windows XP. This data has been compiled and developed by Aaron Johnson. Some people may prefer this version to V 1.1; I suggest you try both and see which you prefer.
You can download a tar archive of V 1.2 containing both the source code and a pre-compiled executable from HERE. The executable was built from the enclosed source on a G5 running OS-X V 10.4.6 and is ready to run.
The MD5 hash for the V 1.2 archive is cb94eb4604d7d45b7cebfd8f55d80cb3.
GUI Version: Audun Steinholm has written a GUI version of MouseFix which many people will probably find much more to their liking. It's free and you can find it HERE. Please note that this may be based on the previous version (V 1.0) of MouseFix
Help For The Clueless
If you really haven't got a clue, then this is what you need to do to use this. Download the tar archive and save it to your local disk. Assuming you have saved it to the desktop (for example), then open a command line and type the following (or cut and paste this text here)
> cd Desktop
> md5 MouseFix.tar.gz
This will print a number. Check that it is exactly the same as the one printed above. If it is not then there is either something wrong with the archive or someone has tampered with it. In either case, do not use it.
> tar -xzf ./MouseFix.tar.gz
This will uncompress the archive and should result in a directory called MouseFix. In this directory you should see a file called 'mousefix' and one called 'README' and two other files which you won't need unless you intend building MouseFix from source code. Read the README file for further instructions on how to use and install MouseFix.
If you have Stuffit installed then you should just be able to click on the archive file and it will expand. When I tried this though, Stuffit seemed to create some additional files with 1's appended to their names. It doesn't seem to affect the files extracted but goodness knows why it's happening! Maybe it's just another of those lovely Mac 'features'?
Signing Off...
Feel free to make and distribute copies of this program but read the terms and conditions in the README file and in the top of the source file before you do.
If you want to email me concerning MouseFix then you will find an email address in the top of the README file of the tar archive
A totally irrelevant link