[systemd-devel] [PATCH] hwdb: add a new db for the DPI/frequency settings of mice
Peter Hutterer
peter.hutterer at who-t.net
Tue Nov 25 14:36:55 PST 2014
On Tue, Nov 25, 2014 at 09:30:07PM +1000, Peter Hutterer wrote:
> Pointer acceleration for relative input devices (mice, trackballs, etc.)
> applies to the deltas of the device. Alas, those deltas have no physical
> reference point - a delta of 10 may be caused by a large movement of a low-dpi
> mouse or by a minute movement of a high-dpi mouse.
> Which makes pointer acceleration a bit useless and high-dpi devices
> essentially unusable.
>
> In an ideal world, we could read the DPI from the device directly and work
> with that. In the world we actually live in, we need to compile this list
> manually. This patch introduces the database, with the usual match formats and
> a single property to be set on a device: MOUSE_DPI
>
> That is either a single value for most mice, or a list of values for mice that
> can change resolution at runtime. The exact format is detailed in the hwdb
> file.
>
> Note that we're explicitly overshooting the requirements we have for libinput
> atm. Frequency could be detected in software and we don't actually use the
> list of multiple resolutions (because we can't detect when they change
> anyway). However, we might as well collect those values from the get-go,
> adding/modifying what will eventually amount to hundreds of entries is a
> bit cumbersome.
>
> Note: we rely on the input_id builtin to tag us as mouse first, ordering of
> the rules is important.
[...]
> ---
> +##########################################
> +# Lenovo
> +##########################################
> +
> +mouse:usb:v17efp6019:name:Lenovo Optical USB Mouse:
> + MOUSE_DPI=1000 at 125
urgh, and I just noticed that I had a double-space here which caused the
whole thing to break for this mouse (but is hard to see in the udevadm
output...)
I'll send a new revision once we decide what to do with the naming.
Plus, would a fix be welcome to ignore multiple leading whitespaces? This
has caught me several times now and I keep making this mistake.
Cheers,
Peter
More information about the systemd-devel
mailing list