Turn off mouse acceleration on Mac OS X

First of all, here is the user question: Disabling mouse acceleration on Mac OS X @superuser

To summarize: I want to have a linear mouse response on Mac OS X. That is, no acceleration; adjustable but constant pixels pointer moves / meters mouse moved .

I have no idea how to do this. (Well, not true, but it's better to start from scratch.) Should I write a mouse driver? Launching a program? Click and forget settings customizer? Settings panel?

I want my solution to be as simple, universal and non-intrusive as possible, so some criteria may be:

  • Runs on Snow Leopard (10.6.5) and later - much later, unless an important piece of the API is out of date
  • Works on mice, but not on touch tablets, tablets, magic wands ... (or maybe customizable?)
  • You can easily apply / manage other people who want the same thing (all 42 of us on the planet).

I am a fairly experienced C programmer, both in user space and in the kernel (on Linux and Windows), but I know almost nothing about Mac OS X or Darwin. So, something is really appreciated, actually ("cannot distribute drivers without a certificate from Apple"), but some documentation / link will take me a long way ("APIs and examples of Curve mouse editing for the next generation of Darwin").

I know that the question is a little open, but I don’t even know which solution can work. Thanks in advance.

Edit: although I asked both questions to solve the same problem, it is a software analogue of the other. (See the first sentence of this question.) Here I am trying to create my own solution, so to speak, using - I do not know - some kind of HID API? Driver? The solution stating "open user prefs file and changing this parameter to this" should probably be posted on another issue, but note that such a solution probably does not exist.

+55
mouse hid macos
Apr 25 '11 at 20:27
source share
1 answer

This answer is on the wrong site!

Most of my reputation at StackOverflow comes from the people who voted for this answer, which I wrote before I realized that there were several websites for sharing stacks, and that StackOverflow is only for programming questions and answers. So the question above is how to solve this problem if you want to encode your own mouse drivers. For all other discussions, go here on the superuser site where he belongs.

The following is the original answer.




Explanation

There is a hidden preference that you can change from the terminal. To read its current value type

 defaults read .GlobalPreferences com.apple.mouse.scaling 

at the command prompt of the terminal. Normal values ​​are 0 ~ 3, which can be set by moving the Tracking Speed ​​slider on the Mouse panel to System Preferences. Values ​​of 0 ~ 3 will not disable acceleration, therefore.

How to disable acceleration

However, if you set it to -1 by typing

 defaults write .GlobalPreferences com.apple.mouse.scaling -1 

in a terminal that seems to turn off acceleration and set the mouse tracking speed to some constant predefined value that you cannot change.

I found that I had to go out and go back in for it to take effect. After that, the ratio of pixels pointer moves / meters mouse moved is constant, but unfortunately it is not regulated.

How to undo changes

To return to Apple’s default settings, simply open the Mouse panel in System Preferences and change the tracking speed to anything, and then close System Preferences.

Mouse ≠ Trackpad

Mac OS X saves mouse and trackpad settings independently. If you want to disable acceleration on the trackpad instead of the mouse, the instructions will be the same, just replace com.apple.trackpad.scaling wherever you see com.apple.mouse.scaling in the above example (and use the System Preferences trackpad panel instead of the Mouse panel , obviously).

Notes

I will not refer to the source, as this tip is available in many places on the Internet. I tried this on OS 10.7 Lion, but many sources claim to use 10.6 Snow Leopard.

+63
May 21 '12 at 13:17
source share



All Articles