Comment 21 for bug 357204

Revision history for this message
donquixote (lemon-head-bw) wrote :

Sensitivity min, Acceleration max -> I am happy.
Thanks a lot, Pelládi Gábor (#16).

And yes, the options and their labeling are awkward.

This is how I think about it. There are different levels to approach this.
1) There is a factor between physical mouse movement (in centimeters) and cursor movement (in px). That's the most naive model, and I think it is almost never that easy.
2) There is a function from physical movement speed and cursor speed. In an ideal world, this function should be continuous. A curve. The shape of the curve can be controlled by different parameters. Such as, acceleration and speed. Or, in this case, acceleration and "threshold" (what they call "sensitivity"). "Physical movement speed" is a value calculated from the last two or more mouse positions (*). Obviously, (1) is just a special case of (2).
3) Looking at the mouse movement trail in the last x milliseconds, we decide how to move the mouse cursor. Obviously (2) is a special case of (3), and probably we want exactly that.

(*) How do we measure "physical movement speed" ?
I imagine, what we start with is raw data points sent by the mouse. Different mice send this data with different frequency and resolution.
At first thought, we would say that mouse speed can be measured by comparing two subsequent data points, and their distance in pixel.
But wait.. what if the raw data gives us 10 data points of silence, and then one sudden jump of 8px? Then again 6 ticks with no movement, and then another 8px sudden movement? All of this because the reporting speed and accuracy is much higher than the actual sensor speed and accuracy. No idea if this is what actually happens, but can very well imagine.
In this case we need to look at more than just the latest two data points, to get a reasonable guess about movement speed.

Usually, the OS has some built-in curve based on customizable parameters. Or maybe even more than that, a secret algorithm looking at more than just the current movement speed.

Now, would it not be sweet to have an API for custom mouse acceleration functions? This would be a nice playing ground..
Such an API should expose either the estimated movement speed (2), or even the raw data sent by the mouse (3), and the implementing software would return an acceleration factor, or a movement vector.
Then some students could spend their usability lessons, to code us a mouse acceleration suite :)