2018-06-14 11:54:52 +10:00
|
|
|
# Do not edit this file, it will be overwritten on update
|
|
|
|
|
|
Implement a quirks system to replace the udev property parsing
Previously, we had all extra device information ("This is an Apple Touchpad",
"This touchpad causes pointer jumps", etc.) in the udev hwdb. The problem with
the hwdb is that updating it is nontrivial for the average user and debugging
when things go wrong is even harder. Plus, the hwdb has a matching scheme that
is unpredictable unless one is familiar with the implementation.
This patch set moves the hwdb entries into .ini style text files, with a
simple line-based parser. A new libinput list-quirks tool can list the quirks
applied to any given device, in --verbose mode it prints all matches as they
apply or not apply.
The data files are currently unused by libinput, that comes in a later patch.
They're installed though, the defaults point to the /usr/share/libinput
directory and for *temporary* local overrides the single file
/etc/libinput/local-overrides.quirks.
Failure to parse any file is a hard failure for the quirks system, but if the
local override file doesn't exist that's fine.
THIS IS NOT A CONFIGURATION INTERFACE! None of these settings are exposed via
the libinput_device_config_* calls. There is no API guarantee for these files,
think of them as source code.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-21 14:28:53 +10:00
|
|
|
[Synaptics Serial Touchpads]
|
|
|
|
|
MatchUdevType=touchpad
|
|
|
|
|
MatchBus=ps2
|
|
|
|
|
MatchVendor=0x0002
|
|
|
|
|
MatchProduct=0x0007
|
|
|
|
|
ModelSynapticsSerialTouchpad=1
|
2021-11-08 14:12:22 +10:00
|
|
|
|
2025-12-15 14:15:07 +01:00
|
|
|
# "SYNA3580:00 06CB:CFD2 Touchpad": pressure touchpad mostly used in HP laptops.
|
|
|
|
|
[Synaptics 06CB:CFD2 Touchpad]
|
|
|
|
|
MatchBus=i2c
|
|
|
|
|
MatchVendor=0x06CB
|
|
|
|
|
MatchProduct=0xCFD2
|
|
|
|
|
MatchUdevType=touchpad
|
|
|
|
|
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
|
|
|
|
|
2021-11-08 14:12:22 +10:00
|
|
|
# SYNA3602:00 0911:5288 touchpad, clickpad pretending it has a right button.
|
|
|
|
|
# Integrated into several systems, including
|
|
|
|
|
# Purism Librem 14v1
|
|
|
|
|
# Prestigio Smartbook 141 C2
|
|
|
|
|
# StarLite Mk II
|
|
|
|
|
# Iota IOTA2320
|
|
|
|
|
[Synaptics 0911:5288 Touchpad]
|
|
|
|
|
MatchUdevType=touchpad
|
|
|
|
|
MatchName=* 0911:5288 Touchpad
|
quirks: allow overriding of AttrEventCode and AttrInputProp
This switches the quirk from AttrEventCodeEnable/Disable to just
AttrEventCode with a +/- prefix for each entry.
This switches the quirk from AttrInputPropEnable/Disable to just
AttrInputProp with a +/- prefix for each entry.
Previously, both event codes and input props would only apply the
last-matching section entry for a device. Furthermore, an earlier Disable entry
would take precedence over a later Enable entry. For example, a set of
sections with these lines *should* enable left, right and middle:
[first]
AttrEventCodeEnable=BTN_LEFT;BTN_RIGHT;BTN_MIDDLE
[second]
AttrEventCodeDisable=BTN_RIGHT
[third]
AttrEventCodeEnable=BTN_LEFT;BTN_RIGHT;
Alas: the first line was effectively ignored (quirks only returned the
last-matching one, i.e. the one from "third"). And due to implementation
details in evdev.c, the Disable attribute was processed after Enable,
i.e. the device was enabled for left + right and then disabled for
right. As a result, the device only had BTN_LEFT enabled.
Fix this by changing the attribute to carry both enable/disable
information and merging the commands together.
Internally, all quirks matching a device are simply ref'd into an array
in the struct quirks. The applied value is simply the last entry in the
array corresponding to our quirk.
For AttrEventCode and AttrInputProp instead do this:
- switch them to a tuple with the code as first entry and a boolean
enable/disable as second entry
- if the struct quirk already has an entry for either, append the more
recent one to the existing entry (instead of creating a new entry in
the array). This way we have all entries that match and in-order of
precedence - i.e. we can process them left-to-right to end up
with the right state.
Fixes: https://gitlab.freedesktop.org/libinput/libinput/-/issues/821
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-15 13:53:43 +10:00
|
|
|
AttrEventCode=-BTN_RIGHT
|