doc/user: document the device quirk MatchFoo statements

Closes #1001

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1016>
This commit is contained in:
Peter Hutterer 2024-06-17 15:22:57 +10:00 committed by Marge Bot
parent be78ce12a3
commit 82322a4c57

View file

@ -10,10 +10,10 @@ under specific conditions. libinput ships a set of files containing the
so-called model quirks to provide that information. Model quirks are usually
installed under ``/usr/share/libinput/<filename>.quirks`` and are standard
``.ini`` files. A file may contain multiple section headers (``[some
identifier]``) followed by one or more ``MatchFoo=Bar`` directives, followed by
at least one of ``ModelFoo=1`` or ``AttrFoo=bar`` directive. See the
``quirks/README.md`` file in the libinput source repository for more details on
their contents.
identifier]``) followed by one or more :ref:`MatchFoo=Bar <device-quirks-matches>`
directives, followed by at least one of ``ModelFoo=1`` or ``AttrFoo=bar`` directive.
See the ``quirks/README.md`` file in the libinput source repository for more
details on their contents.
.. warning:: Model quirks are internal API and may change at any time. No
backwards-compatibility is guaranteed.
@ -197,3 +197,34 @@ AttrPointingStickIntegration=internal|external
AttrTabletSmoothing=1|0
Enables (1) or disables (0) input smoothing for tablet devices. Smoothing is enabled
by default, except on AES devices.
.. _device-quirks-matches:
------------------------------------------------------------------------------
List of currently available matches
------------------------------------------------------------------------------
``Match*`` statements are how quirks are assigned to a device. Quirks with multiple
match statements must match all of those to apply.
.. warning:: Quirks are internal API and may change at any time for any reason.
No guarantee is given that any ``Match`` statement below works on
your version of libinput.
MatchName, MatchUniq
Match on the ``NAME`` or ``UNIQ`` udev property on this device. These properties
are typically derived from the device's kernel name or uniq but may be overridden
by a udev rule. These matches use ``fnmatch()`` globs.
MatchBus
A lower-case bus name. Currently supported are ``usb``, ``bluetooth``, ``ps2``,
``rmi``, ``i2c``, and ``spi``.
MatchVendor, MatchProduct, MatchVersion
The hexadecmial 4-digit vendor ID, product ID or driver version as exported, without
a ``0x`` prefix.
MatchDMIModalias, MatchDeviceTree
An ``fnmatch()`` glob for the DMI modalias or the DeviceTree ``compatible`` string.
See ``/sys/class/dmi/id/modalias`` and ``/sys/firmware/devicetree/base/compatible``.
MatchUdevType
One of ``touchpad``, ``mouse``, ``pointingstick``, ``keyboard``, ``joystick``,
``tablet``, ``tablet-pad``. Matches the corresponding ``ID_INPUT_*`` udev
property.