The exposure way and calculation method are defined in the "6.2.2.7 Global Items" section of the #USB HID spec 1.11. The general formula is
Resolution = (Logical Maximum – Logical Minimum) / ((Physical Maximum – Physical Minimum) * (10^Unit Exponent))
Unfortunately, I do not have a mouse device that exposes 'Unit Exponent' and 'Unit' for testing. Otherwise, it would be great to write a PR to #systemd or #libinput to add it.
=> More informations about this toot | View the thread
Devices usually do not advertise their resolution and libinput relies on the udev property MOUSE_DPI for this information.[1]
It seems that #libinput will first try to find the recommended value of the device, and if that fails, will use the hard-coded value, right? No! libinput directly uses the hard-coded value and systemd-udevd only provides fixed MOUSE_DPI. Neither libinput nor #systemd-udevd has the code to read #DPI from the HID Report Descriptor.
=> More informations about this toot | View the thread
=> This profile with reblog | Go to coelacanthus@yuuta.moe account This content has been proxied by September (3851b).Proxy Information
text/gemini