Windows Mouse Acceleration Curve: SmoothMouseXCurve and SmoothMouseYCurve
What is the format of the data of SmoothMouseXCurve
and SmoothMouseYCurve
in the registry key:
HKEY_CURRENT_USER\Control Panel\Mouse
Solution 1:
The two registry keys contain the 5 coordinate pairs of a mouse acceleration graph inflection points (in this case, points in a graph that produce a curve). SmoothMouseXCurve contains the X coordinate points and SmoothMouseYCurve contain the Y coordinate points.
The first point is always 0,0, and refers to the beginning of the curved graph. So, if you inspect your values, you'll notice the first line of both registry values is 00,00,00,00,00,00,00,00
. Each subsequent line introduces an inflection point in the graph. Any point after the fifth isn't required since Windows will extrapolate the remaining of the graph from these 5 points.
Each coordinate pair (each line of the five lines in the registry keys) is written in a 16.16 fixed point format (16 bit int + 16 bit fraction). As such you will always only use the first 4 hex of each line. 2 for the integer part and two for the fractional part.
EDIT: This is a somewhat old article on mouse acceleration in XP. It still applies to Vista and Windows 7. However, to my knowledge the formulas have changed slightly, for which reason if you intend to draw your own acceleration graphs, you shouldn't trust those formulas. In any case, it gives you an idea of the process that hasn't changed since then.