Compare commits

..

No commits in common. "main" and "1.29.902" have entirely different histories.

299 changed files with 2705 additions and 6669 deletions

View file

@ -49,6 +49,8 @@ include:
- '/templates/debian.yml' - '/templates/debian.yml'
# Fedora container builder template # Fedora container builder template
- '/templates/fedora.yml' - '/templates/fedora.yml'
# Freebsd container builder template
- '/templates/freebsd.yml'
# Ubuntu container builder template # Ubuntu container builder template
- '/templates/ubuntu.yml' - '/templates/ubuntu.yml'
@ -101,17 +103,19 @@ variables:
UBUNTU_PACKAGES: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme python3-pytest-xdist libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev lua5.4-dev' UBUNTU_PACKAGES: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme python3-pytest-xdist libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev lua5.4-dev'
ARCH_PACKAGES: 'git gcc pkgconfig meson check libsystemd libevdev python-pytest-xdist libwacom gtk4 mtdev diffutils lua' ARCH_PACKAGES: 'git gcc pkgconfig meson check libsystemd libevdev python-pytest-xdist libwacom gtk4 mtdev diffutils lua'
ALPINE_PACKAGES: 'git gcc build-base pkgconfig meson check-dev eudev-dev libevdev-dev libwacom-dev cairo-dev gtk4.0-dev mtdev-dev bash lua5.4-dev' ALPINE_PACKAGES: 'git gcc build-base pkgconfig meson check-dev eudev-dev libevdev-dev libwacom-dev cairo-dev gtk4.0-dev mtdev-dev bash lua5.4-dev'
FREEBSD_PACKAGES: 'git pkgconf meson libepoll-shim libudev-devd libevdev libwacom gtk3 libmtdev bash wayland'
############################ end of package lists ############################# ############################ end of package lists #############################
# these tags should be updated each time the list of packages is updated # these tags should be updated each time the list of packages is updated
# changing these will force rebuilding the associated image # changing these will force rebuilding the associated image
# Note: these tags have no meaning and are not tied to a particular # Note: these tags have no meaning and are not tied to a particular
# libinput version # libinput version
FEDORA_TAG: '2026-01-09.0' FEDORA_TAG: '2025-11-17.0'
DEBIAN_TAG: '2026-01-09.0' DEBIAN_TAG: '2025-11-17.0'
UBUNTU_TAG: '2026-01-09.0' UBUNTU_TAG: '2025-11-17.0'
ARCH_TAG: '2026-01-09.0' ARCH_TAG: '2025-11-17.0'
ALPINE_TAG: '2026-01-09.0' ALPINE_TAG: '2025-11-17.0'
FREEBSD_TAG: '2025-11-17.0'
FDO_UPSTREAM_REPO: libinput/libinput FDO_UPSTREAM_REPO: libinput/libinput
@ -335,6 +339,20 @@ alpine:latest@container-prep:
FDO_DISTRIBUTION_PACKAGES: $ALPINE_PACKAGES FDO_DISTRIBUTION_PACKAGES: $ALPINE_PACKAGES
FDO_DISTRIBUTION_TAG: $ALPINE_TAG FDO_DISTRIBUTION_TAG: $ALPINE_TAG
freebsd:14.2@container-prep:
extends:
- .fdo.qemu-build@freebsd
- .policy
- .fdo-runner-tags
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '14.2'
FDO_DISTRIBUTION_PACKAGES: $FREEBSD_PACKAGES
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
################################################################# #################################################################
@ -428,6 +446,16 @@ alpine:latest@container-clean:
FDO_DISTRIBUTION_VERSION: 'latest' FDO_DISTRIBUTION_VERSION: 'latest'
FDO_DISTRIBUTION_TAG: $ALPINE_TAG FDO_DISTRIBUTION_TAG: $ALPINE_TAG
freebsd:14.2@container-clean:
extends:
- .policy
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/freebsd/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '14.2'
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
################################################################# #################################################################
# # # #
@ -1316,6 +1344,19 @@ alpine:latest@default-build:
- "alpine:latest@container-prep" - "alpine:latest@container-prep"
freebsd:14.2@default-build:
stage: distro
extends:
- .build-in-qemu@template
- .fdo.distribution-image@freebsd
variables:
FDO_DISTRIBUTION_VERSION: '14.2'
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
MESON_ARGS: '-Dtests=false -Ddocumentation=false' # doxygen drags down too many deps
MESON_TEST_ARGS: '' # test suite doesn't work on BSD yet
needs:
- "freebsd:14.2@container-prep"
################################################################# #################################################################
# # # #

View file

@ -3,7 +3,7 @@
# #
# We're happy to rebuild all containers when one changes. # We're happy to rebuild all containers when one changes.
.default_tag: &default_tag '2026-01-09.0' .default_tag: &default_tag '2025-11-17.0'
distributions: distributions:
- name: fedora - name: fedora
@ -148,6 +148,29 @@ distributions:
# for any tcase_add_exit_test/tcase_add_test_raise_signal # for any tcase_add_exit_test/tcase_add_test_raise_signal
# but someone more invested in musl will have to figure that out. # but someone more invested in musl will have to figure that out.
- "MESON_TEST_ARGS: '' # litest-selftest fails on musl" - "MESON_TEST_ARGS: '' # litest-selftest fails on musl"
- name: freebsd
tag: *default_tag
qemu_based: true
versions:
- '14.2'
packages:
- git
- pkgconf
- meson
- libepoll-shim
- libudev-devd
- libevdev
- libwacom
- gtk3
- libmtdev
- bash
- wayland
build:
extra_variables:
- "MESON_ARGS: '-Dtests=false -Ddocumentation=false' # doxygen drags down too many deps"
# We don't run the tests on FreeBSD, someone would have to fix the
# test suite to work on BSD first.
- "MESON_TEST_ARGS: '' # test suite doesn't work on BSD yet"
test_suites: test_suites:
- name: touchpad - name: touchpad

View file

@ -4,7 +4,6 @@ repos:
hooks: hooks:
- id: end-of-file-fixer - id: end-of-file-fixer
- id: trailing-whitespace - id: trailing-whitespace
- id: check-merge-conflict
- id: no-commit-to-branch - id: no-commit-to-branch
args: ['--branch', 'main'] args: ['--branch', 'main']
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit

View file

@ -45,7 +45,6 @@ __all_seats()
'--verbose[Use verbose output]' \ '--verbose[Use verbose output]' \
'--show-keycodes[Make all keycodes visible]' \ '--show-keycodes[Make all keycodes visible]' \
'--grab[Exclusively grab all opened devices]' \ '--grab[Exclusively grab all opened devices]' \
'--compress-motion-events[Compress repeated motion events on a TTY]' \
'--device=[Use the given device with the path backend]:device:_files -W /dev/input/ -P /dev/input/' \ '--device=[Use the given device with the path backend]:device:_files -W /dev/input/ -P /dev/input/' \
'--udev=[Listen for notifications on the given seat]:seat:__all_seats' \ '--udev=[Listen for notifications on the given seat]:seat:__all_seats' \
'--apply-to=[Apply configuration options where the device name matches the pattern]:pattern' \ '--apply-to=[Apply configuration options where the device name matches the pattern]:pattern' \

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 489 KiB

After

Width:  |  Height:  |  Size: 181 KiB

View file

@ -110,7 +110,7 @@ The most common matrices are:
.. math:: .. math::
\begin{pmatrix} \begin{pmatrix}
-1 & 0 & 1 \\ -1 & 0 & 1 \\
0 & 1 & 0 \\ 1 & 0 & 0 \\
0 & 0 & 1 0 & 0 & 1
\end{pmatrix} \end{pmatrix}

View file

@ -40,6 +40,11 @@ To fix the touchpad you need to:
Detailed explanations are below. Detailed explanations are below.
.. note:: ``libinput measure touchpad-size`` was introduced in libinput
1.16. For earlier versions, use `libevdev <http://freedesktop.org/wiki/Software/libevdev/>`_'s
``touchpad-edge-detector`` tool.
The ``libinput measure touchpad-size`` tool is an interactive tool. It must The ``libinput measure touchpad-size`` tool is an interactive tool. It must
be called with the physical dimensions of the touchpad in mm. In the example be called with the physical dimensions of the touchpad in mm. In the example
below, we use 100mm wide and 55mm high. The tool will find the touchpad device below, we use 100mm wide and 55mm high. The tool will find the touchpad device
@ -87,7 +92,7 @@ suggested hwdb entry. ::
If there are discrepancies between the coordinate range the kernels If there are discrepancies between the coordinate range the kernels
advertises and what the touchpad sends, the hwdb entry should be added to the advertises and what what the touchpad sends, the hwdb entry should be added to the
``60-evdev.hwdb`` file provided by the `systemd project <https://github.com/systemd/systemd>`_. ``60-evdev.hwdb`` file provided by the `systemd project <https://github.com/systemd/systemd>`_.
An example commit can be found An example commit can be found
`here <https://github.com/systemd/systemd/commit/26f667eac1c5e89b689aa0a1daef6a80f473e045>`_. `here <https://github.com/systemd/systemd/commit/26f667eac1c5e89b689aa0a1daef6a80f473e045>`_.

View file

@ -198,7 +198,7 @@ events is performed within the dispatch method.
evdev [label="evdev_device_dispatch()"] evdev [label="evdev_device_dispatch()"]
plugins [label="plugin pipeline"] plugins [label="plugin pipline"]
fallback [label="fallback_interface_process()"]; fallback [label="fallback_interface_process()"];
touchpad [label="tp_interface_process()"] touchpad [label="tp_interface_process()"]

View file

@ -13,7 +13,7 @@ Instructions on how to build libinput and its tools and how to build against
libinput. libinput.
The build instruction on this page detail how to overwrite your The build instruction on this page detail how to overwrite your
system-provided libinput with one from the git repository, system-provided libinput with one from the git repository, see
see :ref:`reverting_install` to revert to the previous state. see :ref:`reverting_install` to revert to the previous state.
.. _distribution_repos: .. _distribution_repos:
@ -27,7 +27,7 @@ the latest libinput without building it manually.
.. note:: The list below is provided for convenience. The libinput community .. note:: The list below is provided for convenience. The libinput community
cannot provide any guarantees that the packages in those repositories are cannot provide any guarantees that the packages in those repositories are
correct, up-to-date and/or unmodified from the git branch. Due diligence correct, up-to-date and/or unmodified from the git branch. Due dilligence
is recommended. is recommended.
The following repositories provide an up-to-date package for libinput: The following repositories provide an up-to-date package for libinput:

View file

@ -30,7 +30,7 @@ The "bounce" method guarantees that all press events are delivered
immediately and most release events are delivered immediately. The immediately and most release events are delivered immediately. The
"spurious" method requires that release events are delayed, libinput thus "spurious" method requires that release events are delayed, libinput thus
does not enable this method unless a faulty event sequence is detected. A does not enable this method unless a faulty event sequence is detected. A
message is printed to the log when spurious debouncing was detected. message is printed to the log when spurious deboucing was detected.
libinput's debouncing is supposed to correct hardware damage or libinput's debouncing is supposed to correct hardware damage or
substandard hardware. Debouncing also exists as an accessibility feature substandard hardware. Debouncing also exists as an accessibility feature

View file

@ -60,7 +60,7 @@ is unfortunately not visibly obvious.
available. available.
If fingers are down in the main area in addition to fingers in the If fingers are down in the main area in addition to fingers in the
left or right button area, those fingers are ignored. left or right button area, those fingers are are ignored.
A release event always releases the buttons logically down, regardless of A release event always releases the buttons logically down, regardless of
the current finger position the current finger position
@ -77,7 +77,7 @@ The movement of a finger can alter the button area behavior:
- once a finger has moved out of the button area, it cannot move back in and - once a finger has moved out of the button area, it cannot move back in and
trigger a right or middle button event trigger a right or middle button event
- a finger moving within the software button area does not move the pointer - a finger moving within the software button area does not move the pointer
- once a finger moves out of the button area it will control the - once a finger moves out out of the button area it will control the
pointer (this only applies if there is no other finger down on the pointer (this only applies if there is no other finger down on the
touchpad) touchpad)

View file

@ -29,7 +29,7 @@ MyVendor OEM::
[MyVendor MyModel Touchpad] [MyVendor MyModel Touchpad]
MatchName=Foo Bar Touchpad MatchName=Foo Bar Touchpad
MatchUdevtype=touchpad MatchUdevtype=touchpad
MatchDMIModAlias=dmi:*:svnMyVendor:pnMyModel:* MatchDMIModAlias=dmi:*svnMyVendor:pnMyModel:*
AttrEventCode=-BTN_RIGHT AttrEventCode=-BTN_RIGHT
The name of the device can be obtained using :ref:`libinput record <libinput-record>`, The name of the device can be obtained using :ref:`libinput record <libinput-record>`,

View file

@ -47,7 +47,7 @@ for those devices it is expected to be implemented by the toolkit.
Three-finger drag Three-finger drag
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Three-finger drag emulates the mouse button down while three fingers Three-finger drag allows emulates the mouse button down while three fingers
are down on a touchpad without the need to press a physical button or use are down on a touchpad without the need to press a physical button or use
:ref:`tapndrag`. See :ref:`drag_3fg` for details on how this feature works. :ref:`tapndrag`. See :ref:`drag_3fg` for details on how this feature works.
@ -165,7 +165,7 @@ most touchpads.
Disable while trackpointing Disable while trackpointing
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
DWTP is a form of palm detection for devices that have a trackpoint (like DWTP is a form of palm detecion for devices that have a trackpoint (like
Thinkpads). While the user is using the trackpoint, the touchpad is disabled, Thinkpads). While the user is using the trackpoint, the touchpad is disabled,
being enabled again after a timeout. See :ref:`disable-while-trackpointing` for being enabled again after a timeout. See :ref:`disable-while-trackpointing` for
more info. more info.
@ -205,8 +205,8 @@ Tablet tool pressure range
The pressure range on a :ref:`Tablet tool <tablet-tools>` can be reduced The pressure range on a :ref:`Tablet tool <tablet-tools>` can be reduced
from the full available hardware range to a subset of that range. The effect from the full available hardware range to a subset of that range. The effect
of this is that the tablet will not register pressure until the given of this is that the tablet will not register pressure below the given
threshold is met, and will reach the maximum logical pressure the given threshold is met, and will reach the maximum logical pressure
before the maximum hardware-supported pressure is reached. before the maximum hardware-supported pressure is reached.
See :ref:`tablet-pressure-range` for more info. See :ref:`tablet-pressure-range` for more info.

View file

@ -144,9 +144,10 @@ This test suite can take test names etc. as arguments, have a look at
:ref:`test-suite` for more info. There are a bunch of other tests that are :ref:`test-suite` for more info. There are a bunch of other tests that are
run by the CI on merge requests, you can run those locally with :: run by the CI on merge requests, you can run those locally with ::
$> sudo meson test -C builddir $> sudo ninja -C builddir check
So it always pays to run that before submitting. So it always pays to run that before submitting. This will also run the code
through valgrind and pick up any memory leaks.
.. _contributing_submitting_code: .. _contributing_submitting_code:

View file

@ -64,7 +64,7 @@ MOUSE_DPI
MOUSE_WHEEL_CLICK_ANGLE MOUSE_WHEEL_CLICK_ANGLE
The angle in degrees for each click on a mouse wheel. See The angle in degrees for each click on a mouse wheel. See
**libinput_event_pointer_get_axis_source()** for details. **libinput_pointer_get_axis_source()** for details.
Below is an example udev rule to assign "seat1" to a device from vendor Below is an example udev rule to assign "seat1" to a device from vendor
@ -94,7 +94,7 @@ type label does not guarantee that the device is initialized by libinput.
If a device fails to meet the requirements for a device type (e.g. a keyboard If a device fails to meet the requirements for a device type (e.g. a keyboard
labelled as touchpad) the device will not be available through libinput. labelled as touchpad) the device will not be available through libinput.
Only one device type should be set per device at a time, though libinput can Only one device type should be set per device at a type, though libinput can
handle some combinations for historical reasons. handle some combinations for historical reasons.
Below is an example udev rule to remove an **ID_INPUT_TOUCHPAD** setting Below is an example udev rule to remove an **ID_INPUT_TOUCHPAD** setting

View file

@ -23,7 +23,7 @@ the serial bus (PS/2) as internal keyboards: ::
[Serial Keyboards] [Serial Keyboards]
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=ps2 MatchBus=serial
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
@ -46,7 +46,7 @@ Installing temporary local device quirks
The model quirks are part of the source distribution and should never be The model quirks are part of the source distribution and should never be
modified. For temporary local workarounds, libinput reads the modified. For temporary local workarounds, libinput reads the
``/etc/libinput/local-overrides.quirks`` file. Users may add sections to ``/etc/libinput/local-overrides.quirks`` file. Users may add a sections to
this file to add a device quirk for a local device but beware that **any this file to add a device quirk for a local device but beware that **any
modification must be upstreamed** or it may cease to work at any time. modification must be upstreamed** or it may cease to work at any time.
@ -130,7 +130,7 @@ Quirks starting with **Model*** triggers implementation-defined behaviour
for this device not needed for any other device. Only the more for this device not needed for any other device. Only the more
general-purpose **Model*** flags are listed here. general-purpose **Model*** flags are listed here.
ModelALPSSerialTouchpad, ModelAppleTouchpad, ModelWacomTouchpad, ModelChromebook ModelALPSTouchpad, ModelAppleTouchpad, ModelWacomTouchpad, ModelChromebook
Reserved for touchpads made by the respective vendors Reserved for touchpads made by the respective vendors
ModelTouchpadVisibleMarker ModelTouchpadVisibleMarker
Indicates the touchpad has a drawn-on visible marker between the software Indicates the touchpad has a drawn-on visible marker between the software
@ -148,9 +148,6 @@ ModelBouncingKeys
ModelSynapticsSerialTouchpad ModelSynapticsSerialTouchpad
Reserved for touchpads made by Synaptics on the serial bus Reserved for touchpads made by Synaptics on the serial bus
ModelPressurePad ModelPressurePad
.. warning:: This quirk is no longer in use. Use
``AttrInputProp=+INPUT_PROP_PRESSUREPAD`` instead.
Unlike in traditional touchpads, whose pressure value equals contact size, Unlike in traditional touchpads, whose pressure value equals contact size,
on pressure pads pressure is a real physical axis. on pressure pads pressure is a real physical axis.
Indicates that the device is a pressure pad. Indicates that the device is a pressure pad.
@ -162,9 +159,9 @@ ModelScrollOnMiddleClick
Some mice can generate unwanted high-resolution scroll events when the wheel Some mice can generate unwanted high-resolution scroll events when the wheel
is pressed. Increases the scroll threshold required to start scrolling to is pressed. Increases the scroll threshold required to start scrolling to
avoid accidentally scrolling when middle clicking. avoid accidentally scrolling when middle clicking.
AttrSizeHint=NxM, AttrResolutionHint=NxM AttrSizeHint=NxM, AttrResolutionHint=N
Hints at the width x height of the device in mm, or the resolution Hints at the width x height of the device in mm, or the resolution
of the x and y axes in units/mm. These may only be used where they apply to of the x/y axis in units/mm. These may only be used where they apply to
a large proportion of matching devices. They should not be used for any a large proportion of matching devices. They should not be used for any
specific device, override ``EVDEV_ABS_*`` instead, see specific device, override ``EVDEV_ABS_*`` instead, see
:ref:`absolute_coordinate_ranges_fix`. :ref:`absolute_coordinate_ranges_fix`.
@ -202,9 +199,6 @@ AttrInputProp=+INPUT_PROP_BUTTONPAD;-INPUT_PROP_POINTER;
Enables or disables the evdev input property on the device. The prefix Enables or disables the evdev input property on the device. The prefix
for each entry is either '+' (enable) or '-' (disable). Entries may be for each entry is either '+' (enable) or '-' (disable). Entries may be
a named input property or the hexadecimal value of that property. a named input property or the hexadecimal value of that property.
The most common use of this is ``AttrInputProp=+INPUT_PROP_PRESSUREPAD``
which marks a touchpad as a :ref:`forcepad or pressurepad <touchpads_buttons_forcepads>`.
AttrPointingStickIntegration=internal|external AttrPointingStickIntegration=internal|external
Indicates the integration of the pointing stick. This is a string enum. Indicates the integration of the pointing stick. This is a string enum.
Only needed for external pointing sticks. These are rare. Only needed for external pointing sticks. These are rare.

View file

@ -1,36 +0,0 @@
digraph stack
{
compound=true;
splines=line;
rankdir="LR";
node [
shape="box";
]
subgraph cluster_2 {
label="Kernel";
event0 [label="/dev/input/event0"];
event1 [label="/dev/input/event1"];
}
subgraph cluster_0 {
label="Compositor process";
libinput [label="libinput context 1"];
}
subgraph cluster_1 {
label="libinput debug-events";
libinput2 [label="libinput context 2"];
}
stdout;
client [label="Wayland client"];
event0:e -> libinput:w;
event1:e -> libinput:w;
event0:e -> libinput2:w;
event1:e -> libinput2:w;
libinput -> client [ltail=cluster_0 label="Wayland protocol"];
libinput2 -> stdout [ltail=cluster_1];
}

View file

@ -348,14 +348,10 @@ compositor. This indicates a misunderstanding of how libinput works:
libinput is a library that converts kernel events into libinput events, much libinput is a library that converts kernel events into libinput events, much
like ``sed`` reads data in, modifies it, and provides it to stdout. like ``sed`` reads data in, modifies it, and provides it to stdout.
.. graphviz:: libinput-contexts.gv If ``sed`` is used by a shell-script, that script has full control over how
``sed`` processes data. In this analogy, ``sed`` is libinput and the
A libinput context is private to the process and cannot be modified from the shell script is the compositor. It is not possible to write a program
outside. To use the ``sed`` analogy again: if ``sed`` is used by a to modify the behavior of the ``sed`` instance used inside that shell script
shell-script, that script has full control over how ``sed`` processes data. In
this analogy, ``sed`` is libinput and the shell script is the compositor. It is
not possible to write a program to modify the behavior of the ``sed`` instance
used inside that shell script.
Writing a program that uses libinput is akin to writing a new script that Writing a program that uses libinput is akin to writing a new script that
invoke ``sed``. It will not have any effect on the original ``sed`` instance. invoke ``sed``. It will not have any effect on the original ``sed`` instance.
@ -364,14 +360,6 @@ The only way to modify libinput's behavior is to use the configuration options
exposed by the respective compositor. Those affect the libinput context inside exposed by the respective compositor. Those affect the libinput context inside
the compositor and thus have an effect on the input device behavior. the compositor and thus have an effect on the input device behavior.
.. _faq_debug_events_not_showing_configuration:
------------------------------------------------------------------------------
Why doesn't libinput debug-events show my configuration
------------------------------------------------------------------------------
See :ref:`faq_separate_contexts`.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Can I configure scroll speed? Can I configure scroll speed?
------------------------------------------------------------------------------ ------------------------------------------------------------------------------

View file

@ -99,7 +99,7 @@ Hold gestures have three potential logical states:
- **begin**: one or more fingers are placed on the device at the same time - **begin**: one or more fingers are placed on the device at the same time
- **end**: all fingers are removed and the device enters a neutral logical state - **end**: all fingers are removed and the device enters a neutral logical state
- **end(cancelled)**: all fingers are part of a known interaction and the - **end(cancelled)**: all fingers are part of a known interaction and the
current hold gesture is no longer active. This may also occur when currenthold gesture is no longer active. This may also occurs when
switching between hold gestures with different finger counts. switching between hold gestures with different finger counts.
.. note:: By definition, a hold gesture does not move and thus no coordinate .. note:: By definition, a hold gesture does not move and thus no coordinate
@ -108,15 +108,14 @@ Hold gestures have three potential logical states:
For example, a user that puts one finger, then a second finger down and For example, a user that puts one finger, then a second finger down and
releases them later may trigger the following event sequence: releases them later may trigger the following event sequence:
============= ============== ============ ============= ============ ============
Action Event Finger count Action Event Finger count
============= ============== ============ ============= ============ ============
Finger 1 down **begin** 1 Finger 1 down <no event>
Finger 2 down **cancel** 1 Finger 2 down **begin** 2
\ **begin** 2
Finger 2 up **end** 2 Finger 2 up **end** 2
Finger 1 up <no event> Finger 1 up <no event>
============= ============== ============ ============= ============ ============
A hold gesture may by be **cancelled**. This occurs A hold gesture may by be **cancelled**. This occurs
when the hold gesture changes into some other interaction and should no when the hold gesture changes into some other interaction and should no
@ -255,8 +254,7 @@ towards an interaction, see :ref:`thumb_detection` and
In the context of hold gestures, thumbs and palms are treated by libinput as In the context of hold gestures, thumbs and palms are treated by libinput as
if the finger was removed from the device. Where other non-thumb/non-palm if the finger was removed from the device. Where other non-thumb/non-palm
fingers remain on the device, the current hold gesture is cancelled and a fingers remain on the device, an **hold update** event is sent. Otherwise,
new **hold begin** event with the updated finger count is sent. Otherwise,
the hold gesture terminates with a **hold cancel** event. the hold gesture terminates with a **hold cancel** event.
Notably, libinput's thumb and palm detection is not a simple boolean per Notably, libinput's thumb and palm detection is not a simple boolean per
@ -361,7 +359,7 @@ Touchpoints are assigned in sequential order and only the first two touch
points are trackable. For libinput this produces an ambiguity where it is points are trackable. For libinput this produces an ambiguity where it is
impossible to detect whether a gesture is a pinch gesture or a swipe gesture impossible to detect whether a gesture is a pinch gesture or a swipe gesture
whenever a user puts the index and middle finger down first. Since the third whenever a user puts the index and middle finger down first. Since the third
finger does not have positional information, its location cannot be finger does not have positional information, it's location cannot be
determined. determined.
.. figure:: gesture-2fg-ambiguity.svg .. figure:: gesture-2fg-ambiguity.svg

View file

@ -21,7 +21,7 @@ input devices (see :ref:`udev_device_type`) but that should not be used by
libinput. It is recommended that devices that should not be handled as input libinput. It is recommended that devices that should not be handled as input
devices at all unset the **ID_INPUT** and related properties instead. The devices at all unset the **ID_INPUT** and related properties instead. The
**LIBINPUT_IGNORE_DEVICE** property signals that only libinput should **LIBINPUT_IGNORE_DEVICE** property signals that only libinput should
ignore this device but other parts of the stack (if any) should continue ignore this property but other parts of the stack (if any) should continue
treating this device normally. treating this device normally.
Below is an example udev rule to assign **LIBINPUT_IGNORE_DEVICE** to the Below is an example udev rule to assign **LIBINPUT_IGNORE_DEVICE** to the

View file

@ -162,7 +162,7 @@ the value can be crafted manually:
.. code-block:: lua .. code-block:: lua
evdev_type = 0x2 -- EV_REL evdev_type = 0x3 -- EV_REL
evdev_code = 0x1 -- REL_Y evdev_code = 0x1 -- REL_Y
evdev_usage = (evdev_type << 16) | evdev_code evdev_usage = (evdev_type << 16) | evdev_code
@ -485,7 +485,7 @@ methods will be noops.
Version 1 of the plugin API supports the following udev properties: Version 1 of the plugin API supports the following udev properties:
- All of ``ID_INPUT_*`` that denote the device type as assigned - ``ID_INPUT`` and all of ``ID_INPUT_*`` that denote the device type as assigned
by udev. This information is usually used by libinput to determine a by udev. This information is usually used by libinput to determine a
device type. Note that for historical reasons these properties have device type. Note that for historical reasons these properties have
varying rules - some properties may be mutually exclusive, others are varying rules - some properties may be mutually exclusive, others are

View file

@ -95,7 +95,6 @@ src_rst = files(
# dot drawings # dot drawings
'dot/seats-sketch.gv', 'dot/seats-sketch.gv',
'dot/seats-sketch-libinput.gv', 'dot/seats-sketch-libinput.gv',
'dot/libinput-contexts.gv',
'dot/libinput-stack-wayland.gv', 'dot/libinput-stack-wayland.gv',
'dot/libinput-stack-xorg.gv', 'dot/libinput-stack-xorg.gv',
'dot/libinput-stack-gnome.gv', 'dot/libinput-stack-gnome.gv',
@ -131,7 +130,6 @@ src_rst = files(
'svg/tablet-intuos-modes.svg', 'svg/tablet-intuos-modes.svg',
'svg/tablet-left-handed.svg', 'svg/tablet-left-handed.svg',
'svg/tablet-out-of-bounds.svg', 'svg/tablet-out-of-bounds.svg',
'svg/tablet-touch-arbitration.svg',
'svg/tablet.svg', 'svg/tablet.svg',
'svg/tap-n-drag.svg', 'svg/tap-n-drag.svg',
'svg/thumb-detection.svg', 'svg/thumb-detection.svg',

View file

@ -14,7 +14,7 @@ touch the bottom edges of the touchpad during normal interaction.
Interference from a palm depends on the size of the touchpad and the position Interference from a palm depends on the size of the touchpad and the position
of the user's hand. Data from touchpads showed that almost all palm events of the user's hand. Data from touchpads showed that almost all palm events
during typing on a Lenovo T440 happened in the left-most and right-most 5% of during tying on a Lenovo T440 happened in the left-most and right-most 5% of
the touchpad. The T440 series has one of the largest touchpads, other the touchpad. The T440 series has one of the largest touchpads, other
touchpads are less affected by palm touches. touchpads are less affected by palm touches.
@ -52,7 +52,7 @@ Palm detection based on pressure
The simplest form of palm detection labels a touch as palm when the pressure The simplest form of palm detection labels a touch as palm when the pressure
value goes above a certain threshold. This threshold is usually high enough value goes above a certain threshold. This threshold is usually high enough
that it cannot be triggered by a finger movement. Once a touch is labelled as that it cannot be triggered by a finger movement. One a touch is labelled as
palm based on pressure, it will remain so even if the pressure drops below palm based on pressure, it will remain so even if the pressure drops below
the threshold again. This ensures that a palm remains a palm even when the the threshold again. This ensures that a palm remains a palm even when the
pressure changes as the user is typing. pressure changes as the user is typing.
@ -187,7 +187,7 @@ Stylus-touch arbitration
A special case of palm detection is touch arbitration on devices that A special case of palm detection is touch arbitration on devices that
support styli. When interacting with a stylus on the screen, parts of the support styli. When interacting with a stylus on the screen, parts of the
hand may touch the surface and trigger touches. As the user is currently hand may touch the surface and trigger touches. As the user is currently
interacting with the stylus, these touches would interfere with the correct interacting with the stylus, these touches would interfer with the correct
working of the stylus. working of the stylus.
libinput employs a method similar to :ref:`disable-while-typing` to detect libinput employs a method similar to :ref:`disable-while-typing` to detect

View file

@ -39,7 +39,7 @@ Velocity calculation
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
The device's speed of movement is measured across multiple input events The device's speed of movement is measured across multiple input events
through so-called "trackers". Each event prepends a tracker item, each through so-called "trackers". Each event prepends a the tracker item, each
subsequent tracker contains the delta of that item to the current position, subsequent tracker contains the delta of that item to the current position,
the timestamp of the event that created it and the cardinal direction of the the timestamp of the event that created it and the cardinal direction of the
movement at the time. If a device moves into the same direction, the movement at the time. If a device moves into the same direction, the

View file

@ -113,8 +113,8 @@ When you file a bug, please attach the following information:
- the output from udevadm info, see :ref:`udev_info`. - the output from udevadm info, see :ref:`udev_info`.
- the vendor model number of your laptop (e.g. "Lenovo Thinkpad T440s") - the vendor model number of your laptop (e.g. "Lenovo Thinkpad T440s")
- and the content of ``/sys/class/dmi/id/modalias``. - and the content of ``/sys/class/dmi/id/modalias``.
- run ``libinput measure touchpad-size`` tool (see :ref:`absolute_coordinate_ranges_fix`) - run the ``touchpad-edge-detector`` tool (provided by libevdev) and verify
and verify that the ranges and sizes it prints match the touchpad (up to 5mm that the ranges and sizes it prints match the touchpad (up to 5mm
difference is ok) difference is ok)
If you are reporting a bug related to button event generation: If you are reporting a bug related to button event generation:
@ -185,7 +185,7 @@ When you file a bug, please attach the following information:
- a virtual description of your input device, see :ref:`libinput-record`. - a virtual description of your input device, see :ref:`libinput-record`.
This is the most important piece of information, do not forget it! This is the most important piece of information, do not forget it!
- the vendor model number of the device (e.g. "Sony PlayStation3 controller") - the vendor model number of the device (e.g. "Sony Plastation3 controller")
.. _udev_info: .. _udev_info:
@ -368,7 +368,7 @@ them.
without someone stepping up to do the work. If you do see this tag, do ask without someone stepping up to do the work. If you do see this tag, do ask
for guidance on how to implement it. for guidance on how to implement it.
- **hw issue**: an issue that affects a specific device and is a hardware - **hw issue**: an issue that affects a specific device and is a hardware
bug, not a software bug. Often these need to be worked around in libinput bug, not a software bug. Often these needs to be worked around in libinput
but there are cases where a hw issue ends up as *cantfix*. but there are cases where a hw issue ends up as *cantfix*.
- **janitor**: a cleanup task that does not substantially affect how - **janitor**: a cleanup task that does not substantially affect how
libinput works. These are usually good bugs for newcomers to start on. libinput works. These are usually good bugs for newcomers to start on.
@ -389,7 +389,7 @@ them.
*cantfix*. *cantfix*.
- **wontfix**: this issue will not get fixed. This tag is usually assigned - **wontfix**: this issue will not get fixed. This tag is usually assigned
to feature requests that are outside the scope of libinput or would put an to feature requests that are outside the scope of libinput or would put an
unreasonable maintenance burden on the maintainers. unreasonable maintenance burdern on the maintainers.
These tags are high-level categories only, always look for the comments in These tags are high-level categories only, always look for the comments in
the issue to get further details. the issue to get further details.

View file

@ -12,7 +12,7 @@ one can be enabled at a time. As a general overview:
- touchpad devices with physical buttons below the touchpad support edge and - touchpad devices with physical buttons below the touchpad support edge and
two-finger scrolling two-finger scrolling
- touchpad devices without physical buttons (:ref:`ClickPads <clickpad_softbuttons>`) - touchpad devices without physical buttons (:ref:`ClickPads <clickpad_softbuttons>`)
support two-finger scrolling and edge scrolling support two-finger scrolling only
- pointing sticks provide on-button scrolling by default - pointing sticks provide on-button scrolling by default
- mice and other pointing devices support on-button scrolling but it is not - mice and other pointing devices support on-button scrolling but it is not
enabled by default enabled by default
@ -124,12 +124,6 @@ button lock, the button is now considered logically held down. Pressing and
releasing the button a second time logically releases the button. While the releasing the button a second time logically releases the button. While the
button is logically held down, motion events are converted to scroll events. button is logically held down, motion events are converted to scroll events.
If the button is held and used to scroll for longer than a short grace
period, releasing the button does not engage the lock. This allows
hold-to-scroll for short, precise adjustments without accidentally toggling
the lock. A quick click or a brief scroll within the grace period still
engages the lock as normal.
.. _scroll_sources: .. _scroll_sources:
------------------------------------------------------------------------------ ------------------------------------------------------------------------------

View file

@ -43,7 +43,7 @@ Thus, devices "Foo" and "Bar" both reference the same struct
The effect of seat assignment The effect of seat assignment
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
A logical seat is interpreted as a group of devices that usually belong to a A logical set is interpreted as a group of devices that usually belong to a
single user that interacts with a computer. Thus, the devices are single user that interacts with a computer. Thus, the devices are
semantically related. This means for devices within the same logical seat: semantically related. This means for devices within the same logical seat:

View file

@ -1,245 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="229.5488mm"
height="86.66362mm"
viewBox="0 0 813.36188 307.07582"
id="svg2"
version="1.1"
inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
sodipodi:docname="tablet-touch-arbitration.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs4">
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4294"
id="linearGradient4300"
x1="465.81339"
y1="666.13727"
x2="454.82117"
y2="658.65521"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
id="linearGradient4294">
<stop
style="stop-color:#1a1a1a;stop-opacity:1;"
offset="0"
id="stop4296" />
<stop
style="stop-color:#808080;stop-opacity:1"
offset="1"
id="stop4298" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4294"
id="linearGradient3"
gradientUnits="userSpaceOnUse"
x1="465.81339"
y1="666.13727"
x2="454.82117"
y2="658.65521" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.8"
inkscape:cx="410.71429"
inkscape:cy="188.57143"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="3072"
inkscape:window-height="1629"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:showpageshadow="2"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="tablet"
inkscape:groupmode="layer"
id="layer1"
style="display:inline"
transform="translate(67.109152,-133.63374)">
<g
id="g4309"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
transform="translate(0,1.0715222)">
<rect
y="134.15933"
x="75.787216"
height="306.02466"
width="522.19733"
id="rect4136"
style="opacity:0.92;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:1.05118;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:4.20473, 1.05118;stroke-dashoffset:0;stroke-opacity:1" />
<rect
style="opacity:0.92;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.748138;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:2.99255, 0.748138;stroke-dashoffset:0;stroke-opacity:1"
id="rect4140"
width="357.34042"
height="226.52563"
x="199.33878"
y="175.42407" />
<rect
y="175.72914"
x="103.10225"
height="22.142857"
width="65"
id="rect4142"
style="opacity:0.92;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.989;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:3.956, 0.989;stroke-dashoffset:0;stroke-opacity:1" />
<rect
style="opacity:0.92;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.989;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:3.956, 0.989;stroke-dashoffset:0;stroke-opacity:1"
id="rect4148"
width="65"
height="22.142857"
x="103.10225"
y="203.72914" />
<rect
y="231.72913"
x="103.10225"
height="22.142857"
width="65"
id="rect4150"
style="opacity:0.92;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.989;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:3.956, 0.989;stroke-dashoffset:0;stroke-opacity:1" />
<rect
y="323.72913"
x="103.10225"
height="22.142857"
width="65"
id="rect4154"
style="opacity:0.92;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.989;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:3.956, 0.989;stroke-dashoffset:0;stroke-opacity:1" />
<rect
style="opacity:0.92;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.989;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:3.956, 0.989;stroke-dashoffset:0;stroke-opacity:1"
id="rect4156"
width="65"
height="22.142857"
x="103.10225"
y="351.72913" />
<circle
r="22.98097"
cy="287.06125"
cx="135.61298"
id="path4158"
style="opacity:0.92;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.989;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:3.956, 0.989;stroke-dashoffset:0;stroke-opacity:1" />
<ellipse
ry="12.608653"
rx="11.5985"
style="opacity:0.92;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.520431;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:2.08172, 0.520431;stroke-dashoffset:0;stroke-opacity:1"
id="circle4160"
cx="135.61298"
cy="287.06125" />
<rect
y="379.72913"
x="103.10225"
height="22.142857"
width="65"
id="rect4162"
style="opacity:0.92;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.989;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:3.956, 0.989;stroke-dashoffset:0;stroke-opacity:1" />
</g>
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="area">
<rect
style="display:inline;fill:#a44d4d;fill-opacity:1;stroke:none;stroke-width:0.930358"
id="rect1"
width="139.07858"
height="226.89969"
x="485.08383"
y="42.487785" />
<rect
style="display:inline;fill:#a44d4d;fill-opacity:1;stroke:none;stroke-width:1.02823"
id="rect3"
width="169.87961"
height="226.89969"
x="266.07385"
y="42.487785" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="stylus"
style="display:inline"
transform="translate(67.109152,-133.63374)">
<g
id="g4304"
transform="matrix(0.37129971,0.09948946,-0.09618892,0.35898192,369.23868,-8.3227001)"
style="display:inline">
<path
sodipodi:nodetypes="czcc"
inkscape:connector-curvature="0"
id="path4286"
d="m 387.83544,799.76093 c -1.1128,3.61694 -3.2211,13.05163 -1.08543,14.07769 2.13567,1.02606 7.81039,-3.72162 10.99756,-6.69095 z"
style="display:inline;fill:#cccccc;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="ssssccssscsssssssssssssssssss"
inkscape:connector-curvature="0"
id="path4283"
d="m 392.64431,804.79039 c -8.52094,-5.90399 -8.49394,-11.01546 0.22879,-43.30647 1.03999,-3.85 2.46829,-9.67602 3.17399,-12.9467 0.99731,-4.62219 2.39455,-7.29497 6.27321,-12 2.74456,-3.32932 5.25157,-6.2783 5.57113,-6.5533 40.78433,-60.97488 80.48307,-125.1652 118.27253,-184 9.86283,-15.675 26.59424,-42.225 37.18089,-59 10.58666,-16.775 34.01422,-53.9 52.06125,-82.5 18.04703,-28.6 35.04505,-55.31677 37.77338,-59.37059 l 4.9606,-7.3706 4.1828,0.57332 c 4.16371,0.5707 4.19706,0.54958 7.30887,-4.62941 3.75631,-6.2516 8.82067,-11.57582 12.2516,-12.88026 5.99391,-2.27888 14.03303,2.9506 14.03303,9.12854 0,3.90203 -2.51704,10.62127 -6.02878,16.09385 -1.63417,2.54664 -2.97122,4.85949 -2.97122,5.13969 0,0.28019 0.9,1.54715 2,2.81546 2.28453,2.63408 2.47267,4.21918 0.86833,7.31574 -1.28218,2.47476 -26.61383,45.18798 -55.85724,94.18426 -10.83283,18.15 -25.72943,43.1137 -33.10357,55.47489 -7.37413,12.3612 -13.69273,23.17153 -14.04131,24.02297 -0.34859,0.85144 -7.50972,12.78774 -15.91363,26.52511 -15.54138,25.40455 -32.24417,52.9052 -70.74345,116.47703 -40.26028,66.47968 -43.66308,72.46026 -49.21634,86.5 -1.74036,4.4 -3.92035,8.675 -4.8444,9.5 -0.92405,0.825 -4.36246,3.75 -7.6409,6.5 -3.27845,2.75 -9.57132,8.3067 -13.98415,12.34823 -10.62726,9.73304 -16.99729,13.87361 -22.52334,14.64034 -3.99187,0.55386 -5.03885,0.251 -9.27207,-2.6821 z"
style="display:inline;fill:#000000" />
<path
sodipodi:nodetypes="scccs"
inkscape:connector-curvature="0"
id="path4292"
d="m 450.89044,688.88586 c 8.71518,5.62513 45.74035,-59.18436 43.57923,-75.43494 l -7.07107,-6.56599 c -29.93081,25.86352 -47.78438,74.72281 -47.78438,74.72281 z"
style="fill:url(#linearGradient4300);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<g
id="g3"
transform="matrix(-0.37129971,0.09948946,0.09618892,0.35898192,416.04226,-44.344847)"
style="display:inline">
<path
sodipodi:nodetypes="czcc"
inkscape:connector-curvature="0"
id="path1"
d="m 387.83544,799.76093 c -1.1128,3.61694 -3.2211,13.05163 -1.08543,14.07769 2.13567,1.02606 7.81039,-3.72162 10.99756,-6.69095 z"
style="display:inline;fill:#cccccc;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="ssssccssscsssssssssssssssssss"
inkscape:connector-curvature="0"
id="path2"
d="m 392.64431,804.79039 c -8.52094,-5.90399 -8.49394,-11.01546 0.22879,-43.30647 1.03999,-3.85 2.46829,-9.67602 3.17399,-12.9467 0.99731,-4.62219 2.39455,-7.29497 6.27321,-12 2.74456,-3.32932 5.25157,-6.2783 5.57113,-6.5533 40.78433,-60.97488 80.48307,-125.1652 118.27253,-184 9.86283,-15.675 26.59424,-42.225 37.18089,-59 10.58666,-16.775 34.01422,-53.9 52.06125,-82.5 18.04703,-28.6 35.04505,-55.31677 37.77338,-59.37059 l 4.9606,-7.3706 4.1828,0.57332 c 4.16371,0.5707 4.19706,0.54958 7.30887,-4.62941 3.75631,-6.2516 8.82067,-11.57582 12.2516,-12.88026 5.99391,-2.27888 14.03303,2.9506 14.03303,9.12854 0,3.90203 -2.51704,10.62127 -6.02878,16.09385 -1.63417,2.54664 -2.97122,4.85949 -2.97122,5.13969 0,0.28019 0.9,1.54715 2,2.81546 2.28453,2.63408 2.47267,4.21918 0.86833,7.31574 -1.28218,2.47476 -26.61383,45.18798 -55.85724,94.18426 -10.83283,18.15 -25.72943,43.1137 -33.10357,55.47489 -7.37413,12.3612 -13.69273,23.17153 -14.04131,24.02297 -0.34859,0.85144 -7.50972,12.78774 -15.91363,26.52511 -15.54138,25.40455 -32.24417,52.9052 -70.74345,116.47703 -40.26028,66.47968 -43.66308,72.46026 -49.21634,86.5 -1.74036,4.4 -3.92035,8.675 -4.8444,9.5 -0.92405,0.825 -4.36246,3.75 -7.6409,6.5 -3.27845,2.75 -9.57132,8.3067 -13.98415,12.34823 -10.62726,9.73304 -16.99729,13.87361 -22.52334,14.64034 -3.99187,0.55386 -5.03885,0.251 -9.27207,-2.6821 z"
style="display:inline;fill:#000000" />
<path
sodipodi:nodetypes="scccs"
inkscape:connector-curvature="0"
id="path3"
d="m 450.89044,688.88586 c 8.71518,5.62513 45.74035,-59.18436 43.57923,-75.43494 l -7.07107,-6.56599 c -29.93081,25.86352 -47.78438,74.72281 -47.78438,74.72281 z"
style="fill:url(#linearGradient3);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 12 KiB

View file

@ -4,9 +4,9 @@
Switches Switches
============================================================================== ==============================================================================
libinput supports the lid, tablet-mode, and keypad slide switches. Unlike libinput supports the lid and tablet-mode switches. Unlike button events
button events that come in press and release pairs, switches are usually that come in press and release pairs, switches are usually toggled once and
toggled once and left at the setting for an extended period of time. left at the setting for an extended period of time.
Only some switches are handled by libinput, see **libinput_switch** for a Only some switches are handled by libinput, see **libinput_switch** for a
list of supported switches. Switch events are exposed to the caller, but list of supported switches. Switch events are exposed to the caller, but
@ -59,20 +59,3 @@ tablet mode is disengaged.
This handling of tablet mode switches is transparent to the user, no This handling of tablet mode switches is transparent to the user, no
notifications are sent and the device appears as enabled at all times. notifications are sent and the device appears as enabled at all times.
.. _switches_keypad_slide:
------------------------------------------------------------------------------
Keypad slide switch handling
------------------------------------------------------------------------------
Where available, libinput listens to devices providing a keypad slide switch.
This is usually available on devices that have an always-attached physical
keyboard which can slide under the screen. An example of such a device is the
Nokia N900.
The event sent by the kernel is ``EV_SW`` ``SW_KEYPAD_SLIDE`` and is provided
as **LIBINPUT_SWITCH_KEYPAD_SLIDE**. The keypad slide switch does not cause any
other input devices to be enabled nor disabled in response, since on some
devices the kernel event is sent while the keyboard is partially visible and
thus usable.

View file

@ -58,7 +58,7 @@ event of type **LIBINPUT_EVENT_TABLET_TOOL_TIP**, and again when the tip
ceases contact with the surface. ceases contact with the surface.
Tablet tools may send button events; these are exclusively for extra buttons Tablet tools may send button events; these are exclusively for extra buttons
unrelated to the tip. A button event is independent of the tip and can occur while unrelated to the tip. A button event is independent of the tip and can while
the tip is down or up. the tip is down or up.
Some tablet tools' pressure detection is too sensitive, causing phantom Some tablet tools' pressure detection is too sensitive, causing phantom
@ -67,7 +67,7 @@ tools are capable of detecting 1 gram of pressure.
libinput uses a device-specific pressure threshold to determine when the tip libinput uses a device-specific pressure threshold to determine when the tip
is considered logically down. As a result, libinput may send a nonzero is considered logically down. As a result, libinput may send a nonzero
pressure value while the tip is logically up. Most applications can and pressure value while the tip is logically up. Most application can and
should ignore pressure information until they receive the event of type should ignore pressure information until they receive the event of type
**LIBINPUT_EVENT_TABLET_TOOL_TIP**. Applications that require extremely **LIBINPUT_EVENT_TABLET_TOOL_TIP**. Applications that require extremely
fine-grained pressure sensitivity should use the pressure data instead of fine-grained pressure sensitivity should use the pressure data instead of
@ -100,7 +100,7 @@ all pen-like tools to absolute mode.
If a tool in relative mode must not use pointer acceleration, callers If a tool in relative mode must not use pointer acceleration, callers
should use the absolute coordinates returned by should use the absolute coordinates returned by
**libinput_event_tablet_tool_get_x()** and **libinput_event_tablet_tool_get_y()** **libinput_event_tablet_tool_get_x()** and libinput_event_tablet_tool_get_y()
and calculate the delta themselves. Callers that require exact physical and calculate the delta themselves. Callers that require exact physical
distance should also use these functions to calculate delta movements. distance should also use these functions to calculate delta movements.
@ -284,7 +284,7 @@ with **libinput_tablet_tool_get_tool_id()** but makes no promises about the
content or format of the ID. content or format of the ID.
libinput currently supports Wacom-style tool IDs as provided on the Wacom libinput currently supports Wacom-style tool IDs as provided on the Wacom
Intuos 3, 4, 5, Wacom Cintiq and Wacom Intuos Pro series. The tool ID can Intuos 3, 4, 5, Wacon Cintiq and Wacom Intuos Pro series. The tool ID can
be used to distinguish between e.g. a Wacom Classic Pen or a Wacom Pro Pen. be used to distinguish between e.g. a Wacom Classic Pen or a Wacom Pro Pen.
It is the caller's responsibility to interpret the tool ID. It is the caller's responsibility to interpret the tool ID.
@ -357,7 +357,7 @@ tablet by 180 degrees to move the tablet pad button area to right side of
the tablet. When left-handed mode is enabled on a tablet device (see the tablet. When left-handed mode is enabled on a tablet device (see
**libinput_device_config_left_handed_set()**) the tablet tool and tablet pad **libinput_device_config_left_handed_set()**) the tablet tool and tablet pad
behavior changes. In left-handed mode, the tools' axes are adjusted behavior changes. In left-handed mode, the tools' axes are adjusted
so that the origin of each axis remains the logical north-west of so that the origin of each axis remains the logical north-east of
the physical tablet. For example, the x and y axes are inverted and the the physical tablet. For example, the x and y axes are inverted and the
positive x/y coordinates are down/right of the top-left corner of the tablet positive x/y coordinates are down/right of the top-left corner of the tablet
in its current orientation. On a tablet pad, the ring and strip are in its current orientation. On a tablet pad, the ring and strip are
@ -401,7 +401,7 @@ caller to decide whether the mode only applies to buttons, rings and strips
or only to rings and strips (this is the case with the Wacom OS X and or only to rings and strips (this is the case with the Wacom OS X and
Windows driver). Windows driver).
The availability of modes on a tablet pad usually depends on visual feedback The availability of modes on a touchpad usually depends on visual feedback
such as LEDs around the touch ring. If no visual feedback is available, only such as LEDs around the touch ring. If no visual feedback is available, only
one mode may be available. one mode may be available.
@ -466,21 +466,7 @@ devices arbitration has to be done in userspace.
libinput uses the **libinput_device_group** to decide on touch arbitration libinput uses the **libinput_device_group** to decide on touch arbitration
and automatically discards touch events whenever a tool is in proximity. and automatically discards touch events whenever a tool is in proximity.
The exact behavior is device-dependent but typically comes in two forms: full The exact behavior is device-dependent.
tablet touch arbitration and partial arbitration.
.. figure:: tablet-touch-arbitration.svg
:align: center
Partial touch arbitration during a pen interaction for left-handed
and right-handed pen tilt.
Full arbitration simply disables touch on the device while the pen is in
proximity. Partial touch arbitration disables the side of the tablet around the
user's hand, starting slightly to the side of the pen tip. If the pen tilts
to the left (pen held in the left hand), the rectangle is to the left of the
pen tip, if the pen tilts to the right (pen held in the right hand) it is to
the right of the pen tip.
.. _tablet-area: .. _tablet-area:
@ -523,7 +509,7 @@ tip of the tool - inverting the tool brings the eraser into proximity.
.. figure:: tablet-eraser-invert.svg .. figure:: tablet-eraser-invert.svg
:align: center :align: center
A pen-like tool used as pen and as eraser by inverting it An pen-like tool used as pen and as eraser by inverting it
Having an eraser as a separate tool is beneficial in many applications as the Having an eraser as a separate tool is beneficial in many applications as the
eraser tool can be assigned different functionality (colors, paint tools, etc.) eraser tool can be assigned different functionality (colors, paint tools, etc.)
@ -538,7 +524,7 @@ into proximity immediately after - as if the tool was physically inverted.
.. figure:: tablet-eraser-button.svg .. figure:: tablet-eraser-button.svg
:align: center :align: center
A pen-like tool used as pen and as eraser by pressing the eraser button An pen-like tool used as pen and as eraser by pressing the eraser button
Microsoft mandates this behavior (see Microsoft mandates this behavior (see
`Windows Pen States <https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states>`_ `Windows Pen States <https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states>`_
@ -555,4 +541,4 @@ is disabled, pressing that button will generate a normal tablet tool button
event. event.
This configuration is only available on pens with an eraser button, not on This configuration is only available on pens with an eraser button, not on
pens with an invert-type eraser. with an invert-type eraser.

View file

@ -59,16 +59,13 @@ tap-and-drag enabled by default.
middle-click drag, tap with three fingers followed by a middle-click drag, tap with three fingers followed by a
single-finger drag. single-finger drag.
Also optional is a feature called "drag lock". With drag lock **disabled**, Also optional is a feature called "drag lock". With drag lock disabled, lifting
lifting the finger will stop any drag process. When **enabled**, the drag the finger will stop any drag process. When enabled, the drag
process continues even after lifting a finger, allowing the user to process continues even after lifting a finger but can be ended
reset the finger position and keep moving without releasing the drag. with an additional tap. If timeout-based drag-locks are enabled
the drag process will also automatically end once the finger has
libinput supports two variations of this drag lock: "sticky" and "timeout". been lifted for an implementation-specific timeout. Drag lock can be
In sticky mode, the drag lock must be ended with an explicit additional tap. enabled and disabled with **libinput_device_config_tap_set_drag_lock_enabled()**.
In timeout mode, the drag lock ends automatically if no finger was put back on
the touchpad within a timeout. Drag lock can be enabled and disabled with
**libinput_device_config_tap_set_drag_lock_enabled()**.
Note that drag lock only applies if tap-and-drag is enabled. Note that drag lock only applies if tap-and-drag is enabled.
.. figure:: tap-n-drag.svg .. figure:: tap-n-drag.svg
@ -84,13 +81,11 @@ position can be reset by lifting and quickly setting it down again on the
touchpad (d). This will be interpreted as continuing move and is especially touchpad (d). This will be interpreted as continuing move and is especially
useful on small touchpads or with slow pointer acceleration. useful on small touchpads or with slow pointer acceleration.
If drag lock is enabled, the release of the mouse buttons after the finger If drag lock is enabled, the release of the mouse buttons after the finger
release (e) is triggered by a timeout (if in timeout mode) or by tapping again (f). release (e) is triggered by a timeout. To release the button immediately,
simply tap again (f).
libinput also supports an "auto drag-lock" feature: if drag lock is **disabled** If drag lock is enabled in sticky mode there is no timeout after
but the dragging finger is released at the very edge of the touchpad, releasing a finger and an extra tap is required to release the button.
a drag lock automatically activates for a short timeout. This allows a user to
quickly reset the finger to elsewhere on the touchpad and continue the dragging
motion. If the finger is released elsewhere, no drag lock activates.
If two fingers are supported by the hardware, a second finger can be used to If two fingers are supported by the hardware, a second finger can be used to
drag while the first is held in-place. drag while the first is held in-place.

View file

@ -15,7 +15,7 @@ run to check for behavior changes and/or regressions. For quick iteration,
the number of tests to run can be filtered, see :ref:`test-filtering`. the number of tests to run can be filtered, see :ref:`test-filtering`.
This allows for developers to verify a subset of tests (e.g. This allows for developers to verify a subset of tests (e.g.
touchpad tap-to-click) while hacking on that specific feature and only run touchpad tap-to-click) while hacking on that specific feature and only run
the full suite when development is finished. the full suite when development is done finished.
.. note:: The test suite relies on udev and the kernel, specifically uinput. .. note:: The test suite relies on udev and the kernel, specifically uinput.
It creates virtual input devices and replays the events. This may It creates virtual input devices and replays the events. This may
@ -38,7 +38,7 @@ Job control in the test suite
The test suite runner has a make-like job control enabled by the ``-j`` or The test suite runner has a make-like job control enabled by the ``-j`` or
``--jobs`` flag and will fork off as many parallel processes as given by this ``--jobs`` flag and will fork off as many parallel processes as given by this
flag. The default if unspecified is 8. When debugging a specific test case flag. The default if unspecified is 8. When debugging a specific test case
failure it is recommended to employ test filters (see :ref:`test-filtering`) failure it is recommended to employ test filtures (see :ref:`test-filtering`)
and disable parallel tests. The test suite automatically disables parallel and disable parallel tests. The test suite automatically disables parallel
make when run in gdb. make when run in gdb.
@ -235,7 +235,7 @@ suites as:
:: ::
$ meson test --no-suite=hardware # only run container-friendly tests $ meson test --no-suite=machine # only run container-friendly tests
$ meson test --suite=valgrind --setup=valgrind # run all valgrind-compatible tests $ meson test --suite=valgrind --setup=valgrind # run all valgrind-compatible tests
$ meson test --no-suite=root # run all tests not requiring root $ meson test --no-suite=root # run all tests not requiring root

View file

@ -269,7 +269,7 @@ alphanumeric key shows up as letter "a".
The recording can be replayed with the ``libinput replay`` command: :: The recording can be replayed with the ``libinput replay`` command: ::
$ sudo libinput replay touchpad.yml $ sudo libinput replay touchpad.yml
/dev/input/event19: SynPS/2 Synaptics TouchPad SynPS/2 Synaptics TouchPad: /dev/input/event19
Hit enter to start replaying Hit enter to start replaying
@ -329,13 +329,16 @@ specific bug. For example, a touchpad may not work in response to keyboard
events. To accurately reproduce this sequence, the timing between multiple events. To accurately reproduce this sequence, the timing between multiple
devices must be correct and we need to record the events in one go. devices must be correct and we need to record the events in one go.
``libinput record`` can record multiple devices by specifying them on the ``libinput record`` has a ``--multiple`` argument to record multiple devices at
commandline. Recording multiple devices requires the ``--output-file`` once. Unlike the normal invocation, this one requires a number of arguments: ::
argument: ::
$ sudo libinput record --output-file=touchpad-bug.yml /dev/input/event17 /dev/input/event3 $ sudo libinput record --multiple --output-file=touchpad-bug.yml /dev/input/event17 /dev/input/event3
recording to 'touchpad-bug.yml' recording to 'touchpad-bug.yml'
As seen above, a user must specify ``--multiple`` and the ``--output-file``.
Finally, all devices to be recorded must be specified on the commandline as
well.
Replaying events is the same as for a single recording: :: Replaying events is the same as for a single recording: ::
$ sudo libinput replay touchpad-bug.yml $ sudo libinput replay touchpad-bug.yml
@ -362,7 +365,7 @@ The ``libinput analyze`` tool is a multiplexer for various sub-tools that
can analyze input events previously recorded from a device. can analyze input events previously recorded from a device.
Please see the **libinput-analyze(1)** man page for information about what Please see the **libinput-analyze(1)** man page for information about what
tools are available and the man page for each respective tool. tools are available and the man page for each respective too.
.. _libinput-quirks: .. _libinput-quirks:

View file

@ -8,10 +8,10 @@ Touchpad jitter describes random movement by a few pixels even when the
user's finger is unmoving. user's finger is unmoving.
libinput has a mechanism called a **hysteresis** to avoid that jitter. When libinput has a mechanism called a **hysteresis** to avoid that jitter. When
active, movement within the **hysteresis margin** is discarded. If the active, movement with in the **hysteresis margin** is discarded. If the
movement delta is larger than the margin, the movement is passed on as movement delta is larger than the margin, the movement is passed on as
pointer movement. This is a simplified summary, developers should pointer movement. This is a simplified summary, developers should
read the implementation of the hysteresis in ``src/evdev.h``. read the implementation of the hysteresis in ``src/evdev.c``.
libinput uses the kernel ``fuzz`` value to determine the size of the libinput uses the kernel ``fuzz`` value to determine the size of the
hysteresis. Users should override this with a udev hwdb entry where the hysteresis. Users should override this with a udev hwdb entry where the

View file

@ -53,38 +53,31 @@ Example output of the tool is below: ::
with --touch-thresholds=down:up using observed pressure values. with --touch-thresholds=down:up using observed pressure values.
See --help for more options. See --help for more options.
Interactive keys:
q/a - decrease/increase down threshold
w/s - decrease/increase up threshold
e/d - decrease/increase palm threshold
r/f - decrease/increase thumb threshold
Press Ctrl+C to exit Press Ctrl+C to exit
┌───────────────────────────────────────────────────────────────────────────────┐ +-------------------------------------------------------------------------------+
│ Touch │ down │ up │ palm │ thumb │ min │ max │ p │ avg │ median │ | Thresh | 70 | 60 | 130 | 100 | |
├───────────────────────────────────────────────────────────────────────────────┤ +-------------------------------------------------------------------------------+
│ 178 │ x │ x │ │ │ 75 │ 75 │ 0 │ 75 │ 75 │ | Touch | down | up | palm | thumb | min | max | p | avg | median |
│ 179 │ x │ x │ │ │ 35 │ 88 │ 0 │ 77 │ 81 │ +-------------------------------------------------------------------------------+
│ 180 │ x │ x │ │ x │ 65 │ 113 │ 0 │ 98 │ 98 │ | 178 | x | x | | | 75 | 75 | 0 | 75 | 75 |
│ 181 │ x │ x │ │ x │ 50 │ 101 │ 0 │ 86 │ 90 │ | 179 | x | x | | | 35 | 88 | 0 | 77 | 81 |
│ 182 │ x │ x │ │ │ 40 │ 80 │ 0 │ 66 │ 70 │ | 180 | x | x | | x | 65 | 113 | 0 | 98 | 98 |
│ 183 │ x │ │ │ │ 43 │ 78 │ 78 │ │ | 181 | x | x | | x | 50 | 101 | 0 | 86 | 90 |
│ Thresh │ 70 │ 60 │ 130 │ 100 │ | 182 | x | x | | | 40 | 80 | 0 | 66 | 70 |
| 183 | x | | | | 43 | 78 | 78 | |
... ...
The example output shows five completed touch sequences and one ongoing one. The example output shows five completed touch sequences and one ongoing one.
For each, the respective minimum and maximum pressure values are printed as For each, the respective minimum and maximum pressure values are printed as
well as some statistics. The ``down`` column shows that each sequence was well as some statistics. The ``down`` column show that each sequence was
considered logically down at some point (see the thresholds in the last line), considered logically down at some point, two of the sequences were considered
two of the sequences were considered thumbs. This is an interactive tool and thumbs. This is an interactive tool and its output may change frequently. Refer
its output may change frequently. Refer to the to the **libinput-measure-touchpad-pressure(1)** man page for more details.
**libinput-measure-touchpad-pressure(1)** man page for more details.
By default, this tool uses the :ref:`device-quirks` for the pressure range. To By default, this tool uses the :ref:`device-quirks` for the pressure range. To
narrow down on the best values for your device, adjust the thresholds using narrow down on the best values for your device, specify the 'logically down'
the keys q/a, w/s, e/d and r/f or specify the 'logically down'
and 'logically up' pressure thresholds with the ``--touch-thresholds`` and 'logically up' pressure thresholds with the ``--touch-thresholds``
argument: :: argument: ::
@ -107,12 +100,12 @@ Once the thresholds are decided on (e.g. 10 and 8), they can be enabled with
[Touchpad pressure override] [Touchpad pressure override]
MatchUdevType=touchpad MatchUdevType=touchpad
MatchName=*SynPS/2 Synaptics TouchPad MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX230:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX230*
AttrPressureRange=10:8 AttrPressureRange=10:8
AttrPalmPressureThreshold=150 AttrPalmPressureThreshold=150
AttrThumbPressureThreshold=100 AttrThumbPressureThreshold=100
The file name **must** be ``/etc/libinput/local-overrides.quirks``. The file name **must** be ``/etc/libinput/local-overrides.quirks``. The
The first line is the section name and can be free-form. The ``Match`` The first line is the section name and can be free-form. The ``Match``
directives limit the quirk to your touchpad, make sure the device name directives limit the quirk to your touchpad, make sure the device name
matches your device's name (see ``libinput record``'s output). The dmi matches your device's name (see ``libinput record``'s output). The dmi
@ -124,7 +117,7 @@ and product name (pn).
Once in place, run the following command to verify the quirk is valid and Once in place, run the following command to verify the quirk is valid and
works for your device: :: works for your device: ::
$ sudo libinput quirks list /dev/input/event10 $ sudo libinput list-quirks /dev/input/event10
AttrPressureRange=10:8 AttrPressureRange=10:8
Replace the event node with the one from your device. If the Replace the event node with the one from your device. If the
@ -206,7 +199,7 @@ Once the thresholds are decided on (e.g. 10 and 8), they can be enabled with
[Touchpad touch size override] [Touchpad touch size override]
MatchUdevType=touchpad MatchUdevType=touchpad
MatchName=*SynPS/2 Synaptics TouchPad MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX230:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX230*
AttrTouchSizeRange=10:8 AttrTouchSizeRange=10:8
The first line is the match line and should be adjusted for the device name The first line is the match line and should be adjusted for the device name
@ -218,7 +211,7 @@ and product name (pn).
Once in place, run the following command to verify the quirk is valid and Once in place, run the following command to verify the quirk is valid and
works for your device: :: works for your device: ::
$ sudo libinput quirks list /dev/input/event10 $ sudo libinput list-quirks /dev/input/event10
AttrTouchSizeRange=10:8 AttrTouchSizeRange=10:8
Replace the event node with the one from your device. If the Replace the event node with the one from your device. If the

View file

@ -50,7 +50,7 @@ touchpads. Some devices can detect multiple fingers but only provide
Some devices provide additional touch size information through Some devices provide additional touch size information through
the ``ABS_MT_TOUCH_MAJOR/ABS_MT_TOUCH_MINOR`` axes and/or the ``ABS_MT_TOUCH_MAJOR/ABS_MT_TOUCH_MINOR`` axes and/or
the ``ABS_MT_WIDTH_MAJOR/ABS_MT_WIDTH_MINOR`` axes. These axes specify the ``ABS_MT_WIDTH_MAJOR/ABS_MT_WIDTH_MINOR`` axes. These axes specifcy
the size of the touch ellipse. While the kernel documentation specifies how the size of the touch ellipse. While the kernel documentation specifies how
these axes are supposed to be mapped, few devices forward reliable these axes are supposed to be mapped, few devices forward reliable
information. libinput uses these values together with a device-specific information. libinput uses these values together with a device-specific

View file

@ -17,7 +17,7 @@ other properties.
Number of buttons Number of buttons
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
.. _touchpads_buttons_phys: .. _touchapds_buttons_phys:
.............................................................................. ..............................................................................
Physically separate buttons Physically separate buttons
@ -25,7 +25,7 @@ Physically separate buttons
Touchpads with physical buttons usually provide two buttons, left and right. Touchpads with physical buttons usually provide two buttons, left and right.
A few touchpads with three buttons exist, and Apple used to have touchpads A few touchpads with three buttons exist, and Apple used to have touchpads
with a single physical button until ca 2008. Touchpads with only two with a single physical buttons until ca 2008. Touchpads with only two
buttons require the software stack to emulate a middle button. libinput does buttons require the software stack to emulate a middle button. libinput does
this when both buttons are pressed simultaneously. this when both buttons are pressed simultaneously.
@ -57,7 +57,7 @@ property.
.. _touchpads_buttons_forcepads: .. _touchpads_buttons_forcepads:
.............................................................................. ..............................................................................
Forcepads/Pressurepads Forcepads
.............................................................................. ..............................................................................
Forcepads are Clickpads without a physical button underneath the hardware. Forcepads are Clickpads without a physical button underneath the hardware.
@ -65,7 +65,6 @@ They provide pressure and may have a vibration element that is
software-controlled. This element can simulate the feel of a physical software-controlled. This element can simulate the feel of a physical
click or be co-opted for other tasks. click or be co-opted for other tasks.
Forcepads are also called pressurepads or haptic touchpads.
.. _touchpads_touch: .. _touchpads_touch:
@ -80,7 +79,7 @@ device can **track**, i.e. provide reliable positional information for.
In the kernel each finger is tracked in a so-called "slot", the number of In the kernel each finger is tracked in a so-called "slot", the number of
slots thus equals the number of simultaneous touches a device can track. slots thus equals the number of simultaneous touches a device can track.
.. _touchpads_touch_st: .. _touchapds_touch_st:
.............................................................................. ..............................................................................
Single-touch touchpads Single-touch touchpads

View file

@ -131,7 +131,7 @@ variation of the following is sufficient:
[Trackpoint Override] [Trackpoint Override]
MatchUdevType=pointingstick MatchUdevType=pointingstick
MatchName=*TPPS/2 IBM TrackPoint* MatchName=*TPPS/2 IBM TrackPoint*
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadT440p:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT440p*
AttrTrackpointMultiplier=1.0 AttrTrackpointMultiplier=1.0

View file

@ -25,7 +25,7 @@ Button scrolling on trackpoints
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Trackpoint devices have :ref:`button_scrolling` enabled by default. This may Trackpoint devices have :ref:`button_scrolling` enabled by default. This may
interfere with middle-button dragging, if middle-button dragging is required interfer with middle-button dragging, if middle-button dragging is required
by a user then button scrolling must be disabled. by a user then button scrolling must be disabled.
.. _trackpoint_range: .. _trackpoint_range:

View file

@ -131,7 +131,7 @@ Handled device types
- Mice - Mice
- Keyboards - Keyboards
- Virtual absolute pointing devices such as those used by QEMU or VirtualBox - Virtual absolute pointing devices such as those used by QEMU or VirtualBox
- Switches (Lid Switch, Tablet Mode switch, and Keypad Slide switch) - Switches (Lid Switch and Tablet Mode switch)
- Graphics tablets - Graphics tablets
- :ref:`Trackpoints` - :ref:`Trackpoints`

View file

@ -45,7 +45,7 @@ Both events have their own set of APIs to access the data within:
- ``LIBINPUT_EVENT_POINTER_SCROLL_WHEEL`` available since libinput 1.19. - ``LIBINPUT_EVENT_POINTER_SCROLL_WHEEL`` available since libinput 1.19.
* ``libinput_event_pointer_get_scroll_value_v120()`` returns a value * ``libinput_event_pointer_get_scroll_value_v120()`` returns a value
normalized into multiples of 120, see below. Any multiple of 120 should normalized into the 0..120 range, see below. Any multiple of 120 should
be treated as one full wheel click. be treated as one full wheel click.
.. note:: Where possible, the ``libinput_event_pointer_get_axis_value()``, .. note:: Where possible, the ``libinput_event_pointer_get_axis_value()``,
@ -77,7 +77,7 @@ wheel:
| 20 | 20 | 1 | 120 | | 20 | 20 | 1 | 120 |
+-------------+------------+---------------+------+ +-------------+------------+---------------+------+
Fast scrolling may trigger more than one detent per event and thus each Fast scrolling may trigger cover than one detent per event and thus each
event may contain multiples of the value, discrete or v120 value: event may contain multiples of the value, discrete or v120 value:
+-------------+------------+---------------+------+ +-------------+------------+---------------+------+

View file

@ -27,7 +27,6 @@
#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ #define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */
#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ #define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */
#define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */ #define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */
#define INPUT_PROP_PRESSUREPAD 0x07 /* pressure triggers clicks */
#define INPUT_PROP_MAX 0x1f #define INPUT_PROP_MAX 0x1f
#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)
@ -279,8 +278,7 @@
#define KEY_PAUSECD 201 #define KEY_PAUSECD 201
#define KEY_PROG3 202 #define KEY_PROG3 202
#define KEY_PROG4 203 #define KEY_PROG4 203
#define KEY_ALL_APPLICATIONS 204 /* AC Desktop Show All Applications */ #define KEY_DASHBOARD 204 /* AL Dashboard */
#define KEY_DASHBOARD KEY_ALL_APPLICATIONS
#define KEY_SUSPEND 205 #define KEY_SUSPEND 205
#define KEY_CLOSE 206 /* AC Close */ #define KEY_CLOSE 206 /* AC Close */
#define KEY_PLAY 207 #define KEY_PLAY 207
@ -517,10 +515,6 @@
#define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ #define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */
#define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ #define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */
#define KEY_IMAGES 0x1ba /* AL Image Browser */ #define KEY_IMAGES 0x1ba /* AL Image Browser */
#define KEY_NOTIFICATION_CENTER 0x1bc /* Show/hide the notification center */
#define KEY_PICKUP_PHONE 0x1bd /* Answer incoming call */
#define KEY_HANGUP_PHONE 0x1be /* Decline incoming call */
#define KEY_LINK_PHONE 0x1bf /* AL Phone Syncing */
#define KEY_DEL_EOL 0x1c0 #define KEY_DEL_EOL 0x1c0
#define KEY_DEL_EOS 0x1c1 #define KEY_DEL_EOS 0x1c1
@ -548,7 +542,6 @@
#define KEY_FN_F 0x1e2 #define KEY_FN_F 0x1e2
#define KEY_FN_S 0x1e3 #define KEY_FN_S 0x1e3
#define KEY_FN_B 0x1e4 #define KEY_FN_B 0x1e4
#define KEY_FN_RIGHT_SHIFT 0x1e5
#define KEY_BRL_DOT1 0x1f1 #define KEY_BRL_DOT1 0x1f1
#define KEY_BRL_DOT2 0x1f2 #define KEY_BRL_DOT2 0x1f2
@ -602,14 +595,8 @@
#define BTN_DPAD_LEFT 0x222 #define BTN_DPAD_LEFT 0x222
#define BTN_DPAD_RIGHT 0x223 #define BTN_DPAD_RIGHT 0x223
#define BTN_GRIPL 0x224
#define BTN_GRIPR 0x225
#define BTN_GRIPL2 0x226
#define BTN_GRIPR2 0x227
#define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ #define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */
#define KEY_ROTATE_LOCK_TOGGLE 0x231 /* Display rotation lock */ #define KEY_ROTATE_LOCK_TOGGLE 0x231 /* Display rotation lock */
#define KEY_REFRESH_RATE_TOGGLE 0x232 /* Display refresh rate toggle */
#define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */ #define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */
#define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */ #define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */
@ -620,29 +607,10 @@
#define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ #define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */
#define KEY_ASSISTANT 0x247 /* AL Context-aware desktop assistant */ #define KEY_ASSISTANT 0x247 /* AL Context-aware desktop assistant */
#define KEY_KBD_LAYOUT_NEXT 0x248 /* AC Next Keyboard Layout Select */ #define KEY_KBD_LAYOUT_NEXT 0x248 /* AC Next Keyboard Layout Select */
#define KEY_EMOJI_PICKER 0x249 /* Show/hide emoji picker (HUTRR101) */
#define KEY_DICTATE 0x24a /* Start or Stop Voice Dictation Session (HUTRR99) */
#define KEY_CAMERA_ACCESS_ENABLE 0x24b /* Enables programmatic access to camera devices. (HUTRR72) */
#define KEY_CAMERA_ACCESS_DISABLE 0x24c /* Disables programmatic access to camera devices. (HUTRR72) */
#define KEY_CAMERA_ACCESS_TOGGLE 0x24d /* Toggles the current state of the camera access control. (HUTRR72) */
#define KEY_ACCESSIBILITY 0x24e /* Toggles the system bound accessibility UI/command (HUTRR116) */
#define KEY_DO_NOT_DISTURB 0x24f /* Toggles the system-wide "Do Not Disturb" control (HUTRR94)*/
#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */
#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */
/*
* Keycodes for hotkeys toggling the electronic privacy screen found on some
* laptops on/off. Note when the embedded-controller turns on/off the eprivacy
* screen itself then the state should be reported through drm connecter props:
* https://www.kernel.org/doc/html/latest/gpu/drm-kms.html#standard-connector-properties
* Except when implementing the drm connecter properties API is not possible
* because e.g. the firmware does not allow querying the presence and/or status
* of the eprivacy screen at boot.
*/
#define KEY_EPRIVACY_SCREEN_ON 0x252
#define KEY_EPRIVACY_SCREEN_OFF 0x253
#define KEY_KBDINPUTASSIST_PREV 0x260 #define KEY_KBDINPUTASSIST_PREV 0x260
#define KEY_KBDINPUTASSIST_NEXT 0x261 #define KEY_KBDINPUTASSIST_NEXT 0x261
#define KEY_KBDINPUTASSIST_PREVGROUP 0x262 #define KEY_KBDINPUTASSIST_PREVGROUP 0x262
@ -687,27 +655,6 @@
/* Select an area of screen to be copied */ /* Select an area of screen to be copied */
#define KEY_SELECTIVE_SCREENSHOT 0x27a #define KEY_SELECTIVE_SCREENSHOT 0x27a
/* Move the focus to the next or previous user controllable element within a UI container */
#define KEY_NEXT_ELEMENT 0x27b
#define KEY_PREVIOUS_ELEMENT 0x27c
/* Toggle Autopilot engagement */
#define KEY_AUTOPILOT_ENGAGE_TOGGLE 0x27d
/* Shortcut Keys */
#define KEY_MARK_WAYPOINT 0x27e
#define KEY_SOS 0x27f
#define KEY_NAV_CHART 0x280
#define KEY_FISHING_CHART 0x281
#define KEY_SINGLE_RANGE_RADAR 0x282
#define KEY_DUAL_RANGE_RADAR 0x283
#define KEY_RADAR_OVERLAY 0x284
#define KEY_TRADITIONAL_SONAR 0x285
#define KEY_CLEARVU_SONAR 0x286
#define KEY_SIDEVU_SONAR 0x287
#define KEY_NAV_INFO 0x288
#define KEY_BRIGHTNESS_MENU 0x289
/* /*
* Some keyboards have keys which do not have a defined meaning, these keys * Some keyboards have keys which do not have a defined meaning, these keys
* are intended to be programmed / bound to macros by the user. For most * are intended to be programmed / bound to macros by the user. For most
@ -783,9 +730,6 @@
#define KEY_KBD_LCD_MENU4 0x2bb #define KEY_KBD_LCD_MENU4 0x2bb
#define KEY_KBD_LCD_MENU5 0x2bc #define KEY_KBD_LCD_MENU5 0x2bc
/* Performance Boost key (Alienware)/G-Mode key (Dell) */
#define KEY_PERFORMANCE 0x2bd
#define BTN_TRIGGER_HAPPY 0x2c0 #define BTN_TRIGGER_HAPPY 0x2c0
#define BTN_TRIGGER_HAPPY1 0x2c0 #define BTN_TRIGGER_HAPPY1 0x2c0
#define BTN_TRIGGER_HAPPY2 0x2c1 #define BTN_TRIGGER_HAPPY2 0x2c1
@ -890,7 +834,6 @@
#define ABS_TOOL_WIDTH 0x1c #define ABS_TOOL_WIDTH 0x1c
#define ABS_VOLUME 0x20 #define ABS_VOLUME 0x20
#define ABS_PROFILE 0x21
#define ABS_MISC 0x28 #define ABS_MISC 0x28
@ -946,8 +889,7 @@
#define SW_MUTE_DEVICE 0x0e /* set = device disabled */ #define SW_MUTE_DEVICE 0x0e /* set = device disabled */
#define SW_PEN_INSERTED 0x0f /* set = pen inserted */ #define SW_PEN_INSERTED 0x0f /* set = pen inserted */
#define SW_MACHINE_COVER 0x10 /* set = cover closed */ #define SW_MACHINE_COVER 0x10 /* set = cover closed */
#define SW_USB_INSERT 0x11 /* set = USB audio device connected */ #define SW_MAX 0x10
#define SW_MAX 0x11
#define SW_CNT (SW_MAX+1) #define SW_CNT (SW_MAX+1)
/* /*

View file

@ -27,7 +27,6 @@
#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ #define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */
#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ #define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */
#define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */ #define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */
#define INPUT_PROP_PRESSUREPAD 0x07 /* pressure triggers clicks */
#define INPUT_PROP_MAX 0x1f #define INPUT_PROP_MAX 0x1f
#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)
@ -279,8 +278,7 @@
#define KEY_PAUSECD 201 #define KEY_PAUSECD 201
#define KEY_PROG3 202 #define KEY_PROG3 202
#define KEY_PROG4 203 #define KEY_PROG4 203
#define KEY_ALL_APPLICATIONS 204 /* AC Desktop Show All Applications */ #define KEY_DASHBOARD 204 /* AL Dashboard */
#define KEY_DASHBOARD KEY_ALL_APPLICATIONS
#define KEY_SUSPEND 205 #define KEY_SUSPEND 205
#define KEY_CLOSE 206 /* AC Close */ #define KEY_CLOSE 206 /* AC Close */
#define KEY_PLAY 207 #define KEY_PLAY 207
@ -517,10 +515,6 @@
#define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ #define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */
#define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ #define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */
#define KEY_IMAGES 0x1ba /* AL Image Browser */ #define KEY_IMAGES 0x1ba /* AL Image Browser */
#define KEY_NOTIFICATION_CENTER 0x1bc /* Show/hide the notification center */
#define KEY_PICKUP_PHONE 0x1bd /* Answer incoming call */
#define KEY_HANGUP_PHONE 0x1be /* Decline incoming call */
#define KEY_LINK_PHONE 0x1bf /* AL Phone Syncing */
#define KEY_DEL_EOL 0x1c0 #define KEY_DEL_EOL 0x1c0
#define KEY_DEL_EOS 0x1c1 #define KEY_DEL_EOS 0x1c1
@ -548,7 +542,6 @@
#define KEY_FN_F 0x1e2 #define KEY_FN_F 0x1e2
#define KEY_FN_S 0x1e3 #define KEY_FN_S 0x1e3
#define KEY_FN_B 0x1e4 #define KEY_FN_B 0x1e4
#define KEY_FN_RIGHT_SHIFT 0x1e5
#define KEY_BRL_DOT1 0x1f1 #define KEY_BRL_DOT1 0x1f1
#define KEY_BRL_DOT2 0x1f2 #define KEY_BRL_DOT2 0x1f2
@ -602,14 +595,8 @@
#define BTN_DPAD_LEFT 0x222 #define BTN_DPAD_LEFT 0x222
#define BTN_DPAD_RIGHT 0x223 #define BTN_DPAD_RIGHT 0x223
#define BTN_GRIPL 0x224
#define BTN_GRIPR 0x225
#define BTN_GRIPL2 0x226
#define BTN_GRIPR2 0x227
#define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ #define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */
#define KEY_ROTATE_LOCK_TOGGLE 0x231 /* Display rotation lock */ #define KEY_ROTATE_LOCK_TOGGLE 0x231 /* Display rotation lock */
#define KEY_REFRESH_RATE_TOGGLE 0x232 /* Display refresh rate toggle */
#define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */ #define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */
#define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */ #define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */
@ -620,29 +607,10 @@
#define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ #define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */
#define KEY_ASSISTANT 0x247 /* AL Context-aware desktop assistant */ #define KEY_ASSISTANT 0x247 /* AL Context-aware desktop assistant */
#define KEY_KBD_LAYOUT_NEXT 0x248 /* AC Next Keyboard Layout Select */ #define KEY_KBD_LAYOUT_NEXT 0x248 /* AC Next Keyboard Layout Select */
#define KEY_EMOJI_PICKER 0x249 /* Show/hide emoji picker (HUTRR101) */
#define KEY_DICTATE 0x24a /* Start or Stop Voice Dictation Session (HUTRR99) */
#define KEY_CAMERA_ACCESS_ENABLE 0x24b /* Enables programmatic access to camera devices. (HUTRR72) */
#define KEY_CAMERA_ACCESS_DISABLE 0x24c /* Disables programmatic access to camera devices. (HUTRR72) */
#define KEY_CAMERA_ACCESS_TOGGLE 0x24d /* Toggles the current state of the camera access control. (HUTRR72) */
#define KEY_ACCESSIBILITY 0x24e /* Toggles the system bound accessibility UI/command (HUTRR116) */
#define KEY_DO_NOT_DISTURB 0x24f /* Toggles the system-wide "Do Not Disturb" control (HUTRR94)*/
#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */
#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */
/*
* Keycodes for hotkeys toggling the electronic privacy screen found on some
* laptops on/off. Note when the embedded-controller turns on/off the eprivacy
* screen itself then the state should be reported through drm connecter props:
* https://www.kernel.org/doc/html/latest/gpu/drm-kms.html#standard-connector-properties
* Except when implementing the drm connecter properties API is not possible
* because e.g. the firmware does not allow querying the presence and/or status
* of the eprivacy screen at boot.
*/
#define KEY_EPRIVACY_SCREEN_ON 0x252
#define KEY_EPRIVACY_SCREEN_OFF 0x253
#define KEY_KBDINPUTASSIST_PREV 0x260 #define KEY_KBDINPUTASSIST_PREV 0x260
#define KEY_KBDINPUTASSIST_NEXT 0x261 #define KEY_KBDINPUTASSIST_NEXT 0x261
#define KEY_KBDINPUTASSIST_PREVGROUP 0x262 #define KEY_KBDINPUTASSIST_PREVGROUP 0x262
@ -687,27 +655,6 @@
/* Select an area of screen to be copied */ /* Select an area of screen to be copied */
#define KEY_SELECTIVE_SCREENSHOT 0x27a #define KEY_SELECTIVE_SCREENSHOT 0x27a
/* Move the focus to the next or previous user controllable element within a UI container */
#define KEY_NEXT_ELEMENT 0x27b
#define KEY_PREVIOUS_ELEMENT 0x27c
/* Toggle Autopilot engagement */
#define KEY_AUTOPILOT_ENGAGE_TOGGLE 0x27d
/* Shortcut Keys */
#define KEY_MARK_WAYPOINT 0x27e
#define KEY_SOS 0x27f
#define KEY_NAV_CHART 0x280
#define KEY_FISHING_CHART 0x281
#define KEY_SINGLE_RANGE_RADAR 0x282
#define KEY_DUAL_RANGE_RADAR 0x283
#define KEY_RADAR_OVERLAY 0x284
#define KEY_TRADITIONAL_SONAR 0x285
#define KEY_CLEARVU_SONAR 0x286
#define KEY_SIDEVU_SONAR 0x287
#define KEY_NAV_INFO 0x288
#define KEY_BRIGHTNESS_MENU 0x289
/* /*
* Some keyboards have keys which do not have a defined meaning, these keys * Some keyboards have keys which do not have a defined meaning, these keys
* are intended to be programmed / bound to macros by the user. For most * are intended to be programmed / bound to macros by the user. For most
@ -783,9 +730,6 @@
#define KEY_KBD_LCD_MENU4 0x2bb #define KEY_KBD_LCD_MENU4 0x2bb
#define KEY_KBD_LCD_MENU5 0x2bc #define KEY_KBD_LCD_MENU5 0x2bc
/* Performance Boost key (Alienware)/G-Mode key (Dell) */
#define KEY_PERFORMANCE 0x2bd
#define BTN_TRIGGER_HAPPY 0x2c0 #define BTN_TRIGGER_HAPPY 0x2c0
#define BTN_TRIGGER_HAPPY1 0x2c0 #define BTN_TRIGGER_HAPPY1 0x2c0
#define BTN_TRIGGER_HAPPY2 0x2c1 #define BTN_TRIGGER_HAPPY2 0x2c1
@ -890,7 +834,6 @@
#define ABS_TOOL_WIDTH 0x1c #define ABS_TOOL_WIDTH 0x1c
#define ABS_VOLUME 0x20 #define ABS_VOLUME 0x20
#define ABS_PROFILE 0x21
#define ABS_MISC 0x28 #define ABS_MISC 0x28
@ -946,8 +889,7 @@
#define SW_MUTE_DEVICE 0x0e /* set = device disabled */ #define SW_MUTE_DEVICE 0x0e /* set = device disabled */
#define SW_PEN_INSERTED 0x0f /* set = pen inserted */ #define SW_PEN_INSERTED 0x0f /* set = pen inserted */
#define SW_MACHINE_COVER 0x10 /* set = cover closed */ #define SW_MACHINE_COVER 0x10 /* set = cover closed */
#define SW_USB_INSERT 0x11 /* set = USB audio device connected */ #define SW_MAX 0x10
#define SW_MAX 0x11
#define SW_CNT (SW_MAX+1) #define SW_CNT (SW_MAX+1)
/* /*

View file

@ -1,5 +1,5 @@
project('libinput', 'c', project('libinput', 'c',
version : '1.31.0', version : '1.29.902',
license : 'MIT/Expat', license : 'MIT/Expat',
default_options : [ 'c_std=gnu99', 'warning_level=2' ], default_options : [ 'c_std=gnu99', 'warning_level=2' ],
meson_version : '>= 0.64.0') meson_version : '>= 0.64.0')
@ -80,11 +80,10 @@ endif
config_h.set_quoted('HTTP_DOC_LINK', doc_url) config_h.set_quoted('HTTP_DOC_LINK', doc_url)
config_h.set('_GNU_SOURCE', '1') config_h.set('_GNU_SOURCE', '1')
if get_option('buildtype') == 'debug' or get_option('buildtype') == 'debugoptimized'
is_debug_build = get_option('buildtype') == 'debug' or get_option('buildtype') == 'debugoptimized'
if is_debug_build
config_h.set('IS_DEBUG_BUILD', '1')
config_h.set_quoted('MESON_BUILD_ROOT', meson.current_build_dir()) config_h.set_quoted('MESON_BUILD_ROOT', meson.current_build_dir())
else
config_h.set_quoted('MESON_BUILD_ROOT', '')
endif endif
prefix = '''#define _GNU_SOURCE 1 prefix = '''#define _GNU_SOURCE 1
@ -223,10 +222,6 @@ if have_libwacom
dependencies: dep_libwacom) dependencies: dep_libwacom)
config_h.set('HAVE_LIBWACOM_BUTTON_MODESWITCH_MODE', '1') config_h.set('HAVE_LIBWACOM_BUTTON_MODESWITCH_MODE', '1')
endif endif
if cc.has_function('libwacom_stylus_is_generic',
dependencies: dep_libwacom)
config_h.set('HAVE_LIBWACOM_STYLUS_IS_GENERIC', '1')
endif
else else
dep_libwacom = declare_dependency() dep_libwacom = declare_dependency()
endif endif
@ -763,10 +758,10 @@ executable('ptraccel-debug',
# Don't run the test during a release build because we rely on the magic # Don't run the test during a release build because we rely on the magic
# subtool lookup # subtool lookup
if is_debug_build if get_option('buildtype') == 'debug' or get_option('buildtype') == 'debugoptimized'
config_tool_option_test = configuration_data() config_tool_option_test = configuration_data()
config_tool_option_test.set('DISABLE_WARNING', 'yes') config_tool_option_test.set('DISABLE_WARNING', 'yes')
config_tool_option_test.set('MESON_ENABLED_DEBUG_GUI', get_option('debug-gui').to_string()) config_tool_option_test.set('MESON_ENABLED_DEBUG_GUI', get_option('debug-gui'))
config_tool_option_test.set('MESON_BUILD_ROOT', meson.current_build_dir()) config_tool_option_test.set('MESON_BUILD_ROOT', meson.current_build_dir())
config_tool_option_test.set('TOOL_PATH', libinput_tool.full_path()) config_tool_option_test.set('TOOL_PATH', libinput_tool.full_path())
tool_option_test = configure_file(input: 'tools/test_tool_option_parsing.py', tool_option_test = configure_file(input: 'tools/test_tool_option_parsing.py',
@ -800,13 +795,6 @@ test('tools-builddir-lookup-installed',
############ tests ############ ############ tests ############
summary({
'Tests enabled' : get_option('tests'),
'Install tests' : get_option('install-tests'),
},
section : 'Tests',
bool_yn : true)
test('symbols-leak-test', test('symbols-leak-test',
find_program('test/symbols-leak-test'), find_program('test/symbols-leak-test'),
args : [ dir_src / 'libinput.sym', dir_src], args : [ dir_src / 'libinput.sym', dir_src],
@ -892,8 +880,6 @@ if get_option('tests')
'test/litest-device-format-string.c', 'test/litest-device-format-string.c',
'test/litest-device-generic-pressurepad.c', 'test/litest-device-generic-pressurepad.c',
'test/litest-device-generic-singletouch.c', 'test/litest-device-generic-singletouch.c',
'test/litest-device-generic-usb-keyboard.c',
'test/litest-device-generic-usb-touchpad.c',
'test/litest-device-gpio-keys.c', 'test/litest-device-gpio-keys.c',
'test/litest-device-huion-pentablet.c', 'test/litest-device-huion-pentablet.c',
'test/litest-device-huion-q620m-dial.c', 'test/litest-device-huion-q620m-dial.c',
@ -905,7 +891,6 @@ if get_option('tests')
'test/litest-device-keyboard-razer-blackwidow.c', 'test/litest-device-keyboard-razer-blackwidow.c',
'test/litest-device-keyboard-razer-blade-stealth.c', 'test/litest-device-keyboard-razer-blade-stealth.c',
'test/litest-device-keyboard-razer-blade-stealth-videoswitch.c', 'test/litest-device-keyboard-razer-blade-stealth-videoswitch.c',
'test/litest-device-keypad-slide-switch.c',
'test/litest-device-lenovo-scrollpoint.c', 'test/litest-device-lenovo-scrollpoint.c',
'test/litest-device-lid-switch.c', 'test/litest-device-lid-switch.c',
'test/litest-device-lid-switch-surface3.c', 'test/litest-device-lid-switch-surface3.c',

View file

@ -1,121 +0,0 @@
-- SPDX-License-Identifier: MIT
--
-- This is an example libinput plugin
--
-- This plugin controls a mouse/pointer from a tablet device. This
-- effectively hides stylus interactions and sends pointer events
-- instead. In other words: mouse emulation for tablets, implemented
-- by (remote) controlling a mouse device. This allows using a
-- tablet stylus as a mouse replacement without tablet limitations
-- from compositors or clients. Note that axis usually needed for
-- drawing (like pressure, tilt or distance) are no longer emitted
-- when this plugin is active and a mouse is connected. When no
-- mouse is connected, this plugin doesn't change tablet events,
-- thus the stylus works like a normal stylus.
-- UNCOMMENT THIS LINE TO ACTIVATE THE PLUGIN
-- libinput:register({1})
-- globals
pointer_device = nil
tablet_device = nil
maximum_x = nil
maximum_y = nil
function adjust_for_aspect_ratio(y)
-- adjust y to match monitor 21:9 aspect ratio
local adj_maximum_y = maximum_x * 1440 / 3440
return math.floor(math.min(y * maximum_y / adj_maximum_y, maximum_y + 1))
end
function on_tablet_frame(device, frame, time_in_microseconds)
-- emit tablet frame when there is no pointer device
if not pointer_device then return nil end
-- map tablet frame to pointer frame
local events = {}
for _, v in ipairs(frame) do
if v.usage == evdev.ABS_MISC then
-- save a few cycles on Wacom tablets by discarding a
-- proximity in / out frame early, non-Wacom tablets should
-- use BTN_TOOL_PEN/RUBBER/... instead
return {}
elseif v.usage == evdev.ABS_X then
table.insert(events, { usage = evdev.ABS_X, value = v.value })
elseif v.usage == evdev.ABS_Y then
-- uncomment the next two lines and comment the original line
-- for configuring aspect correction, see
-- adjust_for_aspect_ratio() for details and configuration
-- local adj_value = adjust_for_aspect_ratio(v.value)
-- table.insert(events, { usage = evdev.ABS_Y, value = adj_value })
table.insert(events, { usage = evdev.ABS_Y, value = v.value })
elseif v.usage == evdev.BTN_TOUCH then
table.insert(events, { usage = evdev.BTN_LEFT, value = v.value })
elseif v.usage == evdev.BTN_STYLUS then
table.insert(events, { usage = evdev.BTN_RIGHT, value = v.value })
elseif v.usage == evdev.BTN_STYLUS2 then
table.insert(events, { usage = evdev.BTN_MIDDLE, value = v.value })
end
end
-- emit pointer frame, if any
if #events > 0 then pointer_device:append_frame(events) end
-- discard tablet frame
return {}
end
function on_tablet_removed(device)
libinput:log_info("Remove tablet device")
tablet_device = nil
end
function on_pointer_removed(device)
libinput:log_info("Remove pointer device")
pointer_device = nil
end
function setup()
if not pointer_device or not tablet_device then return end
libinput:log_info("Controlling '" .. pointer_device:name() .. "' with '" .. tablet_device:name() .. "'")
-- fetch absinfos from tablet
local absinfo_x = {}
local absinfo_y = {}
for a, b in pairs(tablet_device:absinfos()) do
if a == evdev.ABS_X then absinfo_x = b end
if a == evdev.ABS_Y then absinfo_y = b end
end
-- copy max values for aspect ratio correction later on
maximum_x = absinfo_x.maximum
maximum_y = absinfo_y.maximum
-- copy absinfos to pointer device
pointer_device:set_absinfo(evdev.ABS_X, absinfo_x)
pointer_device:set_absinfo(evdev.ABS_Y, absinfo_y)
-- setup listeners
pointer_device:connect("device-removed", on_pointer_removed)
tablet_device:connect("device-removed", on_tablet_removed)
tablet_device:connect("evdev-frame", on_tablet_frame)
end
function on_new_device(device)
local udev = device:udev_properties()
if udev["ID_INPUT_TABLET"] and not udev["ID_INPUT_TABLET_PAD"] then
libinput:log_info("Found tablet device")
tablet_device = device
setup()
end
if udev["ID_INPUT_MOUSE"] then
libinput:log_info("Found pointer device")
pointer_device = device
setup()
end
end
-- setup listener
libinput:connect("new-evdev-device", on_new_device)

View file

@ -8,7 +8,6 @@ plugins = [
'10-disable-feature.lua', '10-disable-feature.lua',
'10-copilot-key-override.lua', '10-copilot-key-override.lua',
'10-wheel-to-button.lua', '10-wheel-to-button.lua',
'10-tablet-mouse-control.lua',
] ]
fs = import('fs') fs = import('fs')

View file

@ -9,23 +9,3 @@ AttrKeyboardIntegration=internal
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=bluetooth MatchBus=bluetooth
AttrKeyboardIntegration=external AttrKeyboardIntegration=external
# Detachable devices usually have the tablet part buttons wired as ps2 keyboard,
# don't disable them when tablet-mode switch is in effect.
# DMI Chassis Type 20h (32 decimal) is Detachable as per SMBIOS specification.
[Detachable Device Buttons]
MatchBus=ps2
MatchUdevType=keyboard
MatchDMIModalias=dmi:*:ct32:*
ModelTabletModeNoSuspend=1
# Tablet devices usually have the tablet part buttons wired as ps2 keyboard,
# despite being tablets some of them, e.g. Microsoft Surface Laptop Studio,
# expose tablet-mode switch, so don't disable the ps2 keyboard.
# Tablets that don't expose tablet-mode switch won't have any diference.
# DMI Chassis Type 1Eh (30 decimal) is Tablet as per SMBIOS specification.
[Tablet Device Buttons]
MatchBus=ps2
MatchUdevType=keyboard
MatchDMIModalias=dmi:*:ct30:*
ModelTabletModeNoSuspend=1

View file

@ -1,8 +1,5 @@
# Do not edit this file, it will be overwritten on update
[A4TECH USB X-710BK] [A4TECH USB X-710BK]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x09DA MatchVendor=0x09DA
MatchProduct=0x9090 MatchProduct=0x9090
MatchUdevType=mouse
ModelBouncingKeys=1 ModelBouncingKeys=1

View file

@ -1,11 +0,0 @@
# Do not edit this file, it will be overwritten on update
# Touchpad is not a clickpad but INPUT_PROP_BUTTONPAD is set,
# causing libinput to drop physical button events.
[Clevetura CLVX S Touchpad]
MatchUdevType=touchpad
MatchBus=bluetooth
MatchVendor=0x36F7
MatchProduct=0x5755
AttrInputProp=-INPUT_PROP_BUTTONPAD
AttrEventCode=+BTN_RIGHT

View file

@ -1,43 +1,35 @@
# Do not edit this file, it will be overwritten on update
[Contour Design RollerMouse Free 2] [Contour Design RollerMouse Free 2]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x0B33 MatchVendor=0x0B33
MatchProduct=0x0401 MatchProduct=0x0401
MatchUdevType=mouse
ModelBouncingKeys=1 ModelBouncingKeys=1
[Contour Design RollerMouse Free 3] [Contour Design RollerMouse Free 3]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x0B33 MatchVendor=0x0B33
MatchProduct=0x0404 MatchProduct=0x0404
MatchUdevType=mouse
ModelBouncingKeys=1 ModelBouncingKeys=1
[Contour Design RollerMouse Re:d] [Contour Design RollerMouse Re:d]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x0B33 MatchVendor=0x0B33
MatchProduct=0x1000 MatchProduct=0x1000
MatchUdevType=mouse
ModelBouncingKeys=1 ModelBouncingKeys=1
[Contour Design RollerMouse Red v3] [Contour Design RollerMouse Red v3]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x0B33 MatchVendor=0x0B33
MatchProduct=0x1004 MatchProduct=0x1004
MatchUdevType=mouse
ModelBouncingKeys=1 ModelBouncingKeys=1
[Contour Design RollerMouse Pro3] [Contour Design RollerMouse Pro3]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x0B33 MatchVendor=0x0B33
MatchProduct=0x0703 MatchProduct=0x0703
MatchUdevType=mouse
ModelBouncingKeys=1 ModelBouncingKeys=1
[Contour Design RollerMouse USB Receiver] [Contour Design RollerMouse USB Receiver]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x0B33 MatchVendor=0x0B33
MatchProduct=0x2000 MatchProduct=0x2000
MatchUdevType=mouse
ModelBouncingKeys=1 ModelBouncingKeys=1

View file

@ -1,13 +1,10 @@
# Do not edit this file, it will be overwritten on update # Do not edit this file, it will be overwritten on update
[Cyapa Touchpads] [Cyapa Touchpads]
MatchBus=i2c
MatchUdevType=touchpad
MatchName=*Cypress APA Trackpad ?cyapa? MatchName=*Cypress APA Trackpad ?cyapa?
AttrPressureRange=10:8 AttrPressureRange=10:8
[Cypress Touchpads] [Cypress Touchpads]
MatchBus=ps2
MatchUdevType=touchpad MatchUdevType=touchpad
MatchName=*CyPS/2 Cypress Trackpad MatchName=*CyPS/2 Cypress Trackpad
AttrPressureRange=10:8 AttrPressureRange=10:8

View file

@ -9,11 +9,3 @@ AttrPressureRange=10:8
MatchName=*Elan Touchpad* MatchName=*Elan Touchpad*
AttrResolutionHint=31x31 AttrResolutionHint=31x31
AttrPressureRange=10:8 AttrPressureRange=10:8
# Elan Hapticpad mostly used in Lenovo laptops.
[Elan Haptic Touchpad (04F3:3355)]
MatchBus=i2c
MatchVendor=0x04F3
MatchProduct=0x3355
MatchUdevType=touchpad
AttrInputProp=+INPUT_PROP_PRESSUREPAD

View file

@ -1,5 +1,3 @@
# Do not edit this file, it will be overwritten on update
[Glorious Model O] [Glorious Model O]
MatchUdevType=mouse MatchUdevType=mouse
MatchBus=usb MatchBus=usb

View file

@ -1,72 +0,0 @@
# Do not edit this file, it will be overwritten on update
# "GXTP5100 Touchpad": pressure touchpad mostly used in Lenovo laptops.
# Match vid and pid as it can have other names.
[Goodix Haptic Touchpad (27C6:01E7)]
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x01E7
MatchUdevType=touchpad
AttrInputProp=+INPUT_PROP_PRESSUREPAD
# "GXTP5100 Touchpad": pressure touchpad mostly used in Lenovo laptops.
# GXTP5100:00 27C6:01E8 Touchpad
[Goodix Haptic Touchpad (27C6:01E8)]
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x01E8
MatchUdevType=touchpad
AttrInputProp=+INPUT_PROP_PRESSUREPAD
# "GXTP5100 Touchpad": pressure touchpad mostly used in Lenovo laptops.
# GXTP5100:00 27C6:01E9 Touchpad
[Goodix Haptic Touchpad (27C6:01E9)]
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x01E9
MatchUdevType=touchpad
AttrInputProp=+INPUT_PROP_PRESSUREPAD
# "GXTP5100 Touchpad": pressure touchpad mostly used in Lenovo laptops.
# GXTP5100:00 27C6:01EA Touchpad
[Goodix Haptic Touchpad (27C6:01EA)]
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x01EA
MatchUdevType=touchpad
AttrInputProp=+INPUT_PROP_PRESSUREPAD
# "GXTP5100 Touchpad": pressure touchpad mostly used in Lenovo laptops.
# GXTP5100:00 27C6:01EB Touchpad
[Goodix Haptic Touchpad (27C6:01EB)]
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x01EB
MatchUdevType=touchpad
AttrInputProp=+INPUT_PROP_PRESSUREPAD
# "GXTP5400 Touchpad": pressure touchpad mostly used in Lenovo laptops.
# GXTP5400:00 27C6:0F96 Touchpad
[Goodix Haptic Touchpad (27C6:0F96)]
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x0F96
MatchUdevType=touchpad
AttrInputProp=+INPUT_PROP_PRESSUREPAD
# "GXTP5420 Touchpad": pressure touchpad mostly used in Lenovo laptops.
# GXTP5420:00 27C6:0F95 Touchpad
[Goodix Haptic Touchpad (27C6:0F95)]
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x0F95
MatchUdevType=touchpad
AttrInputProp=+INPUT_PROP_PRESSUREPAD
# "GXTP5420 Touchpad": pressure touchpad mostly used in Lenovo laptops.
[Goodix Haptic Touchpad (27C6:0F90)]
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x0F90
MatchUdevType=touchpad
AttrInputProp=+INPUT_PROP_PRESSUREPAD

View file

@ -1,22 +0,0 @@
# Do not edit this file, it will be overwritten on update
# HTIX3602: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
# with different names
# ALPS0001:00 0911:5288
# HTIX3602:00 0911:5288
# PCT2342:00 0911:5288
# SP3105FT:00 0911:5288
# SYNA3602:00 0911:5288
# Also exist FTSC1000:00 0911:5288 Mouse, so match in type
# is needed to leave mouse button untouched.
[Hantick 0911:5288 Touchpad]
MatchBus=i2c
MatchVendor=0x0911
MatchProduct=0x5288
MatchUdevType=touchpad
AttrEventCode=-BTN_RIGHT

View file

@ -3,7 +3,5 @@
# This will match several vendors that all # This will match several vendors that all
# re-use the same vendor ID 256C. # re-use the same vendor ID 256C.
[Huion/Gaomon Tablets] [Huion/Gaomon Tablets]
MatchUdevType=tablet
MatchBus=usb
MatchVendor=0x256C MatchVendor=0x256C
AttrResolutionHint=205x328 AttrResolutionHint=205x328

View file

@ -0,0 +1,47 @@
# Do not edit this file, it will be overwritten on update
# IBM/Lenovo Scrollpoint mouse. Instead of a scroll wheel these mice
# feature trackpoint-like sticks which generate a huge amount of scroll
# events that need to be handled differently than scroll wheel events
[IBM ScrollPoint Mouse 3100]
MatchUdevType=mouse
MatchVendor=0x04B3
MatchProduct=0x3100
ModelLenovoScrollPoint=1
[IBM ScrollPoint Mouse 3103]
MatchUdevType=mouse
MatchVendor=0x04B3
MatchProduct=0x3103
ModelLenovoScrollPoint=1
[IBM ScrollPoint Mouse 3105]
MatchUdevType=mouse
MatchVendor=0x04B3
MatchProduct=0x3105
ModelLenovoScrollPoint=1
[IBM ScrollPoint Mouse 3108]
MatchUdevType=mouse
MatchVendor=0x04B3
MatchProduct=0x3108
ModelLenovoScrollPoint=1
[IBM ScrollPoint Mouse 3109]
MatchUdevType=mouse
MatchVendor=0x04B3
MatchProduct=0x3109
ModelLenovoScrollPoint=1
[IBM ScrollPoint Mouse 6049]
MatchUdevType=mouse
MatchVendor=0x17EF
MatchProduct=0x6049
ModelLenovoScrollPoint=1
[IBM USB Travel Keyboard with Ultra Nav Mouse]
MatchUdevType=pointingstick
MatchVendor=0x04B3
MatchProduct=0x301E
AttrTrackpointMultiplier=1.50

View file

@ -1,41 +1,9 @@
# Do not edit this file, it will be overwritten on update # Do not edit this file, it will be overwritten on update
# ITE keyboards are usb keyboards mostly used in notebook and laptops, # Tested on PCSpecialist Recoil 17
# set as internal. [ITE Device(8176) Keyboard]
[ITE Device(8???) Keyboard]
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=usb MatchBus=usb
MatchVendor=0x048D MatchVendor=0x048D
MatchProduct=0x5000
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# Exception used in desktops (external)
[ITE Device(8595) Keyboard]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x048D
MatchProduct=0x8295
AttrKeyboardIntegration=external
# Exception used in some desktops and few laptops (external)
[ITE Device(8911) Keyboard]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x048D
MatchProduct=0x8911
AttrKeyboardIntegration=external
# Exception used in desktops (external)
[IT8297 RGB LED Controller Keyboard]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x048D
MatchProduct=0x8297
AttrKeyboardIntegration=external
# Exception used in desktops (external)
[Corsair Gaming K95 RGB PLATINUM Keyboard]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x048D
MatchProduct=0xC935
AttrKeyboardIntegration=external

View file

@ -1,5 +1,3 @@
# Do not edit this file, it will be overwritten on update
# Kensington Orbit claims to have a middle button, same for # Kensington Orbit claims to have a middle button, same for
[Kensington Orbit Scroll Wheel] [Kensington Orbit Scroll Wheel]
MatchBus=usb MatchBus=usb

View file

@ -55,12 +55,10 @@ AttrPalmPressureThreshold=400
MatchVendor=0x046D MatchVendor=0x046D
MatchProduct=0x4041 MatchProduct=0x4041
ModelInvertHorizontalScrolling=1 ModelInvertHorizontalScrolling=1
[Logitech MX Master (4060)] [Logitech MX Master (4060)]
MatchVendor=0x046D MatchVendor=0x046D
MatchProduct=0x4060 MatchProduct=0x4060
ModelInvertHorizontalScrolling=1 ModelInvertHorizontalScrolling=1
[Logitech MX Master (4071)] [Logitech MX Master (4071)]
MatchVendor=0x046D MatchVendor=0x046D
MatchProduct=0x4071 MatchProduct=0x4071
@ -71,12 +69,10 @@ ModelInvertHorizontalScrolling=1
MatchVendor=0x046D MatchVendor=0x046D
MatchProduct=0xB012 MatchProduct=0xB012
ModelInvertHorizontalScrolling=1 ModelInvertHorizontalScrolling=1
[Logitech MX Master (Bluetooth B017)] [Logitech MX Master (Bluetooth B017)]
MatchVendor=0x046D MatchVendor=0x046D
MatchProduct=0xB017 MatchProduct=0xB017
ModelInvertHorizontalScrolling=1 ModelInvertHorizontalScrolling=1
[Logitech MX Master (Bluetooth B01E)] [Logitech MX Master (Bluetooth B01E)]
MatchVendor=0x046D MatchVendor=0x046D
MatchProduct=0xB01E MatchProduct=0xB01E

View file

@ -2,7 +2,7 @@
[Microsoft Surface 3 Lid Switch] [Microsoft Surface 3 Lid Switch]
MatchName=*Lid Switch* MatchName=*Lid Switch*
MatchDMIModalias=dmi:*:svnMicrosoftCorporation:pnSurface3:* MatchDMIModalias=dmi:*svnMicrosoftCorporation:pnSurface3:*
AttrLidSwitchReliability=write_open AttrLidSwitchReliability=write_open
# Matches both Surface Laptop keyboards as well as type covers. # Matches both Surface Laptop keyboards as well as type covers.
@ -11,11 +11,16 @@ AttrLidSwitchReliability=write_open
# - Surface Laptop 3: Microsoft Surface 045E:09AE Keyboard # - Surface Laptop 3: Microsoft Surface 045E:09AE Keyboard
# - Surface Book 2: Microsoft Surface Keyboard # - Surface Book 2: Microsoft Surface Keyboard
[Microsoft Surface Keyboard] [Microsoft Surface Keyboard]
MatchName=Microsoft Surface *Keyboard MatchName=*Microsoft Surface *Keyboard*
MatchDMIModalias=dmi:*:svnMicrosoftCorporation:* MatchDMIModalias=dmi:*svnMicrosoftCorporation:*
AttrEventCode=-BTN_0;
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
[Microsoft Surface Cover]
MatchName=*Microsoft Surface *Cover*
MatchDMIModalias=dmi:*svnMicrosoftCorporation:*
AttrKeyboardIntegration=internal
AttrEventCode=-BTN_0;
[Microsoft Surface Laptop Studio Touchpad] [Microsoft Surface Laptop Studio Touchpad]
MatchVendor=0x045E MatchVendor=0x045E
MatchProduct=0x09AF MatchProduct=0x09AF
@ -23,6 +28,11 @@ MatchUdevType=touchpad
AttrPressureRange=25:10 AttrPressureRange=25:10
AttrPalmPressureThreshold=500 AttrPalmPressureThreshold=500
[Microsoft Surface Laptop Studio Built-In Peripherals]
MatchName=*Microsoft Surface*
MatchDMIModalias=dmi:*svnMicrosoftCorporation:*pnSurfaceLaptopStudio
ModelTabletModeNoSuspend=1
[Microsoft Nano Transceiver v2.0] [Microsoft Nano Transceiver v2.0]
MatchUdevType=mouse MatchUdevType=mouse
MatchBus=usb MatchBus=usb

View file

@ -1,8 +1,7 @@
# Do not edit this file, it will be overwritten on update
# Nulea M501 does not name itself as a "Trackball" # Nulea M501 does not name itself as a "Trackball"
# In USB mode, it shares a generic dongle and name with other non-trackball # In USB mode, it shares a generic dongle and name with other non-trackball
# mice. As such, trackball quirks are enabled only for bluetooth modes. # mice. As such, trackball quirks are enabled only for bluetooth modes.
[Nulea M501 Bluetooth Trackball] [Nulea M501 Bluetooth Trackball]
MatchBus=bluetooth MatchBus=bluetooth
MatchVendor=0x000E MatchVendor=0x000E

View file

@ -1,5 +1,3 @@
# Do not edit this file, it will be overwritten on update
[VirtualBox mouse integration] [VirtualBox mouse integration]
MatchName=*VirtualBox mouse integration* MatchName=*VirtualBox mouse integration*
AttrIsVirtual=1 AttrIsVirtual=1

View file

@ -1,28 +0,0 @@
# Do not edit this file, it will be overwritten on update
# GPD Win Max - All versions
# TongFang GX4 (X4SP4NAL)
[Pixart Touchpad (093A:0255)]
MatchBus=i2c
MatchUdevType=touchpad
MatchVendor=0x093A
MatchProduct=0x0255
AttrEventCode=-BTN_RIGHT
# Framework Laptop
# PCSpecialist Recoil 17
[Pixart Touchpad (093A:0274)]
MatchBus=i2c
MatchUdevType=touchpad
MatchVendor=0x093A
MatchProduct=0x0274
AttrEventCode=-BTN_RIGHT
# Chuwi AeroBook Plus
# Chuwi Gemibook
[Pixart Touchpad (093A:1336)]
MatchBus=i2c
MatchUdevType=touchpad
MatchVendor=0x093A
MatchProduct=0x1336
AttrEventCode=-BTN_RIGHT

View file

@ -1,5 +1,3 @@
# Do not edit this file, it will be overwritten on update
[QEMU/KVM mouse integration] [QEMU/KVM mouse integration]
MatchName=*spice vdagent tablet* MatchName=*spice vdagent tablet*
AttrIsVirtual=1 AttrIsVirtual=1

View file

@ -2,7 +2,7 @@
[Razer Blade Lid Switch] [Razer Blade Lid Switch]
MatchName=*Lid Switch* MatchName=*Lid Switch*
MatchDMIModalias=dmi:*:svnRazer:pnBlade*:* MatchDMIModalias=dmi:*svnRazer:pnBlade*
AttrLidSwitchReliability=write_open AttrLidSwitchReliability=write_open
# Manually added entries must go above this line. # Manually added entries must go above this line.
@ -323,10 +323,3 @@ MatchBus=usb
MatchVendor=0x1532 MatchVendor=0x1532
MatchProduct=0x02C6 MatchProduct=0x02C6
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
[RazerBlade182025 Keyboard]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x1532
MatchProduct=0x02C7
AttrKeyboardIntegration=internal

View file

@ -7,22 +7,13 @@ MatchVendor=0x0002
MatchProduct=0x0007 MatchProduct=0x0007
ModelSynapticsSerialTouchpad=1 ModelSynapticsSerialTouchpad=1
# "SYNA2B31:00 06CB:CE37 Touchpad": pressure touchpad used in Lenovo laptops. # SYNA3602:00 0911:5288 touchpad, clickpad pretending it has a right button.
# also known as # Integrated into several systems, including
# MSFT0001:00 06CB:CE37 # Purism Librem 14v1
# MSFT0001:01 06CB:CE37 # Prestigio Smartbook 141 C2
# PNP0C50:01 06CB:CE37 # StarLite Mk II
[Synaptics 06CB:CE37 Touchpad] # Iota IOTA2320
MatchBus=i2c [Synaptics 0911:5288 Touchpad]
MatchVendor=0x06CB
MatchProduct=0xCE37
MatchUdevType=touchpad MatchUdevType=touchpad
AttrInputProp=+INPUT_PROP_PRESSUREPAD MatchName=* 0911:5288 Touchpad
AttrEventCode=-BTN_RIGHT
# "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

View file

@ -1,5 +1,3 @@
# Do not edit this file, it will be overwritten on update
[Trust GXT 25 Gaming Mouse] [Trust GXT 25 Gaming Mouse]
MatchUdevType=mouse MatchUdevType=mouse
MatchBus=usb MatchBus=usb

View file

@ -0,0 +1,9 @@
# Do not edit this file, it will be overwritten on update
# Tested on PCSpecialist Recoil 17
[Uniwill Touchpad]
MatchUdevType=touchpad
MatchBus=i2c
MatchVendor=0x093A
MatchProduct=0x0274
AttrEventCode=-BTN_RIGHT

View file

@ -1,38 +1,9 @@
# Do not edit this file, it will be overwritten on update [Acer Switch Alpha 12]
MatchName=AT Translated Set 2 keyboard
[Acer Spin 5 (SP513-52N)] MatchDMIModalias=dmi:*svnAcer:pnSwitchSA5-271:*
MatchBus=ps2
MatchUdevType=keyboard
MatchDMIModalias=dmi:*:svnAcer:pnSpinSP513-52N:*
ModelTabletModeNoSuspend=1 ModelTabletModeNoSuspend=1
# Input devices [Acer Spin 5]
MatchName=AT Translated Set 2 keyboard
# These ones are detachable keyboard+touchpad combos, set internal to allow DWT MatchDMIModalias=dmi:*svnAcer:pnSpinSP513-52N:*
ModelTabletModeNoSuspend=1
# Acer Switch Alpha 12 (SA5-271) and (SA5-271P)
# Acer Switch 3 (SW312-31)
[Acer Detachable Keyboard (04F2:1558)]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x04F2
MatchProduct=0x1558
AttrKeyboardIntegration=internal
# Acer Switch 7 (SW713-51GNP)
[Acer Detachable Keyboard (06CB:819E)]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x06CB
MatchProduct=0x819E
AttrKeyboardIntegration=internal
# Acer Switch Alpha 12 (SA5-271P)
# Acer Switch 3 (SW312-31)
# Acer Switch 5 (SW512-52) and (SW512-52P)
[Acer Detachable Keyboard (06CB:81A7)]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x06CB
MatchProduct=0x81A7
AttrKeyboardIntegration=internal

View file

@ -88,7 +88,6 @@ AttrThumbSizeThreshold=700
MatchBus=usb MatchBus=usb
MatchVendor=0x05AC MatchVendor=0x05AC
MatchProduct=0x0324 MatchProduct=0x0324
AttrSizeHint=162x115
AttrTouchSizeRange=20:10 AttrTouchSizeRange=20:10
AttrPressureRange=3:0 AttrPressureRange=3:0
AttrPalmSizeThreshold=900 AttrPalmSizeThreshold=900

View file

@ -2,12 +2,12 @@
[Asus X555LAB] [Asus X555LAB]
MatchName=*ETPS/2 Elantech Touchpad* MatchName=*ETPS/2 Elantech Touchpad*
MatchDMIModalias=dmi:*:svnASUSTeKCOMPUTERINC.:pnX555LAB:* MatchDMIModalias=dmi:*svnASUSTeKCOMPUTERINC.:pnX555LAB:*
ModelTouchpadVisibleMarker=1 ModelTouchpadVisibleMarker=1
[Asus UX21E] [Asus UX21E]
MatchName=*ETPS/2 Elantech Touchpad* MatchName=*ETPS/2 Elantech Touchpad*
MatchDMIModalias=dmi:*:svnASUSTeKComputerInc.:pnUX21E:* MatchDMIModalias=dmi:*svnASUSTeKComputerInc.:pnUX21E:*
AttrPressureRange=24:10 AttrPressureRange=24:10
# Asus UX302LA touchpad doesn't update the pressure values once two # Asus UX302LA touchpad doesn't update the pressure values once two
@ -15,35 +15,39 @@ AttrPressureRange=24:10
# at all. https://gitlab.freedesktop.org/libinput/libinput/issues/145 # at all. https://gitlab.freedesktop.org/libinput/libinput/issues/145
[Asus UX302LA] [Asus UX302LA]
MatchName=*ETPS/2 Elantech Touchpad* MatchName=*ETPS/2 Elantech Touchpad*
MatchDMIModalias=dmi:*:svnASUSTeKCOMPUTERINC.:pnUX302LA:* MatchDMIModalias=dmi:*svnASUSTeKCOMPUTERINC.:pnUX302LA:*
AttrEventCode=-ABS_MT_PRESSURE;-ABS_PRESSURE; AttrEventCode=-ABS_MT_PRESSURE;-ABS_PRESSURE;
# Asus VivoBook Flip 14 TP412UA tablet switch seems misbehaving, always # Asus VivoBook Flip 14 TP412UA tablet switch seems misbehaving, always
# indicating tablet position # indicating tablet position
[Asus TP412UA Tablet Mode Switch] [Asus TP412UA Tablet Mode Switch]
MatchName=*Intel Virtual Button* MatchName=*Intel Virtual Button*
MatchDMIModalias=dmi:*:svnASUSTeKCOMPUTERINC.:pnVivoBookFlip14_ASUSFlipTP412UA:* MatchDMIModalias=dmi:*svnASUSTeKCOMPUTERINC.:pnVivoBookFlip14_ASUSFlipTP412UA:*
ModelTabletModeSwitchUnreliable=1 ModelTabletModeSwitchUnreliable=1
# keyboard has a different vid/pid to the touchpad # keyboard has a different vid/pid to the touchpad
# so libinput won't pair the two together and dwt isn't active. # so libinput won't pair the two together and dwt isn't active.
# see: https://gitlab.freedesktop.org/libinput/libinput/-/issues/615 # see: https://gitlab.freedesktop.org/libinput/libinput/-/issues/615
[Asus ROG Zephyrus G15 2021 keyboard] [Asus ROG Zephyrus G15 2021 keyboard]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x0B05 MatchVendor=0x0B05
MatchProduct=0x19B6 MatchProduct=0x19B6
MatchUdevType=keyboard
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# keyboard has a different vid/pid to the touchpad # keyboard has a different vid/pid to the touchpad
# so libinput won't pair the two together and dwt isn't active. # so libinput won't pair the two together and dwt isn't active.
[Asus ROG Strix G15 2021 keyboard] [Asus ROG Strix G15 2021 keyboard]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x0B05 MatchVendor=0x0B05
MatchProduct=0x1866 MatchProduct=0x1866
MatchUdevType=keyboard
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# don't disable volume buttons in tablet mode
[Asus ROG Flow Z13 2025 volume buttons]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnASUSTeKCOMPUTERINC.:pnROGFlowZ13GZ302EA_GZ302EA:*
ModelTabletModeNoSuspend=1
# enable "disable touchpad while typing" to work with z13 keyboard # enable "disable touchpad while typing" to work with z13 keyboard
[Asus ROG FLow Z13 2025 keyboard] [Asus ROG FLow Z13 2025 keyboard]
MatchUdevType=keyboard MatchUdevType=keyboard

View file

@ -0,0 +1,17 @@
# Do not edit this file, it will be overwritten on update
# Acer Hawaii Keyboard, uses Chicony VID
[Acer Hawaii Keyboard]
MatchUdevType=touchpad
MatchBus=usb
MatchVendor=0x04F2
MatchProduct=0x1558
AttrTPKComboLayout=below
# Lenovo MIIX 720 comes with a detachable touchpad-keyboard combo
[Chicony Lenovo MIIX 720 Touchpad]
MatchUdevType=touchpad
MatchBus=usb
MatchVendor=0x17EF
MatchProduct=0x60A6
AttrTPKComboLayout=below

View file

@ -0,0 +1,9 @@
[Chuwi Gemibook]
MatchName=HTIX5288:00 093A:1336 Touchpad
MatchUdevType=touchpad
AttrEventCode=-BTN_RIGHT
[Chuwi AeroBook Plus]
MatchName=SYNA3602:01 093A:1336 Touchpad
MatchUdevType=touchpad
AttrEventCode=-BTN_RIGHT

View file

@ -2,104 +2,118 @@
[Dell Touchpads] [Dell Touchpads]
MatchName=* Touchpad MatchName=* Touchpad
MatchDMIModalias=dmi:*:svnDellInc.:* MatchDMIModalias=dmi:*svnDellInc.:*
ModelTouchpadVisibleMarker=1 ModelTouchpadVisibleMarker=1
[Dell i2c Touchpads] [Dell i2c Touchpads]
MatchBus=i2c MatchBus=i2c
MatchUdevType=touchpad MatchUdevType=touchpad
MatchDMIModalias=dmi:*:svnDellInc.:* MatchDMIModalias=dmi:*svnDellInc.:*
AttrMscTimestamp=watch AttrMscTimestamp=watch
[Dell Inspiron 15R N5110 Touchpad] [Dell Inspiron 15R N5110 Touchpad]
MatchUdevType=touchpad MatchUdevType=touchpad
MatchName=*AlpsPS/2 ALPS GlidePoint MatchName=*AlpsPS/2 ALPS GlidePoint
MatchVersion=0x0300 MatchVersion=0x0300
MatchDMIModalias=dmi:*:svnDellInc.:pnInspironN5110:* MatchDMIModalias=dmi:*svnDellInc.:*pnInspironN5110*
AttrPressureRange=100:95 AttrPressureRange=100:95
[Dell Latitude E5510 Touchpad] [Dell Latitude E5510 Touchpad]
MatchUdevType=touchpad MatchUdevType=touchpad
MatchName=*AlpsPS/2 ALPS GlidePoint MatchName=*AlpsPS/2 ALPS GlidePoint
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitudeE5510:* MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE5510:*
AttrPressureRange=100:90 AttrPressureRange=100:90
[Dell Latitude E6220 Touchpad] [Dell Latitude E6220 Touchpad]
MatchName=*AlpsPS/2 ALPS GlidePoint MatchName=*AlpsPS/2 ALPS GlidePoint
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitudeE6220:* MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE6220:*
AttrPressureRange=100:90 AttrPressureRange=100:90
[Dell XPS L322X Touchpad] [Dell XPS L322X Touchpad]
MatchName=*CyPS/2 Cypress Trackpad MatchName=*CyPS/2 Cypress Trackpad
# pn can be "XPS L322X" and "Dell System XPS L322X", match both :pn*XPSL322X:. MatchDMIModalias=dmi:*svnDell*:*XPSL322X*
MatchDMIModalias=dmi:*:svnDellInc.:pn*XPSL322X:*
AttrPressureRange=30:20 AttrPressureRange=30:20
AttrPalmPressureThreshold=254 AttrPalmPressureThreshold=254
[Dell XPS13 9333 Touchpad] [Dell XPS13 9333 Touchpad]
MatchName=*Synaptics s3203 MatchName=*Synaptics s3203
MatchDMIModalias=dmi:*:svnDellInc.:pnXPS139333:* MatchDMIModalias=dmi:*svnDellInc.:*pnXPS139333*
AttrPressureRange=15:10 AttrPressureRange=15:10
AttrPalmPressureThreshold=150 AttrPalmPressureThreshold=150
[Dell XPS 15 9500 Touchpad] [Dell XPS 15 9500 Touchpad]
MatchName=* Touchpad MatchName=* Touchpad
MatchDMIModalias=dmi:*:svnDellInc.:pnXPS159500:* MatchDMIModalias=dmi:*svnDellInc.:pnXPS159500:*
ModelTouchpadVisibleMarker=0 ModelTouchpadVisibleMarker=0
ModelTouchpadPhantomClicks=1 ModelTouchpadPhantomClicks=1
[Dell Latitude D620 Trackpoint] [Dell Latitude D620 Trackpoint]
MatchName=*DualPoint Stick MatchName=*DualPoint Stick
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitudeD620:* MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeD620*
AttrTrackpointMultiplier=0.5 AttrTrackpointMultiplier=0.5
[Latitude E5480 Trackpoint] [Latitude E5480 Trackpoint]
MatchName=*DualPoint Stick MatchName=*DualPoint Stick
MatchUdevType=pointingstick MatchUdevType=pointingstick
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitude5480:* MatchDMIModalias=dmi:**bvnDellInc.:*:pnLatitude5480*
AttrTrackpointMultiplier=0.5 AttrTrackpointMultiplier=0.5
[Latitude 5580 Trackpoint] [Latitude 5580 Trackpoint]
MatchName=*DualPoint Stick MatchName=*DualPoint Stick
MatchUdevType=pointingstick MatchUdevType=pointingstick
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitude5580:* MatchDMIModalias=dmi:**bvnDellInc.:*:pnLatitude5580*
AttrTrackpointMultiplier=0.5 AttrTrackpointMultiplier=0.5
[Latitude E5570 Trackpoint] [Latitude E5570 Trackpoint]
MatchName=*DualPoint Stick MatchName=*DualPoint Stick
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitudeE5570:* MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE5570*
AttrTrackpointMultiplier=0.1 AttrTrackpointMultiplier=0.1
[Latitude E6320 Trackpoint] [Latitude E6320 Trackpoint]
MatchName=*DualPoint Stick MatchName=*DualPoint Stick
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitudeE6320:* MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE6320*
AttrTrackpointMultiplier=2.0 AttrTrackpointMultiplier=2.0
[Latitude E6400 Trackpoint] [Latitude E6400 Trackpoint]
MatchName=*DualPoint Stick MatchName=*DualPoint Stick
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitudeE6400:* MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE6400*
AttrTrackpointMultiplier=1.5 AttrTrackpointMultiplier=1.5
[Latitude E7470 Trackpoint] [Latitude E7470 Trackpoint]
MatchName=*DualPoint Stick MatchName=*DualPoint Stick
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitudeE7470:* MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE7470*
AttrTrackpointMultiplier=0.125 AttrTrackpointMultiplier=0.125
[Latitude 7275]
MatchName=*AT Translated Set 2 keyboard*
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitude7275:*
ModelTabletModeNoSuspend=1
[Latitude 7285]
MatchName=*AT Translated Set 2 keyboard*
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitude7285:*
ModelTabletModeNoSuspend=1
[Dell Pro Rugged Tablet]
MatchName=*AT Translated Set 2 keyboard*
MatchDMIModalias=dmi:*:svnDellInc.:pnDellProRugged*TabletRA*:*
ModelTabletModeNoSuspend=1
[Latitude 7480 Touchpad] [Latitude 7480 Touchpad]
MatchName=DLL07A0* MatchName=DLL07A0*
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitude7480:* MatchDMIModalias=dmi:**bvnDellInc.:*:pnLatitude7480*
AttrPressureRange=35:34 AttrPressureRange=35:34
[Latitude 7490 Trackpoint] [Latitude 7490 Trackpoint]
MatchName=*Mouse MatchName=*Mouse
MatchUdevType=pointingstick MatchUdevType=pointingstick
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitude7490:* MatchDMIModalias=dmi:**bvnDellInc.:*:pnLatitude7490*
AttrTrackpointMultiplier=0.3 AttrTrackpointMultiplier=0.3
[Precision 7x50 Touchpad] [Precision 7x50 Touchpad]
MatchBus=i2c MatchBus=i2c
MatchUdevType=touchpad MatchUdevType=touchpad
MatchDMIModalias=dmi:*:svnDellInc.:pnPrecision7?50:* MatchDMIModalias=dmi:*svnDellInc.:pnPrecision7?50*
AttrInputProp=-INPUT_PROP_BUTTONPAD AttrInputProp=-INPUT_PROP_BUTTONPAD
# The touch device has the same vid/pid as the totem, the MatchName # The touch device has the same vid/pid as the totem, the MatchName
@ -111,14 +125,9 @@ MatchVendor=0x2575
MatchProduct=0x0204 MatchProduct=0x0204
ModelDellCanvasTotem=1 ModelDellCanvasTotem=1
# Dell 2-in-1s have DMI Chassis Type Convertible, match it as by name can be [Dell 2-in-1 Models]
# 2-in-1, 2n1 or even some models miss it in name. Also Dell respect this, even MatchName=AT Translated Set 2 keyboard
# if they made a mistake they tend to fix it in firmware updates. MatchDMIModalias=dmi:*:svnDellInc.:pn*2-in-1:*
# DMI Chassis Type 1Fh (31 decimal) is Convertible as per SMBIOS specification.
[Dell 2-in-1 Model Buttons]
MatchBus=ps2
MatchUdevType=keyboard
MatchDMIModalias=dmi:*:svnDellInc.:*:ct31:*
ModelTabletModeNoSuspend=1 ModelTabletModeNoSuspend=1
# This is a true pressurepad so disable pressure for contact size # This is a true pressurepad so disable pressure for contact size
@ -127,78 +136,78 @@ ModelTabletModeNoSuspend=1
MatchBus=i2c MatchBus=i2c
MatchVendor=0x27C6 MatchVendor=0x27C6
MatchProduct=0x0F60 MatchProduct=0x0F60
AttrInputProp=+INPUT_PROP_PRESSUREPAD ModelPressurePad=1
[Dell Mayabay Touchpad] [Dell Mayabay Touchpad]
MatchBus=i2c MatchBus=i2c
MatchVendor=0x06CB MatchVendor=0x06CB
MatchProduct=0xCFA0 MatchProduct=0xCFA0
AttrInputProp=+INPUT_PROP_PRESSUREPAD ModelPressurePad=1
[Dell Precision 5480] [Dell Precision 5480]
MatchBus=i2c MatchBus=i2c
MatchVendor=0x0488 MatchVendor=0x0488
MatchProduct=0x1063 MatchProduct=0x1063
MatchUdevType=touchpad MatchUdevType=touchpad
MatchDMIModalias=dmi:*:svnDellInc.:pnPrecision5480:* MatchDMIModalias=dmi:*svnDellInc.:pnPrecision5480*
ModelTouchpadVisibleMarker=0 ModelTouchpadVisibleMarker=0
[Dell laptop 14 Synaptics touchpad] [Dell laptop 14 Synaptics touchpad]
MatchBus=i2c MatchBus=i2c
MatchVendor=0x06CB MatchVendor=0x06CB
MatchProduct=0xCFF8 MatchProduct=0xCFF8
AttrInputProp=+INPUT_PROP_PRESSUREPAD ModelPressurePad=1
[Dell laptop 16 Synaptics touchpad] [Dell laptop 16 Synaptics touchpad]
MatchBus=i2c MatchBus=i2c
MatchVendor=0x06CB MatchVendor=0x06CB
MatchProduct=0xCFF9 MatchProduct=0xCFF9
AttrInputProp=+INPUT_PROP_PRESSUREPAD ModelPressurePad=1
[Dell laptop 14 Goodix touchpad] [Dell laptop 14 Goodix touchpad]
MatchBus=i2c MatchBus=i2c
MatchVendor=0x27C6 MatchVendor=0x27C6
MatchProduct=0x0F61 MatchProduct=0x0F61
AttrInputProp=+INPUT_PROP_PRESSUREPAD ModelPressurePad=1
[Dell laptop 16 Goodix touchpad] [Dell laptop 16 Goodix touchpad]
MatchBus=i2c MatchBus=i2c
MatchVendor=0x27C6 MatchVendor=0x27C6
MatchProduct=0x0F62 MatchProduct=0x0F62
AttrInputProp=+INPUT_PROP_PRESSUREPAD ModelPressurePad=1
[Dell 14 Premium DA14250 touchpad] [Dell 14 Premium DA14250 touchpad]
MatchBus=i2c MatchBus=i2c
MatchVendor=0x0488 MatchVendor=0x0488
MatchProduct=0x108C MatchProduct=0x108C
AttrInputProp=+INPUT_PROP_PRESSUREPAD ModelPressurePad=1
[Dell 16 Premium DA16250 touchpad] [Dell 16 Premium DA16250 touchpad]
MatchBus=i2c MatchBus=i2c
MatchVendor=0x0488 MatchVendor=0x0488
MatchProduct=0x108D MatchProduct=0x108D
AttrInputProp=+INPUT_PROP_PRESSUREPAD ModelPressurePad=1
[Dell laptop 14_1 Synaptics touchpad] [Dell laptop 14_1 Synaptics touchpad]
MatchBus=i2c MatchBus=i2c
MatchVendor=0x06CB MatchVendor=0x06CB
MatchProduct=0xD01D MatchProduct=0xD01D
AttrInputProp=+INPUT_PROP_PRESSUREPAD ModelPressurePad=1
[Dell laptop 16_1 Synaptics touchpad] [Dell laptop 16_1 Synaptics touchpad]
MatchBus=i2c MatchBus=i2c
MatchVendor=0x06CB MatchVendor=0x06CB
MatchProduct=0xD01A MatchProduct=0xD01A
AttrInputProp=+INPUT_PROP_PRESSUREPAD ModelPressurePad=1
[Dell laptop 14 Sensel touchpad] [Dell laptop 14 Sensel touchpad]
MatchBus=i2c MatchBus=i2c
MatchVendor=0x2C2F MatchVendor=0x2C2F
MatchProduct=0x0034 MatchProduct=0x0034
AttrInputProp=+INPUT_PROP_PRESSUREPAD ModelPressurePad=1
[Dell laptop 16 Sensel touchpad] [Dell laptop 16 Sensel touchpad]
MatchBus=i2c MatchBus=i2c
MatchVendor=0x2C2F MatchVendor=0x2C2F
MatchProduct=0x0033 MatchProduct=0x0033
AttrInputProp=+INPUT_PROP_PRESSUREPAD ModelPressurePad=1

View file

@ -1,7 +1,11 @@
# Do not edit this file, it will be overwritten on update [Framework Laptop Touchpad]
MatchName=PIXA3854:00 093A:0274 Touchpad
MatchUdevType=touchpad
MatchDMIModalias=dmi:*svnFramework:pnLaptop*
AttrEventCode=-BTN_RIGHT
[Framework Laptop 16 Keyboard Module] [Framework Laptop 16 Keyboard Module]
MatchName=Framework Laptop 16 Keyboard Module* MatchName=Framework Laptop 16 Keyboard Module*
MatchUdevType=keyboard MatchUdevType=keyboard
MatchDMIModalias=dmi:*:svnFramework:pnLaptop16*:* MatchDMIModalias=dmi:*svnFramework:pnLaptop16*
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal

View file

@ -1,15 +1,5 @@
# Do not edit this file, it will be overwritten on update
[Gigabyte Aero 15 touchpad] [Gigabyte Aero 15 touchpad]
MatchUdevType=touchpad MatchUdevType=touchpad
MatchName=ETPS/2 Elantech Touchpad MatchName=ETPS/2 Elantech Touchpad
MatchDMIModalias=dmi:*:svnGIGABYTE:pnAERO15-XA:* MatchDMIModalias=dmi:*svnGIGABYTE:pnAERO15-XA*
AttrPalmSizeThreshold=800 AttrPalmSizeThreshold=800
[Gigabyte Aorus15BKF keyboard]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x0414
MatchProduct=0x7A44
MatchDMIModalias=dmi:*:svnGIGABYTE:pnAORUS15BKF:*
AttrKeyboardIntegration=internal

View file

@ -1,7 +1,11 @@
# Do not edit this file, it will be overwritten on update [GPD Win Max - All versions]
MatchName=HTIX5288:00 093A:0255 Touchpad
MatchUdevType=touchpad
MatchDMIModalias=dmi:*svnGPD:*pnG1619-*
AttrEventCode=-BTN_RIGHT
[GPD MicroPC 2 Touchpad] [GPD MicroPC 2 Touchpad]
MatchName=ALPS0001:00 36B6:C001 Touchpad MatchName=ALPS0001:00 36B6:C001 Touchpad
MatchUdevType=touchpad MatchUdevType=touchpad
MatchDMIModalias=dmi:*:svnGPD:pnG1688-08:* MatchDMIModalias=dmi:*svnGPD:pnG1688-08:*
AttrInputProp=-INPUT_PROP_BUTTONPAD AttrInputProp=-INPUT_PROP_BUTTONPAD

View file

@ -1,16 +1,14 @@
# Do not edit this file, it will be overwritten on update
# Touchpad is not a clickpad but INPUT_PROP_BUTTONPAD is set # Touchpad is not a clickpad but INPUT_PROP_BUTTONPAD is set
[Synaptics ALPS0001:00 0911:5288 Touchpad] [Synaptics ALPS0001:00 0911:5288 Touchpad]
MatchUdevType=touchpad MatchUdevType=touchpad
MatchName=ALPS0001:00 0911:5288 Touchpad MatchName=ALPS0001:00 0911:5288 Touchpad
MatchDMIModalias=dmi:*:svn3LogicGroup:pnGravitonN15i-K2:* MatchDMIModalias=dmi:*svn3LogicGroup:*:pnGravitonN15i-K2*:*
AttrInputProp=-INPUT_PROP_BUTTONPAD AttrInputProp=-INPUT_PROP_BUTTONPAD
AttrEventCode=+BTN_RIGHT AttrEventCode=+BTN_RIGHT
[PCTel PCT2342:00 0911:5288 Touchpad] [PCTel PCT2342:00 0911:5288 Touchpad]
MatchUdevType=touchpad MatchUdevType=touchpad
MatchName=PCT2342:00 0911:5288 Touchpad MatchName=PCT2342:00 0911:5288 Touchpad
MatchDMIModalias=dmi:*:svn3LogicGroup:pnGravitonN15i:* MatchDMIModalias=dmi:*svn3LogicGroup:pnGravitonN15i:*
AttrInputProp=-INPUT_PROP_BUTTONPAD AttrInputProp=-INPUT_PROP_BUTTONPAD
AttrEventCode=+BTN_RIGHT AttrEventCode=+BTN_RIGHT

View file

@ -1,10 +1,8 @@
# Do not edit this file, it will be overwritten on update
# Clickpad that announces BTN_RIGHT # Clickpad that announces BTN_RIGHT
# requires AttrInputProp=+INPUT_PROP_PRESSUREPAD # requires ModelPressurePad=1
[HONOR MagicBook Art 14] [HONOR MagicBook Art 14]
MatchName=*TOPS0102* MatchName=*TOPS0102*
MatchDMIModalias=dmi:*:svnHONOR:pnMRA-XXX:* MatchDMIModalias=dmi:*svnHONOR:*pnMRA-XXX*
MatchUdevType=touchpad MatchUdevType=touchpad
AttrEventCode=-BTN_RIGHT AttrEventCode=-BTN_RIGHT
AttrInputProp=+INPUT_PROP_PRESSUREPAD ModelPressurePad=1

View file

@ -1,90 +1,29 @@
# Do not edit this file, it will be overwritten on update # Do not edit this file, it will be overwritten on update
#
[HP Chromebook 14]
MatchName=*Cypress APA Trackpad *cyapa*
MatchDMIModalias=dmi:*:svnHewlett-Packard:pnFalco:*
AttrPressureRange=12:8
# Claims to have double/tripletap but doesn't actually send it # Claims to have double/tripletap but doesn't actually send it
# https://bugs.freedesktop.org/show_bug.cgi?id=98538 # https://bugs.freedesktop.org/show_bug.cgi?id=98538
[HP Compaq 6910p] [HP Compaq 6910p]
MatchName=*SynPS/2 Synaptics TouchPad MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnHewlett-Packard:pnHPCompaq6910p*:* MatchDMIModalias=dmi:*svnHewlett-Packard:*pnHPCompaq6910p*
AttrEventCode=-BTN_TOOL_DOUBLETAP;-BTN_TOOL_TRIPLETAP; AttrEventCode=-BTN_TOOL_DOUBLETAP;-BTN_TOOL_TRIPLETAP;
# Claims to have double/tripletap but doesn't actually send it # Claims to have double/tripletap but doesn't actually send it
# https://bugzilla.redhat.com/show_bug.cgi?id=1351285 and # https://bugzilla.redhat.com/show_bug.cgi?id=1351285 and
[HP Compaq 8510w] [HP Compaq 8510w]
MatchName=*SynPS/2 Synaptics TouchPad MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnHewlett-Packard:pnHPCompaq8510w*:* MatchDMIModalias=dmi:*svnHewlett-Packard:*pnHPCompaq8510w*
AttrEventCode=-BTN_TOOL_DOUBLETAP;-BTN_TOOL_TRIPLETAP; AttrEventCode=-BTN_TOOL_DOUBLETAP;-BTN_TOOL_TRIPLETAP;
[HP Elite x2 1013 G3 Tablet Mode Switch] [HP Pavilion dmi4]
MatchName=*Intel Virtual Button*
MatchDMIModalias=dmi:*:svnHP:pnHPElitex21013G3:*
ModelTabletModeSwitchUnreliable=1
# The HP OmniBook Ultra Flip 14 toggles tablet mode at a little less than 180
# degrees and hardware switches off inputs at a little more than 180 degrees.
# We don't suspend ourselves to allow using them in flat position. It is
# possible that HP fixes this in the future (i.e. so tablet mode toggles
# after 180 degrees) so check before removing these rules.
# This rule is for the keyboard and...
[HP OmniBook Ultra Flip Laptop 14-fh0xxx and 14t-fh000 Keyboard]
MatchBus=ps2
MatchUdevType=keyboard
MatchDMIModalias=dmi:*:svnHP:*:rn8CDE:*
ModelTabletModeNoSuspend=1
# ...this rule is for the touchpad.
[HP OmniBook Ultra Flip Laptop 14-fh0xxx and 14t-fh000 Touchpad]
MatchBus=i2c
MatchUdevType=touchpad
MatchDMIModalias=dmi:*:svnHP:*:rn8CDE:*
ModelTabletModeNoSuspend=1
AttrPressureRange=15:5
AttrThumbPressureThreshold=80
AttrPalmPressureThreshold=125
[HP Pavilion dm4]
MatchName=*SynPS/2 Synaptics TouchPad MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnHewlett-Packard:pnHPPaviliondm4NotebookPC:* MatchDMIModalias=dmi:*svnHewlett-Packard:*pnHPPaviliondm4NotebookPC*
ModelHPPavilionDM4Touchpad=1 ModelHPPavilionDM4Touchpad=1
[HP Spectre x360 Convertible 15-bl000]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*:svnHP:pnHPSpectrex360Convertible15-bl0XX:*
ModelTabletModeNoSuspend=1
[HP Spectre x360 Convertible 15-bl1xx]
MatchUdevType=touchpad
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnHP:pnHPSpectrex360Convertible15-bl1XX:*
AttrPressureRange=55:40
AttrThumbPressureThreshold=90
AttrPalmPressureThreshold=100
[HP Spectre x360 Convertible 15-ch0xx]
MatchUdevType=touchpad
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnHP:pnHPSpectrex360Convertible15-ch0xx:*
AttrThumbPressureThreshold=90
AttrPalmPressureThreshold=100
# The HP stream x360's embedded-controller filters out events form its builtin
# keyboard when in tablet-mode itself; and it has a volume up/down on the side.
# Do not suspend the keyboard when in tablet-mode so that the volume up/down
# button keeps working when in tablet-mode.
[HP Spectre x360 Convertible 15-ch0xx Tablet Mode Switch]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*:svnHP:pnHPSpectrex360Convertible15-ch0xx:*
ModelTabletModeNoSuspend=1
# Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see # Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see
# https://bugs.freedesktop.org/show_bug.cgi?id=97147 # https://bugs.freedesktop.org/show_bug.cgi?id=97147
[HP Stream 11] [HP Stream 11]
MatchName=SYN1EDE:00 06CB:7442* MatchName=SYN1EDE:00 06CB:7442*
MatchDMIModalias=dmi:*:svnHewlett-Packard:pnHPStreamNotebookPC11:* MatchDMIModalias=dmi:*svnHewlett-Packard:pnHPStreamNotebookPC11*
AttrInputProp=+INPUT_PROP_BUTTONPAD AttrInputProp=+INPUT_PROP_BUTTONPAD
# The HP stream x360's embedded-controller filters out events form its builtin # The HP stream x360's embedded-controller filters out events form its builtin
@ -97,7 +36,86 @@ MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*:svnHewlett-Packard:pnHPStreamx360ConvertiblePC11:* MatchDMIModalias=dmi:*:svnHewlett-Packard:pnHPStreamx360ConvertiblePC11:*
ModelTabletModeNoSuspend=1 ModelTabletModeNoSuspend=1
[HP Spectre x360 Convertible 15-bl000]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*:svnHP:pnHPSpectrex360Convertible15-bl0XX:*
ModelTabletModeNoSuspend=1
[HP ZBook Studio G3] [HP ZBook Studio G3]
MatchName=AlpsPS/2 ALPS GlidePoint MatchName=AlpsPS/2 ALPS GlidePoint
MatchDMIModalias=dmi:*:svnHP:pnHPZBookStudioG3:* MatchDMIModalias=dmi:*svnHP:pnHPZBookStudioG3:*
ModelHPZBookStudioG3=1 ModelHPZBookStudioG3=1
[HP Chromebook 14]
MatchName=*Cypress APA Trackpad *cyapa*
MatchDMIModalias=dmi:*svnHewlett-Packard*:pnFalco*
AttrPressureRange=12:8
[HP Spectre x360 Convertible 15-bl1xx]
MatchUdevType=touchpad
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnHP:pnHPSpectrex360Convertible15-bl1XX:*
AttrPressureRange=55:40
AttrThumbPressureThreshold=90
AttrPalmPressureThreshold=100
[HP Spectre x360 Convertible 15-ch0xx]
MatchUdevType=touchpad
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnHP:pnHPSpectrex360Convertible15-ch0xx:*
AttrThumbPressureThreshold=90
AttrPalmPressureThreshold=100
# The HP stream x360's embedded-controller filters out events form its builtin
# keyboard when in tablet-mode itself; and it has a volume up/down on the side.
# Do not suspend the keyboard when in tablet-mode so that the volume up/down
# button keeps working when in tablet-mode.
[HP Spectre x360 Convertible 15-ch0xx Tablet Mode Switch]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnHP:pnHPSpectrex360Convertible15-ch0xx:*
ModelTabletModeNoSuspend=1
[HP Elite x2 1013 G3 Tablet Mode Switch]
MatchName=*Intel Virtual Button*
MatchDMIModalias=dmi:*svnHP:pnHPElitex21013G3:*
ModelTabletModeSwitchUnreliable=1
[HP Elite x2 1013 G3 Touchpad]
MatchUdevType=touchpad
MatchBus=usb
MatchVendor=0x044E
MatchProduct=0x1221
AttrTPKComboLayout=below
[HP Elite x2 1013 G3 Keyboard]
MatchUdevType=keyboard
MatchBus=ps2
MatchDMIModalias=dmi:*svnHP:pnHPElitex21013G3:*
AttrKeyboardIntegration=external
[HP Haptics Touchpad CFD2]
MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xCFD2
ModelPressurePad=1
# The HP OmniBook Ultra Flip Laptop 14-fh0xxx's custom Intel ISH firmware
# filters out events from its builtin keyboard and touchpad when the hinge is
# opened little more than 180 degrees but toggles tablet-mode when it's opened
# little less than 180 degrees.
# Do not suspend the keyboard and touchpad to let use the device in flat
# position and also give consistency with some keyboard keys controlled by the
# Video Bus device (brightness down/up), the HP WMI hotkeys device (mic mute and
# hp hubs launcher key) and the backlight getting on and off by the firmware at
# the same time it enables disables the input.
# This one is for the keyboard and...
[HP OmniBook Ultra Flip Laptop 14-fh0xxx Keyboard]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnHP:pnHPOmniBookUltraFlipLaptop14-fh0xxx:*
ModelTabletModeNoSuspend=1
# ...this one is for the touchpad.
[HP OmniBook Ultra Flip Laptop 14-fh0xxx Touchpad]
MatchName=SYNA3580:00 06CB:CFD2 Touchpad
MatchDMIModalias=dmi:*svnHP:pnHPOmniBookUltraFlipLaptop14-fh0xxx:*
ModelTabletModeNoSuspend=1

View file

@ -1,23 +1,21 @@
# Do not edit this file, it will be overwritten on update
# Clickpad that announces BTN_RIGHT # Clickpad that announces BTN_RIGHT
# https://bugzilla.redhat.com/show_bug.cgi?id=1972370 # https://bugzilla.redhat.com/show_bug.cgi?id=1972370
[Huawei MateBook X 2020 Touchpad] [Huawei MateBook 2020 Touchpad]
MatchName=ELAN2604:00 04F3:3114 Touchpad MatchName=ELAN2604:00 04F3:3114 Touchpad
MatchUdevType=touchpad MatchUdevType=touchpad
MatchDMIModalias=dmi:*:svnHUAWEI:pnEUL-WX9:* MatchDMIModalias=dmi:*svnHUAWEI:*pvrM1010*
AttrEventCode=-BTN_RIGHT AttrEventCode=-BTN_RIGHT
[Huawei MateBook X Pro 2022 Touchpad] [Huawei MateBook X Pro 2022 Touchpad]
MatchName=GXTP7863:00 27C6:01E0 Touchpad MatchName=GXTP7863:00 27C6:01E0 Touchpad
MatchUdevType=touchpad MatchUdevType=touchpad
MatchDMIModalias=dmi:*:svnHUAWEI:pnMRGF-XX:* MatchDMIModalias=dmi:*svnHUAWEI:*pnMRGF-XX*
AttrEventCode=-BTN_RIGHT AttrEventCode=-BTN_RIGHT
# 2024 model requires AttrInputProp=+INPUT_PROP_PRESSUREPAD # 2024 model requires ModelPressurePad=1
[Huawei MateBook X Pro 2024 Touchpad] [Huawei MateBook X Pro 2024 Touchpad]
MatchName=GXTP7863:00 27C6:01E0 Touchpad MatchName=GXTP7863:00 27C6:01E0 Touchpad
MatchUdevType=touchpad MatchUdevType=touchpad
MatchDMIModalias=dmi:*:svnHUAWEI:pnVGHH-XX:* MatchDMIModalias=dmi:*svnHUAWEI:*pnVGHH-XX*
AttrEventCode=-BTN_RIGHT AttrEventCode=-BTN_RIGHT
AttrInputProp=+INPUT_PROP_PRESSUREPAD ModelPressurePad=1

View file

@ -1,9 +1,7 @@
# Do not edit this file, it will be overwritten on update
# Touchpad is not a clickpad but INPUT_PROP_BUTTONPAD is set # Touchpad is not a clickpad but INPUT_PROP_BUTTONPAD is set
[Synaptics ALPS0001:00 0911:5288 Touchpad] [Synaptics ALPS0001:00 0911:5288 Touchpad]
MatchUdevType=touchpad MatchUdevType=touchpad
MatchName=ALPS0001:00 0911:5288 Touchpad MatchName=ALPS0001:00 0911:5288 Touchpad
MatchDMIModalias=dmi:*:svnICL:*:rnSi16:* MatchDMIModalias=dmi:*svnICL:*:rvnICL:rnSi16:*
AttrInputProp=-INPUT_PROP_BUTTONPAD AttrInputProp=-INPUT_PROP_BUTTONPAD
AttrEventCode=+BTN_RIGHT AttrEventCode=+BTN_RIGHT

View file

@ -2,240 +2,132 @@
[Lenovo Thinkpad Touchpad] [Lenovo Thinkpad Touchpad]
MatchName=*Synaptics* MatchName=*Synaptics*
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPad*:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPad*:*
AttrThumbPressureThreshold=100 AttrThumbPressureThreshold=100
[Lenovo x230 Touchpad] [Lenovo x230 Touchpad]
MatchName=*SynPS/2 Synaptics TouchPad MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX230*:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX230*
ModelLenovoX230=1 ModelLenovoX230=1
[Lenovo T440p Touchpad PS/2] [Lenovo T440p Touchpad PS/2]
MatchName=SynPS/2 Synaptics TouchPad MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadT440p:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT440p*
ModelLenovoT450Touchpad=1 ModelLenovoT450Touchpad=1
[Lenovo T440p Touchpad RMI4] [Lenovo T440p Touchpad RMI4]
MatchName=Synaptics tm2964-001 MatchName=Synaptics tm2964-001
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadT440p:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT440p*
ModelLenovoT450Touchpad=1 ModelLenovoT450Touchpad=1
[Lenovo T470 Trackpoint] [Lenovo T470 Trackpoint]
MatchName=*TPPS/2 IBM TrackPoint MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadT470:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT470:*
AttrTrackpointMultiplier=0.75 AttrTrackpointMultiplier=0.75
[Lenovo T480 Trackpoint] [Lenovo T480 Trackpoint]
MatchName=*TPPS/2 IBM TrackPoint MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadT480:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT480:*
AttrTrackpointMultiplier=0.75 AttrTrackpointMultiplier=0.75
[Lenovo A485 Trackpoint] [Lenovo A485 Trackpoint]
MatchName=*TPPS/2 IBM TrackPoint MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadA485:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadA485:*
AttrTrackpointMultiplier=0.75 AttrTrackpointMultiplier=0.75
# Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see # Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see
# https://gitlab.freedesktop.org/libinput/libinput/issues/177 # https://gitlab.freedesktop.org/libinput/libinput/issues/177
[Lenovo T480s Touchpad] [Lenovo T480s Touchpad]
MatchName=Elan Touchpad MatchName=Elan Touchpad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadT480s:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT480s*
AttrInputProp=+INPUT_PROP_BUTTONPAD AttrInputProp=+INPUT_PROP_BUTTONPAD
# Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see # Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see
# https://gitlab.freedesktop.org/libinput/libinput/issues/177 # https://gitlab.freedesktop.org/libinput/libinput/issues/177
[Lenovo T490s Touchpad] [Lenovo T490s Touchpad]
MatchName=Elan Touchpad MatchName=Elan Touchpad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadT490s:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT490s*
AttrInputProp=+INPUT_PROP_BUTTONPAD AttrInputProp=+INPUT_PROP_BUTTONPAD
[Lenovo T490s Trackpoint] [Lenovo T490s Trackpoint]
MatchName=*TPPS/2 IBM TrackPoint MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadT490s:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT490s:*
AttrTrackpointMultiplier=0.4 AttrTrackpointMultiplier=0.4
[Lenovo P14s Gen 1 AMD Trackpoint] [Lenovo P14s Gen 1 AMD Trackpoint]
MatchUdevType=pointingstick MatchUdevType=pointingstick
MatchName=*TPPS/2 Elan TrackPoint* MatchName=*TPPS/2 Elan TrackPoint*
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadP14sGen1:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadP14sGen1*
AttrTrackpointMultiplier=0.4 AttrTrackpointMultiplier=0.4
# Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see # Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see
# https://gitlab.freedesktop.org/libinput/libinput/issues/234 # https://gitlab.freedesktop.org/libinput/libinput/issues/234
# NOTE: This was intended for L380 Yoga but was applied before also for normal [Lenovo L380 Touchpad]
# L380. Is needed also for non covertible model?
[Lenovo L380 Yoga Touchpad]
MatchName=Elan Touchpad MatchName=Elan Touchpad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadL380Yoga:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadL380*
AttrInputProp=+INPUT_PROP_BUTTONPAD AttrInputProp=+INPUT_PROP_BUTTONPAD
[Lenovo X200/201 Trackpoint] [Lenovo X200/201 Trackpoint]
MatchName=*TPPS/2 IBM TrackPoint MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX20?:* MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX20?:*
AttrTrackpointMultiplier=0.25 AttrTrackpointMultiplier=0.25
[Lenovo X200s/201s Trackpoint] [Lenovo X200s/201s Trackpoint]
MatchName=*TPPS/2 IBM TrackPoint MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX20??:* MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX20??:*
AttrTrackpointMultiplier=0.25 AttrTrackpointMultiplier=0.25
[Lenovo X230 Trackpoint] [Lenovo X230 Trackpoint]
MatchName=*TPPS/2 IBM TrackPoint MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX230:* MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX230:*
AttrTrackpointMultiplier=0.25 AttrTrackpointMultiplier=0.25
[Lenovo X280 Trackpoint] [Lenovo X280 Trackpoint]
MatchName=*TPPS/2 Elan TrackPoint MatchName=*TPPS/2 Elan TrackPoint
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX280:* MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX280:*
AttrTrackpointMultiplier=0.5 AttrTrackpointMultiplier=0.5
[Lenovo X280 Touchpad] [Lenovo X280 Touchpad]
MatchName=Synaptics TM3381-002 MatchName=Synaptics TM3381-002
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX280:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX280*
AttrPalmSizeThreshold=6 AttrPalmSizeThreshold=6
[Lenovo P50 Touchpad] [Lenovo P50 Touchpad]
MatchName=SynPS/2 Synaptics TouchPad MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadP50*:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadP50*:
ModelLenovoT450Touchpad=1 ModelLenovoT450Touchpad=1
AttrPalmPressureThreshold=150 AttrPalmPressureThreshold=150
[Lenovo *50 Touchpad] [Lenovo *50 Touchpad]
MatchName=SynPS/2 Synaptics TouchPad MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPad??50*:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPad??50*:
ModelLenovoT450Touchpad=1 ModelLenovoT450Touchpad=1
AttrPalmPressureThreshold=150 AttrPalmPressureThreshold=150
[Lenovo *60 Touchpad] [Lenovo *60 Touchpad]
MatchName=SynPS/2 Synaptics TouchPad MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPad??60*:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPad??60*:
ModelLenovoT450Touchpad=1 ModelLenovoT450Touchpad=1
AttrPalmPressureThreshold=150 AttrPalmPressureThreshold=150
[Lenovo X1 Carbon 3rd Touchpad] [Lenovo X1 Carbon 3rd Touchpad]
MatchName=SynPS/2 Synaptics TouchPad MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX1Carbon3rd:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd:*
ModelLenovoT450Touchpad=1 ModelLenovoT450Touchpad=1
AttrPalmPressureThreshold=150 AttrPalmPressureThreshold=150
[Lenovo X1 Carbon 4th Trackpoint] [Lenovo X1 Carbon 4th Trackpoint]
MatchUdevType=pointingstick MatchUdevType=pointingstick
MatchName=*TPPS/2 IBM TrackPoint* MatchName=*TPPS/2 IBM TrackPoint*
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX1Carbon4th:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX1Carbon4th*
AttrTrackpointMultiplier=0.5 AttrTrackpointMultiplier=0.5
[Lenovo X1 Carbon 6th Trackpoint] [Lenovo X1 Carbon 6th Trackpoint]
MatchUdevType=pointingstick MatchUdevType=pointingstick
MatchName=*TPPS/2 Elan TrackPoint* MatchName=*TPPS/2 Elan TrackPoint*
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX1Carbon6th:* MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX1Carbon6th*
AttrTrackpointMultiplier=0.4 AttrTrackpointMultiplier=0.4
# Don't disable keys accessible in tablet mode, #106799 comment 7
[Lenovo Thinkpad S1 Yoga and S1 Yoga 12]
MatchBus=ps2
MatchUdevType=keyboard
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadS1Yoga*:*
ModelTabletModeNoSuspend=1
# Don't disable keys accessible in tablet mode, #103749
[Lenovo Thinkpad X1 Yoga 1st]
MatchBus=ps2
MatchUdevType=keyboard
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX1Yoga1st:*
ModelTabletModeNoSuspend=1
[Lenovo X1 Yoga Trackpoint 1st gen]
MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX1Yoga1st:*
AttrTrackpointMultiplier=1.25
[Lenovo Yoga C930 Tablet]
MatchBus=i2c
MatchVendor=0x056A
MatchProduct=0x5196
AttrTabletSmoothing=1
# Lenovo Carbon X1 6th gen (RMI4 only, PS/2 is broken on this device,
# sends bogus ABS_MT_TOOL_TYPE events for MT_TOOL_PALM
[Lenovo Carbon X1 6th gen]
MatchName=Synaptics TM3288-011
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX1Carbon6th:*
AttrEventCode=-ABS_MT_TOOL_TYPE
ModelLenovoX1Gen6Touchpad=1
# IBM ThinkPad X41 Tablet identify itself as DMI Chassis Type: 0Ah 10 Notebook
# but it's really a convertible one and have buttons wired as ps2 keyboard,
# don't disable them when tablet-mode switch is in effect.
[IBM ThinkPad X41 Tablet Buttons]
MatchUdevType=keyboard
MatchBus=ps2
MatchDMIModalias=dmi:*:svnIBM:*:pvrThinkPadX41Tablet:*
ModelTabletModeNoSuspend=1
# Lenovo ThinkPad X60 X61 X200 X201 X220 X230 Tablets identify themselves as
# DMI Chassis Type: 0Ah 10 Notebook but they are really convertibles ones and
# have buttons wired as ps2 keyboard, don't disable them when tablet-mode switch
# is in effect.
[Lenovo ThinkPad X Tablet Series Buttons]
MatchUdevType=keyboard
MatchBus=ps2
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX*Tablet:*
ModelTabletModeNoSuspend=1
# Modifies pressure range to avoid random jumps.
# https://gitlab.freedesktop.org/libinput/libinput/-/issues/407
[Lenovo Yoga 2 Pro touchpad]
MatchUdevType=touchpad
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrLenovoYoga2Pro:*
AttrPressureRange=50:45
[Lenovo ThinkPad E14 Gen 2]
MatchUdevType=touchpad
MatchName=*Elan Touchpad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadE14Gen2:*
AttrPalmPressureThreshold=300
AttrPressureRange=10:8
[Lenovo ThinkPad E16 Gen 3]
MatchUdevType=pointingstick
MatchName=*TPPS/2 Elan TrackPoint*
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadE16Gen3:*
AttrTrackpointMultiplier=0.5
[Lenovo Thinkpad Yoga X390]
MatchUdevType=pointingstick
MatchName=*TPPS/2 Elan TrackPoint*
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX390Yoga*:*
AttrTrackpointMultiplier=0.4
# Lenovo Yoga Slim 7i Carbon sends bogus ABS_MT_TOOL_TYPE MT_TOOL_PALM events
[Lenovo Yoga Slim 7i Carbon]
MatchName=* Touchpad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrYogaSlim7Carbon13IAP7:*
AttrEventCode=-ABS_MT_TOOL_TYPE
# Lenovo detachable devices prior to SMBIOS 3.0.0 specficiation (2015-02-12)
# when Tablet, Convertible and Detachable Chassis Types didn't exist use Hand
# Held. e.g. First Miix devices till Lenovo MIIX 300-10IBY (80NR) and initial
# firmware versions of Lenovo MIIX 310-10ICR (80SG).
# Match chassis and *MIIX* Product Version.
# DMI Chassis Type 0Bh (11 decimal) is Hand Held as per SMBIOS specification.
[Lenovo 1st Convertible Device Buttons]
MatchBus=ps2
MatchUdevType=keyboard
MatchDMIModalias=dmi:*:svnLENOVO:*:pvr*MIIX*:*:ct11:*
ModelTabletModeNoSuspend=1
# Match also *Miix* Product Version.
[Lenovo 1st Convertible Device Buttons 2]
MatchBus=ps2
MatchUdevType=keyboard
MatchDMIModalias=dmi:*:svnLENOVO:*:pvr*Miix*:*:ct11:*
ModelTabletModeNoSuspend=1
# Input devices
[Lenovo ThinkPad Compact USB Keyboard with TrackPoint (keyboard)] [Lenovo ThinkPad Compact USB Keyboard with TrackPoint (keyboard)]
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=usb MatchBus=usb
@ -250,259 +142,284 @@ MatchVendor=0x17EF
MatchProduct=0x6047 MatchProduct=0x6047
AttrPointingStickIntegration=external AttrPointingStickIntegration=external
# IBM/Lenovo Scrollpoint mouse. Instead of a scroll wheel these mice # Lenovo Thinkpad Yoga (not the consumer versions) disables the keyboard
# feature trackpoint-like sticks which generate a huge amount of scroll # mechanically. We must not disable the keyboard because some keys are
# events that need to be handled differently than scroll wheel events # still accessible on the screen and volume rocker.
# Initially #103749 and extended by #106799 comment 7
[Lenovo Thinkpad Yoga]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPad*Yoga*:*
ModelTabletModeNoSuspend=1
[IBM ScrollPoint Mouse 3100] [Lenovo X1 Yoga Trackpoint 1st gen]
MatchUdevType=mouse MatchName=*TPPS/2 IBM TrackPoint
MatchVendor=0x04B3 MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX1Yoga1st:*
MatchProduct=0x3100 AttrTrackpointMultiplier=1.25
ModelLenovoScrollPoint=1
[IBM ScrollPoint Mouse 3103] # A true pressurepad so let's not use pressure for contact size
MatchUdevType=mouse # https://gitlab.freedesktop.org/libinput/libinput/-/issues/562
MatchVendor=0x04B3 [Lenovo Yoga 9i Pressurepad]
MatchProduct=0x3103 MatchBus=i2c
ModelLenovoScrollPoint=1 MatchVendor=0x06CB
MatchProduct=0xCE37
ModelPressurePad=1
[IBM ScrollPoint Mouse 3105] [Lenovo Yoga C930 Tablet]
MatchUdevType=mouse MatchBus=i2c
MatchVendor=0x04B3 MatchVendor=0x056A
MatchProduct=0x3105 MatchProduct=0x5196
ModelLenovoScrollPoint=1 AttrTabletSmoothing=1
[IBM ScrollPoint Mouse 3108] # Lenovo Carbon X1 6th gen (RMI4 only, PS/2 is broken on this device,
MatchUdevType=mouse # sends bogus ABS_MT_TOOL_TYPE events for MT_TOOL_PALM
MatchVendor=0x04B3 [Lenovo Carbon X1 6th gen]
MatchProduct=0x3108 MatchName=Synaptics TM3288-011
ModelLenovoScrollPoint=1 MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX1Carbon6th:*
AttrEventCode=-ABS_MT_TOOL_TYPE
ModelLenovoX1Gen6Touchpad=1
[IBM ScrollPoint Mouse 3109] [Lenovo X41 Tablet]
MatchUdevType=mouse MatchName=AT Translated Set 2 keyboard
MatchVendor=0x04B3 MatchDMIModalias=dmi:*svnIBM:*pvrThinkPadX41Tablet:*
MatchProduct=0x3109 ModelTabletModeNoSuspend=1
ModelLenovoScrollPoint=1
[Lenovo ScrollPoint Mouse 6049] [Lenovo X60 Tablet]
MatchUdevType=mouse MatchName=AT Translated Set 2 keyboard
MatchVendor=0x17EF MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX60Tablet:*
MatchProduct=0x6049 ModelTabletModeNoSuspend=1
ModelLenovoScrollPoint=1
[IBM USB Travel Keyboard with Ultra Nav Mouse] [Lenovo X61 Tablet]
MatchUdevType=pointingstick MatchName=AT Translated Set 2 keyboard
MatchVendor=0x04B3 MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX61Tablet:*
MatchProduct=0x301E ModelTabletModeNoSuspend=1
AttrTrackpointMultiplier=1.50
# The following ones correspond to detachable keyboard+touchpad combos used in # Lenovo X220 Tablet special bezel buttons are associated to the
# Lenovo detachable devices. Names can vary within the same ids and some are # keyboard and would therefore mistakenly be deactivated as well.
# repeated over different devices. They're mostly connected over USB bus through # See https://gitlab.freedesktop.org/libinput/libinput/issues/154
# pogo pins and we need to set the keyboard as internal to achieve DWT. [Lenovo X220 Tablet]
# We could also do it matching the touchpad and setting AttrTPKComboLayout=below MatchName=AT Translated Set 2 keyboard
# but this combos are tied to the structure of the device they are designed for. MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX220Tablet:*
# At least some of them affect lid switch state when closed while attached. ModelTabletModeNoSuspend=1
# Found in: # Special bezel button deactivation with
# Lenovo MIIX 320-10ICR (80XF) # keyboard also applies to X230 Tablet
# Known names: [Lenovo X230 Tablet]
# "HAILUCK CO.,LTD Lenovo HID Device" in 80XF MatchName=AT Translated Set 2 keyboard
# "HTX USB HID Device HTX HID Device Keyboard" in 80XF MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX230Tablet:*
# "SIPODEV Lenovo HID Device" in 80XF ModelTabletModeNoSuspend=1
[Lenovo Detachable Keyboard (048D:8911)]
# Special bezel button deactivation with
# keyboard also applies to X200 Tablet
[Lenovo X200 Tablet]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX200Tablet:*
ModelTabletModeNoSuspend=1
[Lenovo X201 Tablet]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX201Tablet:*
ModelTabletModeNoSuspend=1
# Lenovo MIIX 720 comes with a detachable keyboard. We must not disable
# the keyboard because some keys are still accessible on the screen and
# volume rocker. See
# https://gitlab.freedesktop.org/libinput/libinput/issues/115
[Lenovo MIIX 720]
MatchName=AT Raw Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrLenovoMIIX720-12IKB:*
ModelTabletModeNoSuspend=1
# Lenovo ThinkPad X1 Tablet (1st Gen) also comes with a detachable keyboard.
# We must not disable the keyboard because some keys are still accessible on
# volume rocker.
[Lenovo ThinkPad X1 Tablet (1st Gen)]
MatchName=AT Raw Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX1Tablet:*
ModelTabletModeNoSuspend=1
# Misidentified as an external keyboard by libinput
# Tested on Legion 5 15AR05H
[Lenovo Legion 5 Keyboard (C100)]
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=usb MatchBus=usb
MatchVendor=0x048D MatchVendor=0x048D
MatchProduct=0x8911 MatchProduct=0xC100
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# Found in: # Tested on Legion 5 15ARH7H, should also work for Legion 5 Pro 16ARH7H
# Lenovo MIIX 510-12ISK (80U1) # 048d:c102 Integrated Technology Express, Inc. ITE Device(8910)
# Lenovo MIIX 510-12IKB (80XE) [Lenovo Legion 5 Keyboard (C102)]
# Known names:
# "SIPODEV Lenovo HID Device" in 80U1 and 80XE
[Lenovo Detachable Keyboard (04F2:1622)]
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=usb MatchBus=usb
MatchVendor=0x04F2 MatchVendor=0x048D
MatchProduct=0x1622 MatchProduct=0xC102
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# Found in: # Tested on Legion Pro 5 16IRX8
# Lenovo MIIX 3-1030 (80HV) # 048d:c103 Integrated Technology Express, Inc. ITE Device(8910)
# Known names: [Lenovo Legion 5 Keyboard (C103)]
# "Lenovo Lenovo Miix 3 1030 USB Keyboard" in 80HV
[Lenovo Detachable Keyboard (17EF:606E)]
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=usb MatchBus=usb
MatchVendor=0x17EF MatchVendor=0x048D
MatchProduct=0x606E MatchProduct=0xC103
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# Found in: [Lenovo Legion 5 Keyboard (C955)]
# Lenovo MIIX 700-121SK (80QL)
# Known names:
# "Lenovo ideapad MIIX 700 USB keyboard" in 80QL
[Lenovo Detachable Keyboard (17EF:60A2)]
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=usb MatchBus=usb
MatchVendor=0x17EF MatchVendor=0x048D
MatchProduct=0x60A2 MatchProduct=0xC955
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# Found in: # Tested on Lenovo Legion 5 Pro 16ACH6H
# Lenovo MIIX 720-12IKB (80VV) [Lenovo Legion 5 Pro Keyboard]
# Known names:
# "Chicony Lenovo MIIX 720" in 80VV
[Lenovo Detachable Keyboard (17EF:60A6)]
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=usb MatchBus=usb
MatchVendor=0x17EF MatchVendor=0x048D
MatchProduct=0x60A6 MatchProduct=0xC101
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# Found in: [Lenovo Legion 5i Keyboard]
# Lenovo MIIX 720-12IKB (80VV) MatchName=ITE Tech. Inc. ITE Device(8910) Keyboard
# Known names: MatchDMIModalias=dmi:*svnLENOVO:*pvrLegion515IAH7H:*
# "Chicony Lenovo MIIX 720" in 80VV AttrKeyboardIntegration=internal
[Lenovo Detachable Keyboard (17EF:60A7)]
[Lenovo Legion 7 Keyboard]
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=usb MatchBus=usb
MatchVendor=0x17EF MatchVendor=0x048D
MatchProduct=0x60A7 MatchProduct=0xC968
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# Found in: [Lenovo Legion Y740 Keyboard]
# Lenovo MIIX 510-12IKB (80XE)
# Lenovo MIIX 520-12IKB (20M3), (20M4) and (81CG)
# Known names:
# "SIPODEV Lenovo HID Device" in 80XE, 20M3, 20M4 and 81CG
[Lenovo Detachable Keyboard (17EF:60BB)]
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=usb MatchBus=usb
MatchVendor=0x17EF MatchVendor=0x048D
MatchProduct=0x60BB MatchProduct=0xC936
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# Found in: [Lenovo Legion Slim 7]
# Lenovo IdeaPad D330-10IGM (81H3) and (81MD)
# Lenovo IdeaPad D330-10IGL (82H0)
# Known names:
# "SIPODEV Lenovo HID Device" in 81H3, 81MD and 82H0
[Lenovo Detachable Keyboard (17EF:60C3)]
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=usb MatchBus=usb
MatchVendor=0x17EF MatchVendor=0x048D
MatchProduct=0x60C3 MatchProduct=0xC967
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# Found in: [Lenovo Legion Slim 7 Gen 8]
# Lenovo IdeaPad D330-10IGM (81H3) and (81MD)
# Known names:
# "HAILUCK CO.,LTD Lenovo HID Device" in 81H3 and 81MD
[Lenovo Detachable Keyboard (17EF:60C6)]
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=usb MatchBus=usb
MatchVendor=0x17EF MatchVendor=0x048D
MatchProduct=0x60C6 MatchProduct=0xC987
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# Found in: # https://gitlab.freedesktop.org/libinput/libinput/-/issues/604
# Lenovo IdeaPad D330-10IGL (82H0) [Lenovo Yoga Slim 9 14ITL5 Pressurepad]
# Known names: MatchBus=i2c
# "HAILUCK CO.,LTD Lenovo HID Device" in 82H0 MatchVendor=0x27C6
[Lenovo Detachable Keyboard (17EF:60C8)] MatchProduct=0x01E8
ModelPressurePad=1
# Duet 7i tablet switch activated by folding keyboard cover, or removing it.
# We must not disable volume rocker 'keyboard'.
[Lenovo Duet 7i]
MatchName=AT Raw Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrYogaDuet713IML05:*
ModelTabletModeNoSuspend=1
# Lenovo IdeaPad Duet 3 also comes with a detachable keyboard.
[Lenovo IdeaPad Duet 3]
MatchName=AT Raw Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrIdeaPadDuet3*:*
ModelTabletModeNoSuspend=1
# Modifies pressure range to avoid random jumps.
# https://gitlab.freedesktop.org/libinput/libinput/-/issues/407
[Lenovo Yoga 2 Pro touchpad]
MatchUdevType=touchpad
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrLenovoYoga2Pro*
AttrPressureRange=50:45
[Lenovo Legion 7i 4090 Keyboard]
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=usb MatchBus=usb
MatchVendor=0x17EF MatchDMIModalias=dmi:*svnLENOVO:*:pvrLegionY9000PIRX8H*
MatchProduct=0x60C8
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# Found in: [Lenovo LOQ 15IRH8 Keyboard]
# Lenovo IdeaPad Duet3 10IGL5 (82AT)
# Lenovo IdeaPad Duet3 10IGL5-LTE (82HK)
# Known names:
# "HAILUCK CO.,LTD Duet 3 USB Composite Device" in 82AT and 82HK
[Lenovo Detachable Keyboard (17EF:60FA) USB]
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=usb MatchBus=usb
MatchVendor=0x17EF MatchVendor=0x048D
MatchProduct=0x60FA MatchProduct=0xC986
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# Found in: [Lenovo ThinkPad E14 v2]
# Lenovo IdeaPad Duet3 10IGL5 (82AT) MatchUdevType=touchpad
# Known names: MatchName=*Elan Touchpad
# "Duet 3 BT Keyboard" in 82AT MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadE14Gen2*
# "Lenovo Duet 3 BT Folio Keyboard" in 82AT AttrPalmPressureThreshold=300
[Lenovo Detachable Keyboard (17EF:60FA) BT] AttrPressureRange=10:8
MatchUdevType=keyboard
MatchBus=bluetooth
MatchVendor=0x17EF
MatchProduct=0x60FA
AttrKeyboardIntegration=internal
# Found in: [Lenovo ThinkPad E16 Gen 3]
# Lenovo IdeaPad Duet3 10IGL5 (82AT) MatchUdevType=pointingstick
# Known names: MatchName=*TPPS/2 Elan TrackPoint*
# "SIPODEV Duet 3 USB Composite Device" in 82AT MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadE16Gen3*
[Lenovo Detachable Keyboard (17EF:60FB)] AttrTrackpointMultiplier=0.5
# White Backlit Keyboard
[Lenovo Ideapad Gaming 3]
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=usb MatchBus=usb
MatchVendor=0x17EF MatchVendor=0x048D
MatchProduct=0x60FB MatchProduct=0xC966
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# Found in: [Lenovo Thinkpad Yoga X390]
# Lenovo IdeaPad Duet 5 12IAU7 (82TQ) MatchUdevType=pointingstick
# Known names: MatchName=*TPPS/2 Elan TrackPoint*
# "DOKING Duet 5 USB Composite Device" in 82TQ MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX390Yoga*:*
[Lenovo Detachable Keyboard (17EF:6139)] AttrTrackpointMultiplier=0.4
# This should cover all keyboards that are misidentified as external.
# Tested on Lenovo Legion 5 Pro (2023)
[Lenovo 16ARX8 keyboard]
MatchName=ITE Tech. Inc. ITE Device(8910) Keyboard
MatchUdevType=keyboard MatchUdevType=keyboard
MatchBus=usb MatchDMIModalias=dmi:*svnLENOVO:*
MatchVendor=0x17EF
MatchProduct=0x6139
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal
# Found in: # Some ThinkBook 14/16 G7+ ASP models come with pressure pads that were not
# Lenovo IdeaPad Duet 5 12IAU7 (82TQ) # correctly declared as such.
# Lenovo XiaoXinDuet IAU7 (82TQ) [Lenovo ThinkBook G7+ ASP touchpad]
# Known names: MatchName=*GXTP5100*
# "DOKING Duet 5 USB Composite Device" in 82TQ MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook*G7+ASP*:*
[Lenovo Detachable Keyboard (17EF:613A)] MatchUdevType=touchpad
MatchUdevType=keyboard ModelPressurePad=1
MatchBus=usb
MatchVendor=0x17EF
MatchProduct=0x613A
AttrKeyboardIntegration=internal
# Found in: # The ThinkBook 14/16 G6+ IMH also has a similar issue as the G7+ mentioned above.
# Lenovo IdeaPad Duet3 11IAN8 (82XK) [Lenovo ThinkBook G6+ IMH]
# Known names: MatchName=*GXTP5100*
# "SINO WEALTH USB Composite Device Keyboard" in 82XK MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook*G6+IMH*:*
[Lenovo Detachable Keyboard (17EF:6169)] MatchUdevType=touchpad
MatchUdevType=keyboard ModelPressurePad=1
MatchBus=usb
MatchVendor=0x17EF
MatchProduct=0x6169
AttrKeyboardIntegration=internal
# Found in: # Lenovo Yoga Slim 7i Carbon sends bogus ABS_MT_TOOL_TYPE MT_TOOL_PALM events
# Lenovo MIIX 300-10IBY (80NR) [Lenovo Yoga Slim 7i Carbon]
# Lenovo MIIX 310-10ICR (80SG) MatchName=* Touchpad
# Lenovo MIIX 510-12ISK (80U1) MatchDMIModalias=dmi:*:svnLENOVO:*pvrYogaSlim7Carbon13IAP7:*
# Lenovo MIIX 510-12IKB (80XE) AttrEventCode=-ABS_MT_TOOL_TYPE
# As non detachable in:
# DEXP NAVIS M100 # The ThinkPad X9 15 Gen 1 Forcepad touchpad is not
# Insyde B14 # detected as a pressure pad
# Known names: [Lenovo ThinkPad X9 15 Gen 1]
# "SINO WEALTH USB Composite Device" in 80NR MatchName=*GXTP5100*
# "SIPODEV USB Composite Device" in 80SG MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX9-15Gen1*:*
# "SIPODEV Lenovo HID Device" in 80U1, 80XE, NAVIS M100 and B14 MatchUdevType=touchpad
[Lenovo Detachable Keyboard (258A:1015)] ModelPressurePad=1
MatchUdevType=keyboard
MatchBus=usb # The ThinkBook 14/16 G7+ IAH also has a similar issue as the ASP mentioned above.
MatchVendor=0x258A [Lenovo ThinkBook G7+ IAH touchpad]
MatchProduct=0x1015 MatchName=*GXTP5100*
AttrKeyboardIntegration=internal MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook*G7+IAH*:*
MatchUdevType=touchpad
ModelPressurePad=1

View file

@ -2,5 +2,5 @@
[LG gram 14 2023 Touchpad] [LG gram 14 2023 Touchpad]
MatchName=* Touchpad MatchName=* Touchpad
MatchDMIModalias=dmi:*:svnLGElectronics:pn14Z90R-G.AA79G:* MatchDMIModalias=dmi:*svnLGElectronics:pn14Z90R-G.AA79G:*
ModelTouchpadPhantomClicks=1 ModelTouchpadPhantomClicks=1

View file

@ -1,15 +1,11 @@
# Do not edit this file, it will be overwritten on update # Do not edit this file, it will be overwritten on update
[Minisforum V3 Detachable Keyboard] [Minisforum V3 volume keys]
MatchUdevType=keyboard MatchName=AT Translated Set 2 keyboard
MatchBus=usb MatchDMIModalias=dmi:*svnMicroComputer(HK)TechLimited:pnV3:*
MatchVendor=0x05AF ModelTabletModeNoSuspend=1
MatchProduct=0x326A
AttrKeyboardIntegration=internal
[Minisforum V3 SE Detachable Keyboard] [Minisforum V3 touchpad dwt]
MatchUdevType=keyboard MatchName=USB Keyboard
MatchBus=usb MatchDMIModalias=dmi:*svnMicroComputer(HK)TechLimited:pnV3:*
MatchVendor=0x1C4F
MatchProduct=0x00B8
AttrKeyboardIntegration=internal AttrKeyboardIntegration=internal

View file

@ -1,5 +1,3 @@
# Do not edit this file, it will be overwritten on update
[PineBook Pro Keyboard] [PineBook Pro Keyboard]
MatchVendor=0x258A MatchVendor=0x258A
MatchProduct=0x001E MatchProduct=0x001E

View file

@ -1,11 +0,0 @@
# Do not edit this file, it will be overwritten on update
# Most Pixart Touchpad (093A:0255) devices don't have buttons so we remove right
# button in 30-vendor-pixart.quirks, but this one does.
[Positivo VAIO FE15 Touchpad]
MatchBus=i2c
MatchVendor=0x093A
MatchProduct=0x0255
MatchUdevType=touchpad
MatchDMIModalias=dmi:*:svnPositivoBahia-VAIO:pnVJFE59F11X-*:*
AttrEventCode=+BTN_RIGHT

View file

@ -3,5 +3,5 @@
[Sony Vaio VPCEG Series Touchpad Pressure Override] [Sony Vaio VPCEG Series Touchpad Pressure Override]
MatchUdevType=touchpad MatchUdevType=touchpad
MatchName=*SynPS/2 Synaptics TouchPad MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnSonyCorporation:pnVPCEG*:* MatchDMIModalias=dmi:*svnSonyCorporation:pnVPCEG*
AttrPressureRange=45:40 AttrPressureRange=45:40

View file

@ -1,8 +1,6 @@
# Do not edit this file, it will be overwritten on update
[Star Labs Touchpad] [Star Labs Touchpad]
MatchName=*Touchpad MatchName=*Touchpad
MatchUdevType=touchpad MatchUdevType=touchpad
MatchDMIModalias=dmi:*:svnStarLabs:* MatchDMIModalias=dmi:*svnStarLabs:*
AttrEventCode=-BTN_RIGHT AttrEventCode=-BTN_RIGHT
AttrInputProp=+INPUT_PROP_BUTTONPAD AttrInputProp=+INPUT_PROP_BUTTONPAD

View file

@ -2,20 +2,20 @@
[System76 Bonobo Professional] [System76 Bonobo Professional]
MatchName=SynPS/2 Synaptics TouchPad MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnSystem76:*:pvrbonp5:* MatchDMIModalias=dmi:*svnSystem76*pvrbonp5*
ModelSystem76Bonobo=1 ModelSystem76Bonobo=1
[System76 Clevo] [System76 Clevo]
MatchName=SynPS/2 Synaptics TouchPad MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:pnW740SU:*:rnW740SU:* MatchDMIModalias=dmi:*pnW740SU*rnW740SU*
ModelClevoW740SU=1 ModelClevoW740SU=1
[System76 Galago Ultra Pro] [System76 Galago Ultra Pro]
MatchName=SynPS/2 Synaptics TouchPad MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnSystem76:*:pvrgalu1:* MatchDMIModalias=dmi:*svnSystem76*pvrgalu1*
ModelSystem76Galago=1 ModelSystem76Galago=1
[System76 Kudu Professional] [System76 Kudu Professional]
MatchName=SynPS/2 Synaptics TouchPad MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnSystem76:*:pvrkudp1:* MatchDMIModalias=dmi:*svnSystem76*pvrkudp1*
ModelSystem76Kudu=1 ModelSystem76Kudu=1

View file

@ -0,0 +1,5 @@
[TongFang GX4 (X4SP4NAL) Touchpad]
MatchName=UNIW0001:00 093A:0255 Touchpad
MatchUdevType=touchpad
MatchDMIModalias=dmi:*svnAiStone:pnX4SP4NAL:*
AttrEventCode=-BTN_RIGHT

View file

@ -1,7 +1,4 @@
# Do not edit this file, it will be overwritten on update
# Can't find no Satellite with all uppercase in DMI.
[Toshiba Satellite L855-14E Touchpad] [Toshiba Satellite L855-14E Touchpad]
MatchName=*SynPS/2 Synaptics TouchPad MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnTOSHIBA:pnSATELLITEL855:* MatchDMIModalias=dmi:*svnTOSHIBA:pnSATELLITEL855*
AttrPressureRange=45:44 AttrPressureRange=45:44

View file

@ -0,0 +1,5 @@
[Positivo-Vaio Touchpad]
MatchName=SYNA3602:00 0911:5288 Touchpad
MatchDMIModalias=dmi:*svnPositivoBahia-VAIO:pnVJ[FP][EWX]*
MatchUdevType=touchpad
AttrEventCode=+BTN_RIGHT

View file

@ -1,8 +0,0 @@
# Do not edit this file, it will be overwritten on update
# Clickpad that announces BTN_RIGHT
[Wareus B15 Touchpad]
MatchName=HTIX5288:00 36B6:C001 Touchpad
MatchUdevType=touchpad
MatchDMIModalias=dmi:*svnWareus:*pnB15*
AttrEventCode=-BTN_RIGHT

View file

@ -82,10 +82,10 @@ files will not be used.
Debugging Debugging
--------- ---------
When modifying a data file, use the `libinput quirks list` tool to When modifying a data file, use the `libinput list-quirks` tool to
verify the changes. The tool can be pointed at the data directory to verify the changes. The tool can be pointed at the data directory to
analyse, use `--verbose` to get more info. For example: analyse, use `--verbose` to get more info. For example:
``` ```
libinput quirks list --data-dir /path/to/git/repo/quirks/ --verbose /dev/input/event0 libinput list-quirks --data-dir /path/to/git/repo/quirks/ --verbose /dev/input/event0
``` ```

View file

@ -36,7 +36,6 @@
static inline bool static inline bool
builddir_lookup(char **builddir) builddir_lookup(char **builddir)
{ {
#ifdef IS_DEBUG_BUILD
char execdir[PATH_MAX]; char execdir[PATH_MAX];
char *pathsep; char *pathsep;
ssize_t nread; ssize_t nread;
@ -66,7 +65,4 @@ builddir_lookup(char **builddir)
*builddir = safe_strdup(execdir); *builddir = safe_strdup(execdir);
return true; return true;
#else
return false;
#endif
} }

View file

@ -33,7 +33,7 @@
static void static void
fallback_keyboard_notify_key(struct fallback_dispatch *dispatch, fallback_keyboard_notify_key(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
usec_t time, uint64_t time,
evdev_usage_t usage, evdev_usage_t usage,
enum libinput_key_state state) enum libinput_key_state state)
{ {
@ -53,7 +53,7 @@ fallback_keyboard_notify_key(struct fallback_dispatch *dispatch,
static void static void
fallback_lid_notify_toggle(struct fallback_dispatch *dispatch, fallback_lid_notify_toggle(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
usec_t time) uint64_t time)
{ {
if (dispatch->lid.is_closed ^ dispatch->lid.is_closed_client_state) { if (dispatch->lid.is_closed ^ dispatch->lid.is_closed_client_state) {
switch_notify_toggle(&device->base, switch_notify_toggle(&device->base,
@ -67,7 +67,7 @@ fallback_lid_notify_toggle(struct fallback_dispatch *dispatch,
void void
fallback_notify_physical_button(struct fallback_dispatch *dispatch, fallback_notify_physical_button(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
usec_t time, uint64_t time,
evdev_usage_t button, evdev_usage_t button,
enum libinput_button_state state) enum libinput_button_state state)
{ {
@ -82,23 +82,20 @@ fallback_interface_get_switch_state(struct evdev_dispatch *evdev_dispatch,
switch (sw) { switch (sw) {
case LIBINPUT_SWITCH_TABLET_MODE: case LIBINPUT_SWITCH_TABLET_MODE:
return dispatch->tablet_mode.sw.state ? LIBINPUT_SWITCH_STATE_ON
: LIBINPUT_SWITCH_STATE_OFF;
break;
case LIBINPUT_SWITCH_KEYPAD_SLIDE:
return dispatch->keypad_slide.sw.state ? LIBINPUT_SWITCH_STATE_ON
: LIBINPUT_SWITCH_STATE_OFF;
break; break;
default: default:
/* Internal function only, so we can abort here */ /* Internal function only, so we can abort here */
abort(); abort();
} }
return dispatch->tablet_mode.sw.state ? LIBINPUT_SWITCH_STATE_ON
: LIBINPUT_SWITCH_STATE_OFF;
} }
static inline bool static inline bool
post_button_scroll(struct evdev_device *device, post_button_scroll(struct evdev_device *device,
struct device_float_coords raw, struct device_float_coords raw,
usec_t time) uint64_t time)
{ {
if (device->scroll.method != LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN) if (device->scroll.method != LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN)
return false; return false;
@ -174,7 +171,7 @@ fallback_rotate_relative(struct fallback_dispatch *dispatch,
static void static void
fallback_flush_relative_motion(struct fallback_dispatch *dispatch, fallback_flush_relative_motion(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
usec_t time) uint64_t time)
{ {
struct libinput_device *base = &device->base; struct libinput_device *base = &device->base;
struct normalized_coords accel; struct normalized_coords accel;
@ -208,7 +205,7 @@ fallback_flush_relative_motion(struct fallback_dispatch *dispatch,
static void static void
fallback_flush_wheels(struct fallback_dispatch *dispatch, fallback_flush_wheels(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
usec_t time) uint64_t time)
{ {
if (!libinput_device_has_capability(&device->base, LIBINPUT_DEVICE_CAP_POINTER)) if (!libinput_device_has_capability(&device->base, LIBINPUT_DEVICE_CAP_POINTER))
return; return;
@ -325,7 +322,7 @@ fallback_flush_wheels(struct fallback_dispatch *dispatch,
static void static void
fallback_flush_absolute_motion(struct fallback_dispatch *dispatch, fallback_flush_absolute_motion(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
usec_t time) uint64_t time)
{ {
struct libinput_device *base = &device->base; struct libinput_device *base = &device->base;
struct device_coords point; struct device_coords point;
@ -343,7 +340,7 @@ static bool
fallback_flush_mt_down(struct fallback_dispatch *dispatch, fallback_flush_mt_down(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
int slot_idx, int slot_idx,
usec_t time) uint64_t time)
{ {
struct libinput_device *base = &device->base; struct libinput_device *base = &device->base;
struct libinput_seat *seat = base->seat; struct libinput_seat *seat = base->seat;
@ -382,7 +379,7 @@ static bool
fallback_flush_mt_motion(struct fallback_dispatch *dispatch, fallback_flush_mt_motion(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
int slot_idx, int slot_idx,
usec_t time) uint64_t time)
{ {
struct libinput_device *base = &device->base; struct libinput_device *base = &device->base;
struct device_coords point; struct device_coords point;
@ -412,7 +409,7 @@ static bool
fallback_flush_mt_up(struct fallback_dispatch *dispatch, fallback_flush_mt_up(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
int slot_idx, int slot_idx,
usec_t time) uint64_t time)
{ {
struct libinput_device *base = &device->base; struct libinput_device *base = &device->base;
struct libinput_seat *seat = base->seat; struct libinput_seat *seat = base->seat;
@ -440,7 +437,7 @@ static bool
fallback_flush_mt_cancel(struct fallback_dispatch *dispatch, fallback_flush_mt_cancel(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
int slot_idx, int slot_idx,
usec_t time) uint64_t time)
{ {
struct libinput_device *base = &device->base; struct libinput_device *base = &device->base;
struct libinput_seat *seat = base->seat; struct libinput_seat *seat = base->seat;
@ -467,7 +464,7 @@ fallback_flush_mt_cancel(struct fallback_dispatch *dispatch,
static bool static bool
fallback_flush_st_down(struct fallback_dispatch *dispatch, fallback_flush_st_down(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
usec_t time) uint64_t time)
{ {
struct libinput_device *base = &device->base; struct libinput_device *base = &device->base;
struct libinput_seat *seat = base->seat; struct libinput_seat *seat = base->seat;
@ -503,7 +500,7 @@ fallback_flush_st_down(struct fallback_dispatch *dispatch,
static bool static bool
fallback_flush_st_motion(struct fallback_dispatch *dispatch, fallback_flush_st_motion(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
usec_t time) uint64_t time)
{ {
struct libinput_device *base = &device->base; struct libinput_device *base = &device->base;
struct device_coords point; struct device_coords point;
@ -525,7 +522,7 @@ fallback_flush_st_motion(struct fallback_dispatch *dispatch,
static bool static bool
fallback_flush_st_up(struct fallback_dispatch *dispatch, fallback_flush_st_up(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
usec_t time) uint64_t time)
{ {
struct libinput_device *base = &device->base; struct libinput_device *base = &device->base;
struct libinput_seat *seat = base->seat; struct libinput_seat *seat = base->seat;
@ -550,7 +547,7 @@ fallback_flush_st_up(struct fallback_dispatch *dispatch,
static bool static bool
fallback_flush_st_cancel(struct fallback_dispatch *dispatch, fallback_flush_st_cancel(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
usec_t time) uint64_t time)
{ {
struct libinput_device *base = &device->base; struct libinput_device *base = &device->base;
struct libinput_seat *seat = base->seat; struct libinput_seat *seat = base->seat;
@ -575,7 +572,7 @@ fallback_flush_st_cancel(struct fallback_dispatch *dispatch,
static void static void
fallback_process_touch_button(struct fallback_dispatch *dispatch, fallback_process_touch_button(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
usec_t time, uint64_t time,
int value) int value)
{ {
dispatch->pending_event |= dispatch->pending_event |=
@ -586,7 +583,7 @@ static inline void
fallback_process_key(struct fallback_dispatch *dispatch, fallback_process_key(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
struct evdev_event *e, struct evdev_event *e,
usec_t time) uint64_t time)
{ {
/* ignore kernel key repeat */ /* ignore kernel key repeat */
if (e->value == 2) if (e->value == 2)
@ -628,7 +625,7 @@ static void
fallback_process_touch(struct fallback_dispatch *dispatch, fallback_process_touch(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
struct evdev_event *e, struct evdev_event *e,
usec_t time) uint64_t time)
{ {
struct mt_slot *slot = &dispatch->mt.slots[dispatch->mt.slot]; struct mt_slot *slot = &dispatch->mt.slots[dispatch->mt.slot];
@ -729,7 +726,7 @@ fallback_process_absolute_motion(struct fallback_dispatch *dispatch,
} }
static void static void
fallback_lid_keyboard_event(usec_t time, struct libinput_event *event, void *data) fallback_lid_keyboard_event(uint64_t time, struct libinput_event *event, void *data)
{ {
struct fallback_dispatch *dispatch = fallback_dispatch(data); struct fallback_dispatch *dispatch = fallback_dispatch(data);
@ -744,8 +741,8 @@ fallback_lid_keyboard_event(usec_t time, struct libinput_event *event, void *dat
int rc; int rc;
struct input_event ev[2]; struct input_event ev[2];
ev[0] = input_event_init(usec_from_uint64_t(0), EV_SW, SW_LID, 0); ev[0] = input_event_init(0, EV_SW, SW_LID, 0);
ev[1] = input_event_init(usec_from_uint64_t(0), EV_SYN, SYN_REPORT, 0); ev[1] = input_event_init(0, EV_SYN, SYN_REPORT, 0);
rc = write(fd, ev, sizeof(ev)); rc = write(fd, ev, sizeof(ev));
@ -768,7 +765,7 @@ fallback_lid_keyboard_event(usec_t time, struct libinput_event *event, void *dat
static void static void
fallback_lid_toggle_keyboard_listener(struct fallback_dispatch *dispatch, fallback_lid_toggle_keyboard_listener(struct fallback_dispatch *dispatch,
struct evdev_paired_device *kbd, struct evdev_paired_keyboard *kbd,
bool is_closed) bool is_closed)
{ {
assert(kbd->device); assert(kbd->device);
@ -789,7 +786,7 @@ static void
fallback_lid_toggle_keyboard_listeners(struct fallback_dispatch *dispatch, fallback_lid_toggle_keyboard_listeners(struct fallback_dispatch *dispatch,
bool is_closed) bool is_closed)
{ {
struct evdev_paired_device *kbd; struct evdev_paired_keyboard *kbd;
list_for_each(kbd, &dispatch->lid.paired_keyboard_list, link) { list_for_each(kbd, &dispatch->lid.paired_keyboard_list, link) {
if (!kbd->device) if (!kbd->device)
@ -803,7 +800,7 @@ static inline void
fallback_process_switch(struct fallback_dispatch *dispatch, fallback_process_switch(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
struct evdev_event *e, struct evdev_event *e,
usec_t time) uint64_t time)
{ {
enum libinput_switch_state state; enum libinput_switch_state state;
bool is_closed; bool is_closed;
@ -836,20 +833,6 @@ fallback_process_switch(struct fallback_dispatch *dispatch,
LIBINPUT_SWITCH_TABLET_MODE, LIBINPUT_SWITCH_TABLET_MODE,
state); state);
break; break;
case EVDEV_SW_KEYPAD_SLIDE:
if (dispatch->keypad_slide.sw.state == e->value)
return;
dispatch->keypad_slide.sw.state = e->value;
if (e->value)
state = LIBINPUT_SWITCH_STATE_ON;
else
state = LIBINPUT_SWITCH_STATE_OFF;
switch_notify_toggle(&device->base,
time,
LIBINPUT_SWITCH_KEYPAD_SLIDE,
state);
break;
default: default:
break; break;
} }
@ -858,7 +841,7 @@ fallback_process_switch(struct fallback_dispatch *dispatch,
static inline bool static inline bool
fallback_reject_relative(struct evdev_device *device, fallback_reject_relative(struct evdev_device *device,
const struct evdev_event *e, const struct evdev_event *e,
usec_t time) uint64_t time)
{ {
switch (evdev_usage_enum(e->usage)) { switch (evdev_usage_enum(e->usage)) {
case EVDEV_REL_X: case EVDEV_REL_X:
@ -893,7 +876,7 @@ static inline void
fallback_process_relative(struct fallback_dispatch *dispatch, fallback_process_relative(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
struct evdev_event *e, struct evdev_event *e,
usec_t time) uint64_t time)
{ {
if (fallback_reject_relative(device, e, time)) if (fallback_reject_relative(device, e, time))
return; return;
@ -932,7 +915,7 @@ static inline void
fallback_process_absolute(struct fallback_dispatch *dispatch, fallback_process_absolute(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
struct evdev_event *e, struct evdev_event *e,
usec_t time) uint64_t time)
{ {
if (device->is_mt) { if (device->is_mt) {
fallback_process_touch(dispatch, device, e, time); fallback_process_touch(dispatch, device, e, time);
@ -976,7 +959,7 @@ fallback_arbitrate_touch(struct fallback_dispatch *dispatch, struct mt_slot *slo
static inline bool static inline bool
fallback_flush_mt_events(struct fallback_dispatch *dispatch, fallback_flush_mt_events(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
usec_t time) uint64_t time)
{ {
bool sent = false; bool sent = false;
@ -1047,7 +1030,7 @@ fallback_flush_mt_events(struct fallback_dispatch *dispatch,
static void static void
fallback_handle_state(struct fallback_dispatch *dispatch, fallback_handle_state(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
usec_t time) uint64_t time)
{ {
bool need_touch_frame = false; bool need_touch_frame = false;
@ -1115,7 +1098,7 @@ static void
fallback_interface_process_event(struct evdev_dispatch *evdev_dispatch, fallback_interface_process_event(struct evdev_dispatch *evdev_dispatch,
struct evdev_device *device, struct evdev_device *device,
struct evdev_event *event, struct evdev_event *event,
usec_t time) uint64_t time)
{ {
struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch); struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch);
static bool warned = false; static bool warned = false;
@ -1155,7 +1138,7 @@ static void
fallback_interface_process(struct evdev_dispatch *dispatch, fallback_interface_process(struct evdev_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
struct evdev_frame *frame, struct evdev_frame *frame,
usec_t time) uint64_t time)
{ {
size_t nevents; size_t nevents;
struct evdev_event *events = evdev_frame_get_events(frame, &nevents); struct evdev_event *events = evdev_frame_get_events(frame, &nevents);
@ -1169,7 +1152,7 @@ static void
cancel_touches(struct fallback_dispatch *dispatch, cancel_touches(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
const struct device_coord_rect *rect, const struct device_coord_rect *rect,
usec_t time) uint64_t time)
{ {
unsigned int idx; unsigned int idx;
bool need_frame = false; bool need_frame = false;
@ -1200,7 +1183,7 @@ cancel_touches(struct fallback_dispatch *dispatch,
static void static void
release_pressed_keys(struct fallback_dispatch *dispatch, release_pressed_keys(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
usec_t time) uint64_t time)
{ {
for (evdev_usage_t usage = evdev_usage_from(EVDEV_KEY_RESERVED); for (evdev_usage_t usage = evdev_usage_from(EVDEV_KEY_RESERVED);
evdev_usage_le(usage, EVDEV_KEY_MAX); evdev_usage_le(usage, EVDEV_KEY_MAX);
@ -1250,9 +1233,9 @@ fallback_return_to_neutral_state(struct fallback_dispatch *dispatch,
struct evdev_device *device) struct evdev_device *device)
{ {
struct libinput *libinput = evdev_libinput_context(device); struct libinput *libinput = evdev_libinput_context(device);
usec_t time = libinput_now(libinput); uint64_t time;
if (usec_is_zero(time)) if ((time = libinput_now(libinput)) == 0)
return; return;
cancel_touches(dispatch, device, NULL, time); cancel_touches(dispatch, device, NULL, time);
@ -1274,7 +1257,7 @@ static void
fallback_interface_remove(struct evdev_dispatch *evdev_dispatch) fallback_interface_remove(struct evdev_dispatch *evdev_dispatch)
{ {
struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch); struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch);
struct evdev_paired_device *kbd; struct evdev_paired_keyboard *kbd;
libinput_timer_cancel(&dispatch->debounce.timer); libinput_timer_cancel(&dispatch->debounce.timer);
libinput_timer_cancel(&dispatch->debounce.timer_short); libinput_timer_cancel(&dispatch->debounce.timer_short);
@ -1283,7 +1266,7 @@ fallback_interface_remove(struct evdev_dispatch *evdev_dispatch)
libinput_device_remove_event_listener(&dispatch->tablet_mode.other.listener); libinput_device_remove_event_listener(&dispatch->tablet_mode.other.listener);
list_for_each_safe(kbd, &dispatch->lid.paired_keyboard_list, link) { list_for_each_safe(kbd, &dispatch->lid.paired_keyboard_list, link) {
evdev_paired_device_destroy(kbd); evdev_paired_keyboard_destroy(kbd);
} }
} }
@ -1292,7 +1275,7 @@ fallback_interface_sync_initial_state(struct evdev_device *device,
struct evdev_dispatch *evdev_dispatch) struct evdev_dispatch *evdev_dispatch)
{ {
struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch); struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch);
usec_t time = libinput_now(evdev_libinput_context(device)); uint64_t time = libinput_now(evdev_libinput_context(device));
if (device->tags & EVDEV_TAG_LID_SWITCH) { if (device->tags & EVDEV_TAG_LID_SWITCH) {
struct libevdev *evdev = device->evdev; struct libevdev *evdev = device->evdev;
@ -1320,20 +1303,13 @@ fallback_interface_sync_initial_state(struct evdev_device *device,
LIBINPUT_SWITCH_TABLET_MODE, LIBINPUT_SWITCH_TABLET_MODE,
LIBINPUT_SWITCH_STATE_ON); LIBINPUT_SWITCH_STATE_ON);
} }
if (dispatch->keypad_slide.sw.state) {
switch_notify_toggle(&device->base,
time,
LIBINPUT_SWITCH_KEYPAD_SLIDE,
LIBINPUT_SWITCH_STATE_ON);
}
} }
static void static void
fallback_interface_update_rect(struct evdev_dispatch *evdev_dispatch, fallback_interface_update_rect(struct evdev_dispatch *evdev_dispatch,
struct evdev_device *device, struct evdev_device *device,
const struct phys_rect *phys_rect, const struct phys_rect *phys_rect,
usec_t time) uint64_t time)
{ {
struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch); struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch);
struct device_coord_rect rect; struct device_coord_rect rect;
@ -1352,7 +1328,7 @@ fallback_interface_toggle_touch(struct evdev_dispatch *evdev_dispatch,
struct evdev_device *device, struct evdev_device *device,
enum evdev_arbitration_state which, enum evdev_arbitration_state which,
const struct phys_rect *phys_rect, const struct phys_rect *phys_rect,
usec_t time) uint64_t time)
{ {
struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch); struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch);
struct device_coord_rect rect = { 0 }; struct device_coord_rect rect = { 0 };
@ -1371,7 +1347,7 @@ fallback_interface_toggle_touch(struct evdev_dispatch *evdev_dispatch,
* arbitration by just a little bit so that any touch in * arbitration by just a little bit so that any touch in
* event is caught as palm touch. */ * event is caught as palm touch. */
libinput_timer_set(&dispatch->arbitration.arbitration_timer, libinput_timer_set(&dispatch->arbitration.arbitration_timer,
usec_add_millis(time, 90)); time + ms2us(90));
state = "not-active"; state = "not-active";
break; break;
case ARBITRATION_IGNORE_RECT: case ARBITRATION_IGNORE_RECT:
@ -1412,7 +1388,7 @@ fallback_lid_pair_keyboard(struct evdev_device *lid_switch,
struct evdev_device *keyboard) struct evdev_device *keyboard)
{ {
struct fallback_dispatch *dispatch = fallback_dispatch(lid_switch->dispatch); struct fallback_dispatch *dispatch = fallback_dispatch(lid_switch->dispatch);
struct evdev_paired_device *kbd; struct evdev_paired_keyboard *kbd;
size_t count = 0; size_t count = 0;
if ((keyboard->tags & EVDEV_TAG_KEYBOARD) == 0 || if ((keyboard->tags & EVDEV_TAG_KEYBOARD) == 0 ||
@ -1465,7 +1441,9 @@ fallback_suspend(struct fallback_dispatch *dispatch, struct evdev_device *device
} }
static void static void
fallback_tablet_mode_switch_event(usec_t time, struct libinput_event *event, void *data) fallback_tablet_mode_switch_event(uint64_t time,
struct libinput_event *event,
void *data)
{ {
struct fallback_dispatch *dispatch = data; struct fallback_dispatch *dispatch = data;
struct evdev_device *device = dispatch->device; struct evdev_device *device = dispatch->device;
@ -1549,7 +1527,7 @@ fallback_interface_device_removed(struct evdev_device *device,
struct evdev_device *removed_device) struct evdev_device *removed_device)
{ {
struct fallback_dispatch *dispatch = fallback_dispatch(device->dispatch); struct fallback_dispatch *dispatch = fallback_dispatch(device->dispatch);
struct evdev_paired_device *kbd; struct evdev_paired_keyboard *kbd;
list_for_each_safe(kbd, &dispatch->lid.paired_keyboard_list, link) { list_for_each_safe(kbd, &dispatch->lid.paired_keyboard_list, link) {
if (!kbd->device) if (!kbd->device)
@ -1558,7 +1536,7 @@ fallback_interface_device_removed(struct evdev_device *device,
if (kbd->device != removed_device) if (kbd->device != removed_device)
continue; continue;
evdev_paired_device_destroy(kbd); evdev_paired_keyboard_destroy(kbd);
} }
if (removed_device == dispatch->tablet_mode.other.sw_device) { if (removed_device == dispatch->tablet_mode.other.sw_device) {
@ -1755,16 +1733,11 @@ fallback_dispatch_init_switch(struct fallback_dispatch *dispatch,
dispatch->tablet_mode.sw.state = val; dispatch->tablet_mode.sw.state = val;
} }
if (device->tags & EVDEV_TAG_KEYPAD_SLIDE_SWITCH) {
val = libevdev_get_event_value(device->evdev, EV_SW, SW_KEYPAD_SLIDE);
dispatch->keypad_slide.sw.state = val;
}
libinput_device_init_event_listener(&dispatch->tablet_mode.other.listener); libinput_device_init_event_listener(&dispatch->tablet_mode.other.listener);
} }
static void static void
fallback_arbitration_timeout(usec_t now, void *data) fallback_arbitration_timeout(uint64_t now, void *data)
{ {
struct fallback_dispatch *dispatch = data; struct fallback_dispatch *dispatch = data;

View file

@ -116,13 +116,6 @@ struct fallback_dispatch {
} other; } other;
} tablet_mode; } tablet_mode;
struct {
/* Switch */
struct {
int state;
} sw;
} keypad_slide;
/* Bitmask of pressed keys used to ignore initial release events from /* Bitmask of pressed keys used to ignore initial release events from
* the kernel. */ * the kernel. */
unsigned long hw_key_mask[NLONGS(KEY_CNT)]; unsigned long hw_key_mask[NLONGS(KEY_CNT)];
@ -220,11 +213,11 @@ get_key_down_count(struct evdev_device *device, evdev_usage_t usage)
} }
void void
fallback_debounce_handle_state(struct fallback_dispatch *dispatch, usec_t time); fallback_debounce_handle_state(struct fallback_dispatch *dispatch, uint64_t time);
void void
fallback_notify_physical_button(struct fallback_dispatch *dispatch, fallback_notify_physical_button(struct fallback_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
usec_t time, uint64_t time,
evdev_usage_t button, evdev_usage_t button,
enum libinput_button_state state); enum libinput_button_state state);

View file

@ -139,7 +139,6 @@ enum evdev_usage {
EVDEV_SW_LID = _evbit(EV_SW, SW_LID), EVDEV_SW_LID = _evbit(EV_SW, SW_LID),
EVDEV_SW_TABLET_MODE = _evbit(EV_SW, SW_TABLET_MODE), EVDEV_SW_TABLET_MODE = _evbit(EV_SW, SW_TABLET_MODE),
EVDEV_SW_KEYPAD_SLIDE = _evbit(EV_SW, SW_KEYPAD_SLIDE),
EVDEV_SW_MAX = _evbit(EV_SW, SW_MAX), EVDEV_SW_MAX = _evbit(EV_SW, SW_MAX),
EVDEV_MSC_SCAN = _evbit(EV_MSC, MSC_SCAN), EVDEV_MSC_SCAN = _evbit(EV_MSC, MSC_SCAN),
@ -249,7 +248,6 @@ evdev_usage_name(evdev_usage_t usage)
CASE_RETURN_STRING(EVDEV_SW_LID); CASE_RETURN_STRING(EVDEV_SW_LID);
CASE_RETURN_STRING(EVDEV_SW_TABLET_MODE); CASE_RETURN_STRING(EVDEV_SW_TABLET_MODE);
CASE_RETURN_STRING(EVDEV_SW_KEYPAD_SLIDE);
CASE_RETURN_STRING(EVDEV_SW_MAX); CASE_RETURN_STRING(EVDEV_SW_MAX);
CASE_RETURN_STRING(EVDEV_MSC_SCAN); CASE_RETURN_STRING(EVDEV_MSC_SCAN);
@ -332,9 +330,9 @@ evdev_usage_is_button(evdev_usage_t usage)
case EVDEV_BTN_TOOL_FINGER: case EVDEV_BTN_TOOL_FINGER:
case EVDEV_BTN_TOUCH: case EVDEV_BTN_TOUCH:
return false; return false;
case EVDEV_BTN_STYLUS: case BTN_STYLUS:
case EVDEV_BTN_STYLUS2: case BTN_STYLUS2:
case EVDEV_BTN_STYLUS3: case BTN_STYLUS3:
return true; return true;
case EVDEV_BTN_MISC ... EVDEV_BTN_DIGI - 1: case EVDEV_BTN_MISC ... EVDEV_BTN_DIGI - 1:
case EVDEV_BTN_WHEEL ... EVDEV_BTN_GEAR_UP: case EVDEV_BTN_WHEEL ... EVDEV_BTN_GEAR_UP:
@ -394,9 +392,9 @@ evdev_event_get_code_name(const struct evdev_event *e)
} }
static inline struct input_event static inline struct input_event
evdev_event_to_input_event(const struct evdev_event *e, usec_t time) evdev_event_to_input_event(const struct evdev_event *e, uint64_t time)
{ {
struct timeval tv = usec_to_timeval(time); struct timeval tv = us2tv(time);
return (struct input_event){ return (struct input_event){
.type = evdev_event_type(e), .type = evdev_event_type(e),
.code = evdev_event_code(e), .code = evdev_event_code(e),
@ -407,7 +405,7 @@ evdev_event_to_input_event(const struct evdev_event *e, usec_t time)
} }
static inline struct evdev_event static inline struct evdev_event
evdev_event_from_input_event(const struct input_event *e, usec_t *time) evdev_event_from_input_event(const struct input_event *e, uint64_t *time)
{ {
if (time) if (time)
*time = input_event_time(e); *time = input_event_time(e);
@ -434,7 +432,7 @@ struct evdev_frame {
int refcount; int refcount;
size_t max_size; size_t max_size;
size_t count; size_t count;
usec_t time; uint64_t time;
struct evdev_event events[]; struct evdev_event events[];
}; };
@ -487,12 +485,12 @@ evdev_frame_get_events(struct evdev_frame *frame, size_t *nevents)
* Set the timestamp for all events in this event frame. * Set the timestamp for all events in this event frame.
*/ */
static inline void static inline void
evdev_frame_set_time(struct evdev_frame *frame, usec_t time) evdev_frame_set_time(struct evdev_frame *frame, uint64_t time)
{ {
frame->time = time; frame->time = time;
} }
static inline usec_t static inline uint64_t
evdev_frame_get_time(const struct evdev_frame *frame) evdev_frame_get_time(const struct evdev_frame *frame)
{ {
return frame->time; return frame->time;
@ -550,12 +548,10 @@ evdev_frame_append(struct evdev_frame *frame,
size_t nevents) size_t nevents)
{ {
assert(nevents > 0); assert(nevents > 0);
int syn_report_value = 0;
for (size_t i = 0; i < nevents; i++) { for (size_t i = 0; i < nevents; i++) {
if (evdev_usage_eq(events[i].usage, EVDEV_SYN_REPORT)) { if (evdev_usage_eq(events[i].usage, EVDEV_SYN_REPORT)) {
nevents = i; nevents = i;
syn_report_value = events[i].value;
break; break;
} }
} }
@ -570,24 +566,14 @@ evdev_frame_append(struct evdev_frame *frame,
frame->count += nevents; frame->count += nevents;
} }
frame->events[frame->count - 1] = (struct evdev_event){
.usage = evdev_usage_from_uint32_t(EVDEV_SYN_REPORT),
.value = syn_report_value,
};
return 0; return 0;
} }
static inline int static inline int
evdev_frame_append_one(struct evdev_frame *frame, evdev_usage_t usage, int32_t value) evdev_frame_append_one(struct evdev_frame *frame, evdev_usage_t usage, int32_t value)
{ {
if (evdev_usage_eq(usage, EVDEV_SYN_REPORT)) { if (evdev_usage_eq(usage, EVDEV_SYN_REPORT))
frame->events[frame->count - 1] = (struct evdev_event){
.usage = evdev_usage_from_uint32_t(EVDEV_SYN_REPORT),
.value = value,
};
return 0; return 0;
}
if (frame->count >= frame->max_size) if (frame->count >= frame->max_size)
return -ENOMEM; return -ENOMEM;
@ -604,7 +590,7 @@ evdev_frame_append_input_event(struct evdev_frame *frame,
{ {
struct evdev_event e = evdev_event_from_input_event(event, NULL); struct evdev_event e = evdev_event_from_input_event(event, NULL);
if (evdev_usage_as_uint32_t(e.usage) == EVDEV_SYN_REPORT) { if (evdev_usage_as_uint32_t(e.usage) == EVDEV_SYN_REPORT) {
usec_t time = input_event_time(event); uint64_t time = input_event_time(event);
evdev_frame_set_time(frame, time); evdev_frame_set_time(frame, time);
} }
return evdev_frame_append(frame, &e, 1); return evdev_frame_append(frame, &e, 1);

Some files were not shown because too many files have changed in this diff Show more