mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 20:50:06 +01:00
54 lines
1.9 KiB
Text
54 lines
1.9 KiB
Text
/**
|
|
@page motion_normalization Normalization of relative motion
|
|
|
|
Most relative input devices generate input in so-called "mickeys". A
|
|
mickey is in device-specific units that depend on the resolution
|
|
of the sensor. Most optical mice use sensors with 1000dpi resolution, but
|
|
some devices range from 100dpi to well above 8000dpi.
|
|
|
|
Without a physical reference point, a relative coordinate cannot be
|
|
interpreted correctly. A delta of 10 mickeys may be a millimeter of
|
|
physical movement or 10 millimeters, depending on the sensor. This
|
|
affects pointer acceleration in libinput and interpretation of relative
|
|
coordinates in callers.
|
|
|
|
libinput normalizes all relative input to a physical resolution of
|
|
1000dpi, the same delta from two different devices thus represents the
|
|
same physical movement of those two devices (within sensor error
|
|
margins).
|
|
|
|
Devices usually do not advertise their resolution and libinput relies on
|
|
the udev property <b>MOUSE_DPI</b> for this information. This property is usually
|
|
set via the <a
|
|
href="http://cgit.freedesktop.org/systemd/systemd/tree/hwdb/70-mouse.hwdb">udev hwdb</a>.
|
|
|
|
The format of the property for single-resolution mice is:
|
|
@code
|
|
MOUSE_DPI=resolution@frequency
|
|
@endcode
|
|
|
|
The resolution is in dots per inch, the frequency in Hz.
|
|
The format of the property for multi-resolution mice may list multiple
|
|
resolutions and frequencies:
|
|
@code
|
|
MOUSE_DPI=r1@f1 *r2@f2 r3@f3
|
|
@endcode
|
|
|
|
The default frequency must be pre-fixed with an asterisk.
|
|
|
|
For example, these two properties are valid:
|
|
@code
|
|
MOUSE_DPI=800@125
|
|
MOUSE_DPI=400@125 800@125 *1000@500 5500@500
|
|
@endcode
|
|
|
|
The behavior for a malformed property is undefined.
|
|
|
|
If the property is unset, libinput assumes the resolution is 1000dpi.
|
|
|
|
Note that HW does not usually provide information about run-time
|
|
resolution changes, libinput will thus not detect when a resolution
|
|
changes to the non-default value.
|
|
|
|
*/
|
|
|