mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-24 12:30:47 +01:00
Compare commits
18 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
042c5e6fd9 | ||
|
|
7b2e8df143 | ||
|
|
7522cb9bae | ||
|
|
f20f4c54a2 | ||
|
|
edc25c071a | ||
|
|
421fe9457e | ||
|
|
448e18a7d6 | ||
|
|
7a9b757d7d | ||
|
|
baf1ceca88 | ||
|
|
83d89dde5d | ||
|
|
58fe6f387f | ||
|
|
b5b2d92ead | ||
|
|
e3f4afccac | ||
|
|
f2bf1d9aef | ||
|
|
11063aa28b | ||
|
|
5bf134e77b | ||
|
|
b14894e794 | ||
|
|
41d0caf333 |
272 changed files with 2416 additions and 5559 deletions
|
|
@ -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"
|
||||||
|
|
||||||
|
|
||||||
#################################################################
|
#################################################################
|
||||||
# #
|
# #
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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 |
|
|
@ -87,7 +87,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>`_.
|
||||||
|
|
|
||||||
|
|
@ -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()"]
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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>`,
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
||||||
|
|
@ -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.
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
@ -359,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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -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.
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -365,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:
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ 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.c``.
|
read the implementation of the hysteresis in ``src/evdev.c``.
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
||||||
+-------------+------------+---------------+------+
|
+-------------+------------+---------------+------+
|
||||||
|
|
|
||||||
27
meson.build
27
meson.build
|
|
@ -1,5 +1,5 @@
|
||||||
project('libinput', 'c',
|
project('libinput', 'c',
|
||||||
version : '1.31.0',
|
version : '1.30.2',
|
||||||
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',
|
||||||
|
|
|
||||||
|
|
@ -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)
|
|
||||||
|
|
@ -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')
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -2,62 +2,9 @@
|
||||||
|
|
||||||
# "GXTP5100 Touchpad": pressure touchpad mostly used in Lenovo laptops.
|
# "GXTP5100 Touchpad": pressure touchpad mostly used in Lenovo laptops.
|
||||||
# Match vid and pid as it can have other names.
|
# Match vid and pid as it can have other names.
|
||||||
[Goodix Haptic Touchpad (27C6:01E7)]
|
[Lenovo Haptic Touchpad (Goodix)]
|
||||||
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
|
MatchBus=i2c
|
||||||
MatchVendor=0x27C6
|
MatchVendor=0x27C6
|
||||||
MatchProduct=0x01E8
|
MatchProduct=0x01E8
|
||||||
MatchUdevType=touchpad
|
MatchUdevType=touchpad
|
||||||
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
ModelPressurePad=1
|
||||||
|
|
||||||
# "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
|
|
||||||
|
|
||||||
# "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
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
47
quirks/30-vendor-ibm.quirks
Normal file
47
quirks/30-vendor-ibm.quirks
Normal 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
|
||||||
|
|
@ -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
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -7,22 +7,21 @@ MatchVendor=0x0002
|
||||||
MatchProduct=0x0007
|
MatchProduct=0x0007
|
||||||
ModelSynapticsSerialTouchpad=1
|
ModelSynapticsSerialTouchpad=1
|
||||||
|
|
||||||
# "SYNA2B31:00 06CB:CE37 Touchpad": pressure touchpad used in Lenovo laptops.
|
|
||||||
# also known as
|
|
||||||
# MSFT0001:00 06CB:CE37
|
|
||||||
# MSFT0001:01 06CB:CE37
|
|
||||||
# PNP0C50:01 06CB:CE37
|
|
||||||
[Synaptics 06CB:CE37 Touchpad]
|
|
||||||
MatchBus=i2c
|
|
||||||
MatchVendor=0x06CB
|
|
||||||
MatchProduct=0xCE37
|
|
||||||
MatchUdevType=touchpad
|
|
||||||
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
|
||||||
|
|
||||||
# "SYNA3580:00 06CB:CFD2 Touchpad": pressure touchpad mostly used in HP laptops.
|
# "SYNA3580:00 06CB:CFD2 Touchpad": pressure touchpad mostly used in HP laptops.
|
||||||
[Synaptics 06CB:CFD2 Touchpad]
|
[Synaptics 06CB:CFD2 Touchpad]
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchVendor=0x06CB
|
MatchVendor=0x06CB
|
||||||
MatchProduct=0xCFD2
|
MatchProduct=0xCFD2
|
||||||
MatchUdevType=touchpad
|
MatchUdevType=touchpad
|
||||||
AttrInputProp=+INPUT_PROP_PRESSUREPAD
|
ModelPressurePad=1
|
||||||
|
|
||||||
|
# SYNA3602:00 0911:5288 touchpad, clickpad pretending it has a right button.
|
||||||
|
# Integrated into several systems, including
|
||||||
|
# Purism Librem 14v1
|
||||||
|
# Prestigio Smartbook 141 C2
|
||||||
|
# StarLite Mk II
|
||||||
|
# Iota IOTA2320
|
||||||
|
[Synaptics 0911:5288 Touchpad]
|
||||||
|
MatchUdevType=touchpad
|
||||||
|
MatchName=* 0911:5288 Touchpad
|
||||||
|
AttrEventCode=-BTN_RIGHT
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
9
quirks/30-vendor-uniwill.quirks
Normal file
9
quirks/30-vendor-uniwill.quirks
Normal 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
|
||||||
|
|
@ -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
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
17
quirks/50-system-chicony.quirks
Normal file
17
quirks/50-system-chicony.quirks
Normal 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
|
||||||
9
quirks/50-system-chuwi.quirks
Normal file
9
quirks/50-system-chuwi.quirks
Normal 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
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
# 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]
|
[Gigabyte Aorus15BKF keyboard]
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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,293 @@ 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
|
||||||
|
|
||||||
|
# "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
|
||||||
|
ModelPressurePad=1
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
# Do not edit this file, it will be overwritten on update
|
# Do not edit this file, it will be overwritten on update
|
||||||
|
|
||||||
[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
|
||||||
|
|
|
||||||
5
quirks/50-system-tongfang.quirks
Normal file
5
quirks/50-system-tongfang.quirks
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
[TongFang GX4 (X4SP4NAL) Touchpad]
|
||||||
|
MatchName=UNIW0001:00 093A:0255 Touchpad
|
||||||
|
MatchUdevType=touchpad
|
||||||
|
MatchDMIModalias=dmi:*svnAiStone:pnX4SP4NAL:*
|
||||||
|
AttrEventCode=-BTN_RIGHT
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
5
quirks/50-system-vaio.quirks
Normal file
5
quirks/50-system-vaio.quirks
Normal 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
|
||||||
|
|
@ -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
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
#include "evdev.h"
|
#include "evdev.h"
|
||||||
|
|
||||||
#define MIDDLEBUTTON_TIMEOUT usec_from_millis(50)
|
#define MIDDLEBUTTON_TIMEOUT ms2us(50)
|
||||||
|
|
||||||
/*****************************************
|
/*****************************************
|
||||||
* BEFORE YOU EDIT THIS FILE, look at the state diagram in
|
* BEFORE YOU EDIT THIS FILE, look at the state diagram in
|
||||||
|
|
@ -88,10 +88,9 @@ middlebutton_state_error(struct evdev_device *device,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
middlebutton_timer_set(struct evdev_device *device, usec_t now)
|
middlebutton_timer_set(struct evdev_device *device, uint64_t now)
|
||||||
{
|
{
|
||||||
libinput_timer_set(&device->middlebutton.timer,
|
libinput_timer_set(&device->middlebutton.timer, now + MIDDLEBUTTON_TIMEOUT);
|
||||||
usec_add(now, MIDDLEBUTTON_TIMEOUT));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -103,7 +102,7 @@ middlebutton_timer_cancel(struct evdev_device *device)
|
||||||
static inline void
|
static inline void
|
||||||
middlebutton_set_state(struct evdev_device *device,
|
middlebutton_set_state(struct evdev_device *device,
|
||||||
enum evdev_middlebutton_state state,
|
enum evdev_middlebutton_state state,
|
||||||
usec_t now)
|
uint64_t now)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case MIDDLEBUTTON_LEFT_DOWN:
|
case MIDDLEBUTTON_LEFT_DOWN:
|
||||||
|
|
@ -128,7 +127,7 @@ middlebutton_set_state(struct evdev_device *device,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
middlebutton_post_event(struct evdev_device *device,
|
middlebutton_post_event(struct evdev_device *device,
|
||||||
usec_t now,
|
uint64_t now,
|
||||||
evdev_usage_t button,
|
evdev_usage_t button,
|
||||||
enum libinput_button_state state)
|
enum libinput_button_state state)
|
||||||
{
|
{
|
||||||
|
|
@ -137,7 +136,7 @@ middlebutton_post_event(struct evdev_device *device,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evdev_middlebutton_idle_handle_event(struct evdev_device *device,
|
evdev_middlebutton_idle_handle_event(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum evdev_middlebutton_event event)
|
enum evdev_middlebutton_event event)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -163,7 +162,7 @@ evdev_middlebutton_idle_handle_event(struct evdev_device *device,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evdev_middlebutton_ldown_handle_event(struct evdev_device *device,
|
evdev_middlebutton_ldown_handle_event(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum evdev_middlebutton_event event)
|
enum evdev_middlebutton_event event)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -215,7 +214,7 @@ evdev_middlebutton_ldown_handle_event(struct evdev_device *device,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evdev_middlebutton_rdown_handle_event(struct evdev_device *device,
|
evdev_middlebutton_rdown_handle_event(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum evdev_middlebutton_event event)
|
enum evdev_middlebutton_event event)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -267,7 +266,7 @@ evdev_middlebutton_rdown_handle_event(struct evdev_device *device,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evdev_middlebutton_middle_handle_event(struct evdev_device *device,
|
evdev_middlebutton_middle_handle_event(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum evdev_middlebutton_event event)
|
enum evdev_middlebutton_event event)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -309,7 +308,7 @@ evdev_middlebutton_middle_handle_event(struct evdev_device *device,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evdev_middlebutton_lup_pending_handle_event(struct evdev_device *device,
|
evdev_middlebutton_lup_pending_handle_event(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum evdev_middlebutton_event event)
|
enum evdev_middlebutton_event event)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -345,7 +344,7 @@ evdev_middlebutton_lup_pending_handle_event(struct evdev_device *device,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evdev_middlebutton_rup_pending_handle_event(struct evdev_device *device,
|
evdev_middlebutton_rup_pending_handle_event(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum evdev_middlebutton_event event)
|
enum evdev_middlebutton_event event)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -381,7 +380,7 @@ evdev_middlebutton_rup_pending_handle_event(struct evdev_device *device,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evdev_middlebutton_passthrough_handle_event(struct evdev_device *device,
|
evdev_middlebutton_passthrough_handle_event(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum evdev_middlebutton_event event)
|
enum evdev_middlebutton_event event)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -404,7 +403,7 @@ evdev_middlebutton_passthrough_handle_event(struct evdev_device *device,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evdev_middlebutton_ignore_lr_handle_event(struct evdev_device *device,
|
evdev_middlebutton_ignore_lr_handle_event(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum evdev_middlebutton_event event)
|
enum evdev_middlebutton_event event)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -433,7 +432,7 @@ evdev_middlebutton_ignore_lr_handle_event(struct evdev_device *device,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evdev_middlebutton_ignore_l_handle_event(struct evdev_device *device,
|
evdev_middlebutton_ignore_l_handle_event(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum evdev_middlebutton_event event)
|
enum evdev_middlebutton_event event)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -458,7 +457,7 @@ evdev_middlebutton_ignore_l_handle_event(struct evdev_device *device,
|
||||||
}
|
}
|
||||||
static int
|
static int
|
||||||
evdev_middlebutton_ignore_r_handle_event(struct evdev_device *device,
|
evdev_middlebutton_ignore_r_handle_event(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum evdev_middlebutton_event event)
|
enum evdev_middlebutton_event event)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -484,7 +483,7 @@ evdev_middlebutton_ignore_r_handle_event(struct evdev_device *device,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
evdev_middlebutton_handle_event(struct evdev_device *device,
|
evdev_middlebutton_handle_event(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum evdev_middlebutton_event event)
|
enum evdev_middlebutton_event event)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
@ -554,7 +553,7 @@ evdev_middlebutton_apply_config(struct evdev_device *device)
|
||||||
|
|
||||||
bool
|
bool
|
||||||
evdev_middlebutton_filter_button(struct evdev_device *device,
|
evdev_middlebutton_filter_button(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)
|
||||||
{
|
{
|
||||||
|
|
@ -617,7 +616,7 @@ evdev_middlebutton_filter_button(struct evdev_device *device,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evdev_middlebutton_handle_timeout(usec_t now, void *data)
|
evdev_middlebutton_handle_timeout(uint64_t now, void *data)
|
||||||
{
|
{
|
||||||
struct evdev_device *device = evdev_device(data);
|
struct evdev_device *device = evdev_device(data);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@
|
||||||
#include "evdev-mt-touchpad.h"
|
#include "evdev-mt-touchpad.h"
|
||||||
#include "linux/input.h"
|
#include "linux/input.h"
|
||||||
|
|
||||||
#define DEFAULT_BUTTON_ENTER_TIMEOUT usec_from_millis(100)
|
#define DEFAULT_BUTTON_ENTER_TIMEOUT ms2us(100)
|
||||||
#define DEFAULT_BUTTON_LEAVE_TIMEOUT usec_from_millis(300)
|
#define DEFAULT_BUTTON_LEAVE_TIMEOUT ms2us(300)
|
||||||
|
|
||||||
/*****************************************
|
/*****************************************
|
||||||
* BEFORE YOU EDIT THIS FILE, look at the state diagram in
|
* BEFORE YOU EDIT THIS FILE, look at the state diagram in
|
||||||
|
|
@ -121,17 +121,15 @@ is_inside_top_middle_area(const struct tp_dispatch *tp, const struct tp_touch *t
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tp_button_set_enter_timer(struct tp_dispatch *tp, struct tp_touch *t, usec_t time)
|
tp_button_set_enter_timer(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
|
||||||
{
|
{
|
||||||
libinput_timer_set(&t->button.timer,
|
libinput_timer_set(&t->button.timer, time + DEFAULT_BUTTON_ENTER_TIMEOUT);
|
||||||
usec_add(time, DEFAULT_BUTTON_ENTER_TIMEOUT));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tp_button_set_leave_timer(struct tp_dispatch *tp, struct tp_touch *t, usec_t time)
|
tp_button_set_leave_timer(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
|
||||||
{
|
{
|
||||||
libinput_timer_set(&t->button.timer,
|
libinput_timer_set(&t->button.timer, time + DEFAULT_BUTTON_LEAVE_TIMEOUT);
|
||||||
usec_add(time, DEFAULT_BUTTON_LEAVE_TIMEOUT));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -143,7 +141,7 @@ tp_button_set_state(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum button_state new_state,
|
enum button_state new_state,
|
||||||
enum button_event event,
|
enum button_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
libinput_timer_cancel(&t->button.timer);
|
libinput_timer_cancel(&t->button.timer);
|
||||||
|
|
||||||
|
|
@ -178,7 +176,7 @@ static void
|
||||||
tp_button_none_handle_event(struct tp_dispatch *tp,
|
tp_button_none_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum button_event event,
|
enum button_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case BUTTON_EVENT_IN_BOTTOM_R:
|
case BUTTON_EVENT_IN_BOTTOM_R:
|
||||||
|
|
@ -208,7 +206,7 @@ static void
|
||||||
tp_button_area_handle_event(struct tp_dispatch *tp,
|
tp_button_area_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum button_event event,
|
enum button_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case BUTTON_EVENT_IN_BOTTOM_R:
|
case BUTTON_EVENT_IN_BOTTOM_R:
|
||||||
|
|
@ -235,22 +233,23 @@ tp_button_area_handle_event(struct tp_dispatch *tp,
|
||||||
* that triggered this call).
|
* that triggered this call).
|
||||||
*/
|
*/
|
||||||
static inline void
|
static inline void
|
||||||
tp_button_release_other_bottom_touches(struct tp_dispatch *tp, usec_t other_start_time)
|
tp_button_release_other_bottom_touches(struct tp_dispatch *tp,
|
||||||
|
uint64_t other_start_time)
|
||||||
{
|
{
|
||||||
struct tp_touch *t;
|
struct tp_touch *t;
|
||||||
|
|
||||||
tp_for_each_touch(tp, t) {
|
tp_for_each_touch(tp, t) {
|
||||||
usec_t tdelta;
|
uint64_t tdelta;
|
||||||
|
|
||||||
if (t->button.state != BUTTON_STATE_BOTTOM || t->button.has_moved)
|
if (t->button.state != BUTTON_STATE_BOTTOM || t->button.has_moved)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (usec_cmp(other_start_time, t->button.initial_time) > 0)
|
if (other_start_time > t->button.initial_time)
|
||||||
tdelta = usec_delta(other_start_time, t->button.initial_time);
|
tdelta = other_start_time - t->button.initial_time;
|
||||||
else
|
else
|
||||||
tdelta = usec_delta(t->button.initial_time, other_start_time);
|
tdelta = t->button.initial_time - other_start_time;
|
||||||
|
|
||||||
if (usec_cmp(tdelta, usec_from_millis(80)) > 0)
|
if (tdelta > ms2us(80))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
t->button.has_moved = true;
|
t->button.has_moved = true;
|
||||||
|
|
@ -261,7 +260,7 @@ static void
|
||||||
tp_button_bottom_handle_event(struct tp_dispatch *tp,
|
tp_button_bottom_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum button_event event,
|
enum button_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case BUTTON_EVENT_IN_BOTTOM_R:
|
case BUTTON_EVENT_IN_BOTTOM_R:
|
||||||
|
|
@ -297,7 +296,7 @@ static void
|
||||||
tp_button_top_handle_event(struct tp_dispatch *tp,
|
tp_button_top_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum button_event event,
|
enum button_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case BUTTON_EVENT_IN_BOTTOM_R:
|
case BUTTON_EVENT_IN_BOTTOM_R:
|
||||||
|
|
@ -328,7 +327,7 @@ static void
|
||||||
tp_button_top_new_handle_event(struct tp_dispatch *tp,
|
tp_button_top_new_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum button_event event,
|
enum button_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case BUTTON_EVENT_IN_BOTTOM_R:
|
case BUTTON_EVENT_IN_BOTTOM_R:
|
||||||
|
|
@ -363,7 +362,7 @@ static void
|
||||||
tp_button_top_to_ignore_handle_event(struct tp_dispatch *tp,
|
tp_button_top_to_ignore_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum button_event event,
|
enum button_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case BUTTON_EVENT_IN_TOP_R:
|
case BUTTON_EVENT_IN_TOP_R:
|
||||||
|
|
@ -395,7 +394,7 @@ static void
|
||||||
tp_button_ignore_handle_event(struct tp_dispatch *tp,
|
tp_button_ignore_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum button_event event,
|
enum button_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case BUTTON_EVENT_IN_BOTTOM_R:
|
case BUTTON_EVENT_IN_BOTTOM_R:
|
||||||
|
|
@ -423,7 +422,7 @@ static void
|
||||||
tp_button_handle_event(struct tp_dispatch *tp,
|
tp_button_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum button_event event,
|
enum button_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
enum button_state current = t->button.state;
|
enum button_state current = t->button.state;
|
||||||
|
|
||||||
|
|
@ -497,7 +496,7 @@ tp_button_check_for_movement(struct tp_dispatch *tp, struct tp_touch *t)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_button_handle_state(struct tp_dispatch *tp, usec_t time)
|
tp_button_handle_state(struct tp_dispatch *tp, uint64_t time)
|
||||||
{
|
{
|
||||||
struct tp_touch *t;
|
struct tp_touch *t;
|
||||||
|
|
||||||
|
|
@ -548,7 +547,7 @@ tp_button_handle_state(struct tp_dispatch *tp, usec_t time)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tp_button_handle_timeout(usec_t now, void *data)
|
tp_button_handle_timeout(uint64_t now, void *data)
|
||||||
{
|
{
|
||||||
struct tp_touch *t = data;
|
struct tp_touch *t = data;
|
||||||
|
|
||||||
|
|
@ -556,7 +555,7 @@ tp_button_handle_timeout(usec_t now, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_process_button(struct tp_dispatch *tp, const struct evdev_event *e, usec_t time)
|
tp_process_button(struct tp_dispatch *tp, const struct evdev_event *e, uint64_t time)
|
||||||
{
|
{
|
||||||
uint32_t mask = bit(evdev_usage_enum(e->usage) - EVDEV_BTN_LEFT);
|
uint32_t mask = bit(evdev_usage_enum(e->usage) - EVDEV_BTN_LEFT);
|
||||||
|
|
||||||
|
|
@ -578,7 +577,7 @@ tp_process_button(struct tp_dispatch *tp, const struct evdev_event *e, usec_t ti
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_release_all_buttons(struct tp_dispatch *tp, usec_t time)
|
tp_release_all_buttons(struct tp_dispatch *tp, uint64_t time)
|
||||||
{
|
{
|
||||||
if (tp->buttons.state) {
|
if (tp->buttons.state) {
|
||||||
tp->buttons.state = 0;
|
tp->buttons.state = 0;
|
||||||
|
|
@ -1033,7 +1032,7 @@ tp_remove_buttons(struct tp_dispatch *tp)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
tp_post_physical_buttons(struct tp_dispatch *tp, usec_t time)
|
tp_post_physical_buttons(struct tp_dispatch *tp, uint64_t time)
|
||||||
{
|
{
|
||||||
uint32_t current, old, button;
|
uint32_t current, old, button;
|
||||||
|
|
||||||
|
|
@ -1181,7 +1180,7 @@ out:
|
||||||
|
|
||||||
static int
|
static int
|
||||||
tp_notify_clickpadbutton(struct tp_dispatch *tp,
|
tp_notify_clickpadbutton(struct tp_dispatch *tp,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
evdev_usage_t button,
|
evdev_usage_t button,
|
||||||
uint32_t is_topbutton,
|
uint32_t is_topbutton,
|
||||||
enum libinput_button_state state)
|
enum libinput_button_state state)
|
||||||
|
|
@ -1228,7 +1227,7 @@ tp_notify_clickpadbutton(struct tp_dispatch *tp,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
tp_post_clickpadbutton_buttons(struct tp_dispatch *tp, usec_t time)
|
tp_post_clickpadbutton_buttons(struct tp_dispatch *tp, uint64_t time)
|
||||||
{
|
{
|
||||||
uint32_t current, old, is_top;
|
uint32_t current, old, is_top;
|
||||||
evdev_usage_t button;
|
evdev_usage_t button;
|
||||||
|
|
@ -1333,7 +1332,7 @@ tp_post_clickpadbutton_buttons(struct tp_dispatch *tp, usec_t time)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
tp_post_button_events(struct tp_dispatch *tp, usec_t time)
|
tp_post_button_events(struct tp_dispatch *tp, uint64_t time)
|
||||||
{
|
{
|
||||||
if (tp->buttons.is_clickpad ||
|
if (tp->buttons.is_clickpad ||
|
||||||
tp->device->model_flags & EVDEV_MODEL_APPLE_TOUCHPAD_ONEBUTTON)
|
tp->device->model_flags & EVDEV_MODEL_APPLE_TOUCHPAD_ONEBUTTON)
|
||||||
|
|
|
||||||
|
|
@ -87,9 +87,9 @@ tp_touch_get_edge(const struct tp_dispatch *tp, const struct tp_touch *t)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
tp_edge_scroll_set_timer(struct tp_dispatch *tp, struct tp_touch *t, usec_t time)
|
tp_edge_scroll_set_timer(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
|
||||||
{
|
{
|
||||||
const usec_t DEFAULT_SCROLL_LOCK_TIMEOUT = usec_from_millis(300);
|
const int DEFAULT_SCROLL_LOCK_TIMEOUT = ms2us(300);
|
||||||
/* if we use software buttons, we disable timeout-based
|
/* if we use software buttons, we disable timeout-based
|
||||||
* edge scrolling. A finger resting on the button areas is
|
* edge scrolling. A finger resting on the button areas is
|
||||||
* likely there to trigger a button event.
|
* likely there to trigger a button event.
|
||||||
|
|
@ -97,15 +97,14 @@ tp_edge_scroll_set_timer(struct tp_dispatch *tp, struct tp_touch *t, usec_t time
|
||||||
if (tp->buttons.click_method == LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS)
|
if (tp->buttons.click_method == LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
libinput_timer_set(&t->scroll.timer,
|
libinput_timer_set(&t->scroll.timer, time + DEFAULT_SCROLL_LOCK_TIMEOUT);
|
||||||
usec_add(time, DEFAULT_SCROLL_LOCK_TIMEOUT));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tp_edge_scroll_set_state(struct tp_dispatch *tp,
|
tp_edge_scroll_set_state(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tp_edge_scroll_touch_state state,
|
enum tp_edge_scroll_touch_state state,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
libinput_timer_cancel(&t->scroll.timer);
|
libinput_timer_cancel(&t->scroll.timer);
|
||||||
|
|
||||||
|
|
@ -132,7 +131,7 @@ static void
|
||||||
tp_edge_scroll_handle_none(struct tp_dispatch *tp,
|
tp_edge_scroll_handle_none(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum scroll_event event,
|
enum scroll_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case SCROLL_EVENT_TOUCH:
|
case SCROLL_EVENT_TOUCH:
|
||||||
|
|
@ -165,7 +164,7 @@ static void
|
||||||
tp_edge_scroll_handle_edge_new(struct tp_dispatch *tp,
|
tp_edge_scroll_handle_edge_new(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum scroll_event event,
|
enum scroll_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case SCROLL_EVENT_TOUCH:
|
case SCROLL_EVENT_TOUCH:
|
||||||
|
|
@ -197,7 +196,7 @@ static void
|
||||||
tp_edge_scroll_handle_edge(struct tp_dispatch *tp,
|
tp_edge_scroll_handle_edge(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum scroll_event event,
|
enum scroll_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case SCROLL_EVENT_TOUCH:
|
case SCROLL_EVENT_TOUCH:
|
||||||
|
|
@ -231,7 +230,7 @@ static void
|
||||||
tp_edge_scroll_handle_area(struct tp_dispatch *tp,
|
tp_edge_scroll_handle_area(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum scroll_event event,
|
enum scroll_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case SCROLL_EVENT_TOUCH:
|
case SCROLL_EVENT_TOUCH:
|
||||||
|
|
@ -253,7 +252,7 @@ static void
|
||||||
tp_edge_scroll_handle_event(struct tp_dispatch *tp,
|
tp_edge_scroll_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum scroll_event event,
|
enum scroll_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
enum tp_edge_scroll_touch_state current = t->scroll.edge_state;
|
enum tp_edge_scroll_touch_state current = t->scroll.edge_state;
|
||||||
|
|
||||||
|
|
@ -282,7 +281,7 @@ tp_edge_scroll_handle_event(struct tp_dispatch *tp,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tp_edge_scroll_handle_timeout(usec_t now, void *data)
|
tp_edge_scroll_handle_timeout(uint64_t now, void *data)
|
||||||
{
|
{
|
||||||
struct tp_touch *t = data;
|
struct tp_touch *t = data;
|
||||||
|
|
||||||
|
|
@ -350,7 +349,7 @@ tp_remove_edge_scroll(struct tp_dispatch *tp)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_edge_scroll_handle_state(struct tp_dispatch *tp, usec_t time)
|
tp_edge_scroll_handle_state(struct tp_dispatch *tp, uint64_t time)
|
||||||
{
|
{
|
||||||
struct tp_touch *t;
|
struct tp_touch *t;
|
||||||
|
|
||||||
|
|
@ -394,7 +393,7 @@ tp_edge_scroll_handle_state(struct tp_dispatch *tp, usec_t time)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
tp_edge_scroll_post_events(struct tp_dispatch *tp, usec_t time)
|
tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time)
|
||||||
{
|
{
|
||||||
struct evdev_device *device = tp->device;
|
struct evdev_device *device = tp->device;
|
||||||
struct tp_touch *t;
|
struct tp_touch *t;
|
||||||
|
|
@ -479,7 +478,7 @@ tp_edge_scroll_post_events(struct tp_dispatch *tp, usec_t time)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_edge_scroll_stop_events(struct tp_dispatch *tp, usec_t time)
|
tp_edge_scroll_stop_events(struct tp_dispatch *tp, uint64_t time)
|
||||||
{
|
{
|
||||||
struct evdev_device *device = tp->device;
|
struct evdev_device *device = tp->device;
|
||||||
struct tp_touch *t;
|
struct tp_touch *t;
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -29,10 +29,10 @@
|
||||||
|
|
||||||
#include "evdev-mt-touchpad.h"
|
#include "evdev-mt-touchpad.h"
|
||||||
|
|
||||||
#define DEFAULT_TAP_TIMEOUT_PERIOD usec_from_millis(180)
|
#define DEFAULT_TAP_TIMEOUT_PERIOD ms2us(180)
|
||||||
#define DEFAULT_DRAG_TIMEOUT_PERIOD_BASE usec_from_millis(160)
|
#define DEFAULT_DRAG_TIMEOUT_PERIOD_BASE ms2us(160)
|
||||||
#define DEFAULT_DRAG_TIMEOUT_PERIOD_PERFINGER usec_from_millis(20)
|
#define DEFAULT_DRAG_TIMEOUT_PERIOD_PERFINGER ms2us(20)
|
||||||
#define DEFAULT_DRAGLOCK_TIMEOUT_PERIOD usec_from_millis(300)
|
#define DEFAULT_DRAGLOCK_TIMEOUT_PERIOD ms2us(300)
|
||||||
#define DEFAULT_TAP_MOVE_THRESHOLD 1.3 /* mm */
|
#define DEFAULT_TAP_MOVE_THRESHOLD 1.3 /* mm */
|
||||||
|
|
||||||
enum tap_event {
|
enum tap_event {
|
||||||
|
|
@ -120,7 +120,7 @@ log_tap_bug(struct tp_dispatch *tp, struct tp_touch *t, enum tap_event event)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tp_tap_notify(struct tp_dispatch *tp,
|
tp_tap_notify(struct tp_dispatch *tp,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
int nfingers,
|
int nfingers,
|
||||||
enum libinput_button_state state)
|
enum libinput_button_state state)
|
||||||
{
|
{
|
||||||
|
|
@ -151,25 +151,24 @@ tp_tap_notify(struct tp_dispatch *tp,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tp_tap_set_timer(struct tp_dispatch *tp, usec_t time)
|
tp_tap_set_timer(struct tp_dispatch *tp, uint64_t time)
|
||||||
{
|
{
|
||||||
libinput_timer_set(&tp->tap.timer, usec_add(time, DEFAULT_TAP_TIMEOUT_PERIOD));
|
libinput_timer_set(&tp->tap.timer, time + DEFAULT_TAP_TIMEOUT_PERIOD);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tp_tap_set_drag_timer(struct tp_dispatch *tp, usec_t time, int nfingers_tapped)
|
tp_tap_set_drag_timer(struct tp_dispatch *tp, uint64_t time, int nfingers_tapped)
|
||||||
{
|
{
|
||||||
usec_t per_finger_timeout =
|
libinput_timer_set(
|
||||||
usec_mul(DEFAULT_DRAG_TIMEOUT_PERIOD_PERFINGER, nfingers_tapped);
|
&tp->tap.timer,
|
||||||
usec_t timeout = usec_add(DEFAULT_DRAG_TIMEOUT_PERIOD_BASE, per_finger_timeout);
|
time + DEFAULT_DRAG_TIMEOUT_PERIOD_BASE +
|
||||||
libinput_timer_set(&tp->tap.timer, usec_add(time, timeout));
|
(nfingers_tapped * DEFAULT_DRAG_TIMEOUT_PERIOD_PERFINGER));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tp_tap_set_draglock_timer(struct tp_dispatch *tp, usec_t time)
|
tp_tap_set_draglock_timer(struct tp_dispatch *tp, uint64_t time)
|
||||||
{
|
{
|
||||||
libinput_timer_set(&tp->tap.timer,
|
libinput_timer_set(&tp->tap.timer, time + DEFAULT_DRAGLOCK_TIMEOUT_PERIOD);
|
||||||
usec_add(time, DEFAULT_DRAGLOCK_TIMEOUT_PERIOD));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -178,13 +177,6 @@ tp_tap_clear_timer(struct tp_dispatch *tp)
|
||||||
libinput_timer_cancel(&tp->tap.timer);
|
libinput_timer_cancel(&tp->tap.timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
tp_touch_near_any_edge(struct tp_dispatch *tp, struct tp_touch *t)
|
|
||||||
{
|
|
||||||
return (t->point.x < tp->tap.edges.left || t->point.x > tp->tap.edges.right ||
|
|
||||||
t->point.y < tp->tap.edges.top || t->point.y > tp->tap.edges.bottom);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tp_tap_move_to_dead(struct tp_dispatch *tp, struct tp_touch *t)
|
tp_tap_move_to_dead(struct tp_dispatch *tp, struct tp_touch *t)
|
||||||
{
|
{
|
||||||
|
|
@ -197,7 +189,7 @@ static void
|
||||||
tp_tap_idle_handle_event(struct tp_dispatch *tp,
|
tp_tap_idle_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case TAP_EVENT_TOUCH:
|
case TAP_EVENT_TOUCH:
|
||||||
|
|
@ -230,7 +222,7 @@ static void
|
||||||
tp_tap_touch_handle_event(struct tp_dispatch *tp,
|
tp_tap_touch_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -284,7 +276,7 @@ static void
|
||||||
tp_tap_hold_handle_event(struct tp_dispatch *tp,
|
tp_tap_hold_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -322,7 +314,7 @@ static void
|
||||||
tp_tap_tapped_handle_event(struct tp_dispatch *tp,
|
tp_tap_tapped_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
int nfingers_tapped)
|
int nfingers_tapped)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -371,7 +363,7 @@ static void
|
||||||
tp_tap_touch2_handle_event(struct tp_dispatch *tp,
|
tp_tap_touch2_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -409,7 +401,7 @@ static void
|
||||||
tp_tap_touch2_hold_handle_event(struct tp_dispatch *tp,
|
tp_tap_touch2_hold_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -444,7 +436,7 @@ static void
|
||||||
tp_tap_touch2_release_handle_event(struct tp_dispatch *tp,
|
tp_tap_touch2_release_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -513,7 +505,7 @@ static void
|
||||||
tp_tap_touch3_handle_event(struct tp_dispatch *tp,
|
tp_tap_touch3_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -551,7 +543,7 @@ static void
|
||||||
tp_tap_touch3_hold_handle_event(struct tp_dispatch *tp,
|
tp_tap_touch3_hold_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -584,7 +576,7 @@ static void
|
||||||
tp_tap_touch3_release_handle_event(struct tp_dispatch *tp,
|
tp_tap_touch3_release_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -652,7 +644,7 @@ static void
|
||||||
tp_tap_touch3_release2_handle_event(struct tp_dispatch *tp,
|
tp_tap_touch3_release2_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -750,7 +742,7 @@ static void
|
||||||
tp_tap_dragging_or_doubletap_handle_event(struct tp_dispatch *tp,
|
tp_tap_dragging_or_doubletap_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
int nfingers_tapped)
|
int nfingers_tapped)
|
||||||
{
|
{
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -816,10 +808,9 @@ static void
|
||||||
tp_tap_dragging_handle_event(struct tp_dispatch *tp,
|
tp_tap_dragging_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
int nfingers_tapped)
|
int nfingers_tapped)
|
||||||
{
|
{
|
||||||
bool at_edge = false;
|
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case TAP_EVENT_TOUCH: {
|
case TAP_EVENT_TOUCH: {
|
||||||
|
|
@ -833,8 +824,7 @@ tp_tap_dragging_handle_event(struct tp_dispatch *tp,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TAP_EVENT_RELEASE:
|
case TAP_EVENT_RELEASE:
|
||||||
if (tp->tap.drag_lock != LIBINPUT_CONFIG_DRAG_LOCK_DISABLED ||
|
if (tp->tap.drag_lock != LIBINPUT_CONFIG_DRAG_LOCK_DISABLED) {
|
||||||
(at_edge = tp_touch_near_any_edge(tp, t))) {
|
|
||||||
enum tp_tap_state dest[3] = {
|
enum tp_tap_state dest[3] = {
|
||||||
TAP_STATE_1FGTAP_DRAGGING_WAIT,
|
TAP_STATE_1FGTAP_DRAGGING_WAIT,
|
||||||
TAP_STATE_2FGTAP_DRAGGING_WAIT,
|
TAP_STATE_2FGTAP_DRAGGING_WAIT,
|
||||||
|
|
@ -842,9 +832,8 @@ tp_tap_dragging_handle_event(struct tp_dispatch *tp,
|
||||||
};
|
};
|
||||||
assert(nfingers_tapped >= 1 && nfingers_tapped <= 3);
|
assert(nfingers_tapped >= 1 && nfingers_tapped <= 3);
|
||||||
tp->tap.state = dest[nfingers_tapped - 1];
|
tp->tap.state = dest[nfingers_tapped - 1];
|
||||||
if (at_edge ||
|
if (tp->tap.drag_lock ==
|
||||||
tp->tap.drag_lock ==
|
LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_TIMEOUT)
|
||||||
LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_TIMEOUT)
|
|
||||||
tp_tap_set_draglock_timer(tp, time);
|
tp_tap_set_draglock_timer(tp, time);
|
||||||
} else {
|
} else {
|
||||||
tp_tap_notify(tp,
|
tp_tap_notify(tp,
|
||||||
|
|
@ -883,7 +872,7 @@ static void
|
||||||
tp_tap_dragging_wait_handle_event(struct tp_dispatch *tp,
|
tp_tap_dragging_wait_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
int nfingers_tapped)
|
int nfingers_tapped)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -930,7 +919,7 @@ static void
|
||||||
tp_tap_dragging_tap_handle_event(struct tp_dispatch *tp,
|
tp_tap_dragging_tap_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
int nfingers_tapped)
|
int nfingers_tapped)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -990,7 +979,7 @@ static void
|
||||||
tp_tap_dragging2_handle_event(struct tp_dispatch *tp,
|
tp_tap_dragging2_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
int nfingers_tapped)
|
int nfingers_tapped)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -1044,7 +1033,7 @@ static void
|
||||||
tp_tap_dead_handle_event(struct tp_dispatch *tp,
|
tp_tap_dead_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
@ -1071,7 +1060,7 @@ static void
|
||||||
tp_tap_handle_event(struct tp_dispatch *tp,
|
tp_tap_handle_event(struct tp_dispatch *tp,
|
||||||
struct tp_touch *t,
|
struct tp_touch *t,
|
||||||
enum tap_event event,
|
enum tap_event event,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
enum tp_tap_state current;
|
enum tp_tap_state current;
|
||||||
|
|
||||||
|
|
@ -1217,7 +1206,7 @@ tp_tap_enabled(struct tp_dispatch *tp)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
tp_tap_handle_state(struct tp_dispatch *tp, usec_t time)
|
tp_tap_handle_state(struct tp_dispatch *tp, uint64_t time)
|
||||||
{
|
{
|
||||||
struct tp_touch *t;
|
struct tp_touch *t;
|
||||||
int filter_motion = 0;
|
int filter_motion = 0;
|
||||||
|
|
@ -1352,7 +1341,7 @@ tp_tap_post_process_state(struct tp_dispatch *tp)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tp_tap_handle_timeout(usec_t time, void *data)
|
tp_tap_handle_timeout(uint64_t time, void *data)
|
||||||
{
|
{
|
||||||
struct tp_dispatch *tp = data;
|
struct tp_dispatch *tp = data;
|
||||||
struct tp_touch *t;
|
struct tp_touch *t;
|
||||||
|
|
@ -1368,7 +1357,10 @@ tp_tap_handle_timeout(usec_t time, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tp_tap_enabled_update(struct tp_dispatch *tp, bool suspended, bool enabled, usec_t time)
|
tp_tap_enabled_update(struct tp_dispatch *tp,
|
||||||
|
bool suspended,
|
||||||
|
bool enabled,
|
||||||
|
uint64_t time)
|
||||||
{
|
{
|
||||||
bool was_enabled = tp_tap_enabled(tp);
|
bool was_enabled = tp_tap_enabled(tp);
|
||||||
|
|
||||||
|
|
@ -1589,20 +1581,6 @@ tp_init_tap(struct tp_dispatch *tp)
|
||||||
tp->tap.drag_enabled = tp_drag_default(tp->device);
|
tp->tap.drag_enabled = tp_drag_default(tp->device);
|
||||||
tp->tap.drag_lock = tp_drag_lock_default(tp->device);
|
tp->tap.drag_lock = tp_drag_lock_default(tp->device);
|
||||||
|
|
||||||
struct evdev_device *device = tp->device;
|
|
||||||
|
|
||||||
const struct input_absinfo *absx = device->abs.absinfo_x;
|
|
||||||
const struct input_absinfo *absy = device->abs.absinfo_y;
|
|
||||||
assert(absx && absy);
|
|
||||||
|
|
||||||
struct phys_coords mm = { 5.0, 5.0 };
|
|
||||||
struct device_coords edge_margin = evdev_device_mm_to_units(device, &mm);
|
|
||||||
|
|
||||||
tp->tap.edges.left = edge_margin.x;
|
|
||||||
tp->tap.edges.right = (absx->maximum - edge_margin.x + absx->minimum);
|
|
||||||
tp->tap.edges.top = edge_margin.y;
|
|
||||||
tp->tap.edges.bottom = (absy->maximum - edge_margin.y + absy->minimum);
|
|
||||||
|
|
||||||
snprintf(timer_name,
|
snprintf(timer_name,
|
||||||
sizeof(timer_name),
|
sizeof(timer_name),
|
||||||
"%s tap",
|
"%s tap",
|
||||||
|
|
@ -1621,7 +1599,7 @@ tp_remove_tap(struct tp_dispatch *tp)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_release_all_taps(struct tp_dispatch *tp, usec_t now)
|
tp_release_all_taps(struct tp_dispatch *tp, uint64_t now)
|
||||||
{
|
{
|
||||||
struct tp_touch *t;
|
struct tp_touch *t;
|
||||||
int i;
|
int i;
|
||||||
|
|
@ -1648,13 +1626,13 @@ tp_release_all_taps(struct tp_dispatch *tp, usec_t now)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_tap_suspend(struct tp_dispatch *tp, usec_t time)
|
tp_tap_suspend(struct tp_dispatch *tp, uint64_t time)
|
||||||
{
|
{
|
||||||
tp_tap_enabled_update(tp, true, tp->tap.enabled, time);
|
tp_tap_enabled_update(tp, true, tp->tap.enabled, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_tap_resume(struct tp_dispatch *tp, usec_t time)
|
tp_tap_resume(struct tp_dispatch *tp, uint64_t time)
|
||||||
{
|
{
|
||||||
tp_tap_enabled_update(tp, false, tp->tap.enabled, time);
|
tp_tap_enabled_update(tp, false, tp->tap.enabled, time);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
/* distance between fingers to assume it is not a scroll */
|
/* distance between fingers to assume it is not a scroll */
|
||||||
#define SCROLL_MM_X 35
|
#define SCROLL_MM_X 35
|
||||||
#define SCROLL_MM_Y 25
|
#define SCROLL_MM_Y 25
|
||||||
#define THUMB_TIMEOUT usec_from_millis(100)
|
#define THUMB_TIMEOUT ms2us(100)
|
||||||
|
|
||||||
static inline const char *
|
static inline const char *
|
||||||
thumb_state_to_str(enum tp_thumb_state state)
|
thumb_state_to_str(enum tp_thumb_state state)
|
||||||
|
|
@ -193,7 +193,7 @@ tp_thumb_revive(struct tp_dispatch *tp, struct tp_touch *t)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_thumb_update_touch(struct tp_dispatch *tp, struct tp_touch *t, usec_t time)
|
tp_thumb_update_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
|
||||||
{
|
{
|
||||||
if (!tp->thumb.detect_thumbs)
|
if (!tp->thumb.detect_thumbs)
|
||||||
return;
|
return;
|
||||||
|
|
@ -274,7 +274,7 @@ tp_thumb_update_multifinger(struct tp_dispatch *tp)
|
||||||
speed_exceeded_count =
|
speed_exceeded_count =
|
||||||
max(speed_exceeded_count, t->speed.exceeded_count);
|
max(speed_exceeded_count, t->speed.exceeded_count);
|
||||||
|
|
||||||
if (!oldest || usec_cmp(t->initial_time, oldest->initial_time) < 0) {
|
if (!oldest || t->initial_time < oldest->initial_time) {
|
||||||
oldest = t;
|
oldest = t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -337,13 +337,10 @@ tp_thumb_update_multifinger(struct tp_dispatch *tp)
|
||||||
* the behavior of the other touches.)
|
* the behavior of the other touches.)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (newest) {
|
if (newest && (newest->initial_time - oldest->initial_time) < THUMB_TIMEOUT &&
|
||||||
usec_t delta = usec_delta(newest->initial_time, oldest->initial_time);
|
first->point.y < tp->thumb.lower_thumb_line) {
|
||||||
if (usec_cmp(delta, THUMB_TIMEOUT) < 0 &&
|
tp_thumb_lift(tp);
|
||||||
first->point.y < tp->thumb.lower_thumb_line) {
|
return;
|
||||||
tp_thumb_lift(tp);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we're past the THUMB_TIMEOUT, and the touches are relatively far
|
/* If we're past the THUMB_TIMEOUT, and the touches are relatively far
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -166,8 +166,6 @@ enum tp_gesture_state {
|
||||||
GESTURE_STATE_PINCH,
|
GESTURE_STATE_PINCH,
|
||||||
GESTURE_STATE_SWIPE_START,
|
GESTURE_STATE_SWIPE_START,
|
||||||
GESTURE_STATE_SWIPE,
|
GESTURE_STATE_SWIPE,
|
||||||
GESTURE_STATE_3FG_DRAG_OR_SWIPE_START,
|
|
||||||
GESTURE_STATE_3FG_DRAG_OR_SWIPE,
|
|
||||||
GESTURE_STATE_3FG_DRAG_START,
|
GESTURE_STATE_3FG_DRAG_START,
|
||||||
GESTURE_STATE_3FG_DRAG,
|
GESTURE_STATE_3FG_DRAG,
|
||||||
GESTURE_STATE_3FG_DRAG_RELEASED,
|
GESTURE_STATE_3FG_DRAG_RELEASED,
|
||||||
|
|
@ -196,7 +194,7 @@ struct tp_touch {
|
||||||
bool has_ended; /* TRACKING_ID == -1 */
|
bool has_ended; /* TRACKING_ID == -1 */
|
||||||
bool dirty;
|
bool dirty;
|
||||||
struct device_coords point;
|
struct device_coords point;
|
||||||
usec_t initial_time;
|
uint64_t initial_time;
|
||||||
int pressure;
|
int pressure;
|
||||||
bool is_tool_palm; /* MT_TOOL_PALM */
|
bool is_tool_palm; /* MT_TOOL_PALM */
|
||||||
int major, minor;
|
int major, minor;
|
||||||
|
|
@ -215,7 +213,7 @@ struct tp_touch {
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
struct tp_history_point {
|
struct tp_history_point {
|
||||||
usec_t time;
|
uint64_t time;
|
||||||
struct device_coords point;
|
struct device_coords point;
|
||||||
} samples[TOUCHPAD_HISTORY_LENGTH];
|
} samples[TOUCHPAD_HISTORY_LENGTH];
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
|
|
@ -248,7 +246,7 @@ struct tp_touch {
|
||||||
struct libinput_timer timer;
|
struct libinput_timer timer;
|
||||||
struct device_coords initial;
|
struct device_coords initial;
|
||||||
bool has_moved; /* has moved more than threshold */
|
bool has_moved; /* has moved more than threshold */
|
||||||
usec_t initial_time;
|
uint64_t initial_time;
|
||||||
} button;
|
} button;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
|
@ -269,7 +267,7 @@ struct tp_touch {
|
||||||
struct {
|
struct {
|
||||||
enum touch_palm_state state;
|
enum touch_palm_state state;
|
||||||
struct device_coords first; /* first coordinates if is_palm == true */
|
struct device_coords first; /* first coordinates if is_palm == true */
|
||||||
usec_t time; /* first timestamp if is_palm == true */
|
uint64_t time; /* first timestamp if is_palm == true */
|
||||||
} palm;
|
} palm;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
|
@ -346,7 +344,7 @@ struct tp_dispatch {
|
||||||
bool enabled;
|
bool enabled;
|
||||||
struct device_coords margin;
|
struct device_coords margin;
|
||||||
unsigned int other_event_count;
|
unsigned int other_event_count;
|
||||||
usec_t last_motion_time;
|
uint64_t last_motion_time;
|
||||||
} hysteresis;
|
} hysteresis;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
|
@ -363,7 +361,7 @@ struct tp_dispatch {
|
||||||
struct libinput_timer finger_count_switch_timer;
|
struct libinput_timer finger_count_switch_timer;
|
||||||
enum tp_gesture_state state;
|
enum tp_gesture_state state;
|
||||||
struct tp_touch *touches[2];
|
struct tp_touch *touches[2];
|
||||||
usec_t initial_time;
|
uint64_t initial_time;
|
||||||
double initial_distance;
|
double initial_distance;
|
||||||
double prev_scale;
|
double prev_scale;
|
||||||
double angle;
|
double angle;
|
||||||
|
|
@ -372,9 +370,7 @@ struct tp_dispatch {
|
||||||
bool hold_enabled;
|
bool hold_enabled;
|
||||||
|
|
||||||
struct libinput_timer drag_3fg_timer;
|
struct libinput_timer drag_3fg_timer;
|
||||||
usec_t drag_3fg_release_time;
|
uint64_t drag_3fg_release_time;
|
||||||
|
|
||||||
struct libinput_timer drag_3fg_or_swipe_timer;
|
|
||||||
} gesture;
|
} gesture;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
|
@ -425,9 +421,9 @@ struct tp_dispatch {
|
||||||
bool h, v;
|
bool h, v;
|
||||||
} active;
|
} active;
|
||||||
struct phys_coords vector;
|
struct phys_coords vector;
|
||||||
usec_t time_prev;
|
uint64_t time_prev;
|
||||||
struct {
|
struct {
|
||||||
usec_t h, v;
|
uint64_t h, v;
|
||||||
} duration;
|
} duration;
|
||||||
} scroll;
|
} scroll;
|
||||||
|
|
||||||
|
|
@ -440,7 +436,7 @@ struct tp_dispatch {
|
||||||
struct libinput_timer timer;
|
struct libinput_timer timer;
|
||||||
enum tp_tap_state state;
|
enum tp_tap_state state;
|
||||||
uint32_t buttons_pressed;
|
uint32_t buttons_pressed;
|
||||||
usec_t saved_press_time, saved_release_time;
|
uint64_t saved_press_time, saved_release_time;
|
||||||
|
|
||||||
enum libinput_config_tap_button_map map;
|
enum libinput_config_tap_button_map map;
|
||||||
enum libinput_config_tap_button_map want_map;
|
enum libinput_config_tap_button_map want_map;
|
||||||
|
|
@ -450,11 +446,6 @@ struct tp_dispatch {
|
||||||
|
|
||||||
unsigned int nfingers_down; /* number of fingers down for tapping (excl.
|
unsigned int nfingers_down; /* number of fingers down for tapping (excl.
|
||||||
thumb/palm) */
|
thumb/palm) */
|
||||||
|
|
||||||
/* Edges for auto drag-lock, in device coordinates */
|
|
||||||
struct {
|
|
||||||
int left, right, top, bottom;
|
|
||||||
} edges;
|
|
||||||
} tap;
|
} tap;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
|
@ -466,7 +457,6 @@ struct tp_dispatch {
|
||||||
struct {
|
struct {
|
||||||
struct libinput_device_config_dwtp config;
|
struct libinput_device_config_dwtp config;
|
||||||
bool dwtp_enabled;
|
bool dwtp_enabled;
|
||||||
usec_t timeout;
|
|
||||||
|
|
||||||
int32_t right_edge; /* in device coordinates */
|
int32_t right_edge; /* in device coordinates */
|
||||||
int32_t left_edge; /* in device coordinates */
|
int32_t left_edge; /* in device coordinates */
|
||||||
|
|
@ -475,7 +465,7 @@ struct tp_dispatch {
|
||||||
bool trackpoint_active;
|
bool trackpoint_active;
|
||||||
struct libinput_event_listener trackpoint_listener;
|
struct libinput_event_listener trackpoint_listener;
|
||||||
struct libinput_timer trackpoint_timer;
|
struct libinput_timer trackpoint_timer;
|
||||||
usec_t trackpoint_last_event_time;
|
uint64_t trackpoint_last_event_time;
|
||||||
uint32_t trackpoint_event_count;
|
uint32_t trackpoint_event_count;
|
||||||
bool monitor_trackpoint;
|
bool monitor_trackpoint;
|
||||||
|
|
||||||
|
|
@ -491,14 +481,11 @@ struct tp_dispatch {
|
||||||
struct {
|
struct {
|
||||||
struct libinput_device_config_send_events config;
|
struct libinput_device_config_send_events config;
|
||||||
enum libinput_config_send_events_mode current_mode;
|
enum libinput_config_send_events_mode current_mode;
|
||||||
|
|
||||||
struct list external_mice_list;
|
|
||||||
} sendevents;
|
} sendevents;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
struct libinput_device_config_dwt config;
|
struct libinput_device_config_dwt config;
|
||||||
bool dwt_enabled;
|
bool dwt_enabled;
|
||||||
usec_t timeout;
|
|
||||||
|
|
||||||
/* We have to allow for more than one device node to be the
|
/* We have to allow for more than one device node to be the
|
||||||
* internal dwt keyboard (Razer Blade). But they're the same
|
* internal dwt keyboard (Razer Blade). But they're the same
|
||||||
|
|
@ -511,7 +498,7 @@ struct tp_dispatch {
|
||||||
unsigned long mod_mask[NLONGS(KEY_CNT)];
|
unsigned long mod_mask[NLONGS(KEY_CNT)];
|
||||||
bool keyboard_active;
|
bool keyboard_active;
|
||||||
struct libinput_timer keyboard_timer;
|
struct libinput_timer keyboard_timer;
|
||||||
usec_t keyboard_last_press_time;
|
uint64_t keyboard_last_press_time;
|
||||||
} dwt;
|
} dwt;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
|
@ -542,8 +529,8 @@ struct tp_dispatch {
|
||||||
|
|
||||||
struct msc_timestamp {
|
struct msc_timestamp {
|
||||||
enum tp_jump_state state;
|
enum tp_jump_state state;
|
||||||
usec_t interval;
|
uint32_t interval;
|
||||||
usec_t now;
|
uint32_t now;
|
||||||
} msc_timestamp;
|
} msc_timestamp;
|
||||||
} quirks;
|
} quirks;
|
||||||
|
|
||||||
|
|
@ -627,17 +614,17 @@ tp_get_delta(struct tp_touch *t);
|
||||||
struct normalized_coords
|
struct normalized_coords
|
||||||
tp_filter_motion(struct tp_dispatch *tp,
|
tp_filter_motion(struct tp_dispatch *tp,
|
||||||
const struct device_float_coords *unaccelerated,
|
const struct device_float_coords *unaccelerated,
|
||||||
usec_t time);
|
uint64_t time);
|
||||||
|
|
||||||
struct normalized_coords
|
struct normalized_coords
|
||||||
tp_filter_motion_unaccelerated(struct tp_dispatch *tp,
|
tp_filter_motion_unaccelerated(struct tp_dispatch *tp,
|
||||||
const struct device_float_coords *unaccelerated,
|
const struct device_float_coords *unaccelerated,
|
||||||
usec_t time);
|
uint64_t time);
|
||||||
|
|
||||||
struct normalized_coords
|
struct normalized_coords
|
||||||
tp_filter_scroll(struct tp_dispatch *tp,
|
tp_filter_scroll(struct tp_dispatch *tp,
|
||||||
const struct device_float_coords *unaccelerated,
|
const struct device_float_coords *unaccelerated,
|
||||||
usec_t time);
|
uint64_t time);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
tp_touch_active(const struct tp_dispatch *tp, const struct tp_touch *t);
|
tp_touch_active(const struct tp_dispatch *tp, const struct tp_touch *t);
|
||||||
|
|
@ -646,7 +633,7 @@ bool
|
||||||
tp_touch_active_for_gesture(const struct tp_dispatch *tp, const struct tp_touch *t);
|
tp_touch_active_for_gesture(const struct tp_dispatch *tp, const struct tp_touch *t);
|
||||||
|
|
||||||
int
|
int
|
||||||
tp_tap_handle_state(struct tp_dispatch *tp, usec_t time);
|
tp_tap_handle_state(struct tp_dispatch *tp, uint64_t time);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_tap_post_process_state(struct tp_dispatch *tp);
|
tp_tap_post_process_state(struct tp_dispatch *tp);
|
||||||
|
|
@ -672,16 +659,16 @@ void
|
||||||
tp_remove_buttons(struct tp_dispatch *tp);
|
tp_remove_buttons(struct tp_dispatch *tp);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_process_button(struct tp_dispatch *tp, const struct evdev_event *e, usec_t time);
|
tp_process_button(struct tp_dispatch *tp, const struct evdev_event *e, uint64_t time);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_release_all_buttons(struct tp_dispatch *tp, usec_t time);
|
tp_release_all_buttons(struct tp_dispatch *tp, uint64_t time);
|
||||||
|
|
||||||
int
|
int
|
||||||
tp_post_button_events(struct tp_dispatch *tp, usec_t time);
|
tp_post_button_events(struct tp_dispatch *tp, uint64_t time);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_button_handle_state(struct tp_dispatch *tp, usec_t time);
|
tp_button_handle_state(struct tp_dispatch *tp, uint64_t time);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
tp_button_touch_active(const struct tp_dispatch *tp, const struct tp_touch *t);
|
tp_button_touch_active(const struct tp_dispatch *tp, const struct tp_touch *t);
|
||||||
|
|
@ -691,13 +678,13 @@ tp_button_is_inside_softbutton_area(const struct tp_dispatch *tp,
|
||||||
const struct tp_touch *t);
|
const struct tp_touch *t);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_release_all_taps(struct tp_dispatch *tp, usec_t now);
|
tp_release_all_taps(struct tp_dispatch *tp, uint64_t now);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_tap_suspend(struct tp_dispatch *tp, usec_t time);
|
tp_tap_suspend(struct tp_dispatch *tp, uint64_t time);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_tap_resume(struct tp_dispatch *tp, usec_t time);
|
tp_tap_resume(struct tp_dispatch *tp, uint64_t time);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
tp_tap_dragging(const struct tp_dispatch *tp);
|
tp_tap_dragging(const struct tp_dispatch *tp);
|
||||||
|
|
@ -712,13 +699,13 @@ void
|
||||||
tp_remove_edge_scroll(struct tp_dispatch *tp);
|
tp_remove_edge_scroll(struct tp_dispatch *tp);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_edge_scroll_handle_state(struct tp_dispatch *tp, usec_t time);
|
tp_edge_scroll_handle_state(struct tp_dispatch *tp, uint64_t time);
|
||||||
|
|
||||||
int
|
int
|
||||||
tp_edge_scroll_post_events(struct tp_dispatch *tp, usec_t time);
|
tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_edge_scroll_stop_events(struct tp_dispatch *tp, usec_t time);
|
tp_edge_scroll_stop_events(struct tp_dispatch *tp, uint64_t time);
|
||||||
|
|
||||||
int
|
int
|
||||||
tp_edge_scroll_touch_active(const struct tp_dispatch *tp, const struct tp_touch *t);
|
tp_edge_scroll_touch_active(const struct tp_dispatch *tp, const struct tp_touch *t);
|
||||||
|
|
@ -733,25 +720,25 @@ void
|
||||||
tp_remove_gesture(struct tp_dispatch *tp);
|
tp_remove_gesture(struct tp_dispatch *tp);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_gesture_stop(struct tp_dispatch *tp, usec_t time);
|
tp_gesture_stop(struct tp_dispatch *tp, uint64_t time);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_gesture_cancel(struct tp_dispatch *tp, usec_t time);
|
tp_gesture_cancel(struct tp_dispatch *tp, uint64_t time);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_gesture_cancel_motion_gestures(struct tp_dispatch *tp, usec_t time);
|
tp_gesture_cancel_motion_gestures(struct tp_dispatch *tp, uint64_t time);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_gesture_update_finger_state(struct tp_dispatch *tp, usec_t time);
|
tp_gesture_update_finger_state(struct tp_dispatch *tp, uint64_t time);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_gesture_post_events(struct tp_dispatch *tp, usec_t time, bool ignore_motion);
|
tp_gesture_post_events(struct tp_dispatch *tp, uint64_t time, bool ignore_motion);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_gesture_stop_twofinger_scroll(struct tp_dispatch *tp, usec_t time);
|
tp_gesture_stop_twofinger_scroll(struct tp_dispatch *tp, uint64_t time);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_gesture_tap_timeout(struct tp_dispatch *tp, usec_t time);
|
tp_gesture_tap_timeout(struct tp_dispatch *tp, uint64_t time);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_clickpad_middlebutton_apply_config(struct evdev_device *device);
|
tp_clickpad_middlebutton_apply_config(struct evdev_device *device);
|
||||||
|
|
@ -772,7 +759,7 @@ void
|
||||||
tp_thumb_suppress(struct tp_dispatch *tp, struct tp_touch *t);
|
tp_thumb_suppress(struct tp_dispatch *tp, struct tp_touch *t);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_thumb_update_touch(struct tp_dispatch *tp, struct tp_touch *t, usec_t time);
|
tp_thumb_update_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time);
|
||||||
|
|
||||||
void
|
void
|
||||||
tp_detect_thumb_while_moving(struct tp_dispatch *tp);
|
tp_detect_thumb_while_moving(struct tp_dispatch *tp);
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,9 @@
|
||||||
#include "evdev.h"
|
#include "evdev.h"
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
evdev_process_frame(struct evdev_device *device, struct evdev_frame *frame, usec_t time)
|
evdev_process_frame(struct evdev_device *device,
|
||||||
|
struct evdev_frame *frame,
|
||||||
|
uint64_t time)
|
||||||
{
|
{
|
||||||
struct evdev_dispatch *dispatch = device->dispatch;
|
struct evdev_dispatch *dispatch = device->dispatch;
|
||||||
|
|
||||||
|
|
@ -45,7 +47,7 @@ evdev_device_dispatch_frame(struct libinput_plugin *plugin,
|
||||||
struct evdev_frame *frame)
|
struct evdev_frame *frame)
|
||||||
{
|
{
|
||||||
struct evdev_device *device = evdev_device(libinput_device);
|
struct evdev_device *device = evdev_device(libinput_device);
|
||||||
usec_t time = evdev_frame_get_time(frame);
|
uint64_t time = evdev_frame_get_time(frame);
|
||||||
evdev_process_frame(device, frame, time);
|
evdev_process_frame(device, frame, time);
|
||||||
|
|
||||||
/* Discard event to make the plugin system aware we're done */
|
/* Discard event to make the plugin system aware we're done */
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ static void
|
||||||
pad_process_relative(struct pad_dispatch *pad,
|
pad_process_relative(struct pad_dispatch *pad,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
struct evdev_event *e,
|
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_DIAL:
|
case EVDEV_REL_DIAL:
|
||||||
|
|
@ -172,7 +172,7 @@ static void
|
||||||
pad_process_absolute(struct pad_dispatch *pad,
|
pad_process_absolute(struct pad_dispatch *pad,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
struct evdev_event *e,
|
struct evdev_event *e,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
enum pad_axes axis = PAD_AXIS_NONE;
|
enum pad_axes axis = PAD_AXIS_NONE;
|
||||||
|
|
||||||
|
|
@ -310,7 +310,7 @@ pad_dial_get_mode_group(struct pad_dispatch *pad, unsigned int dial)
|
||||||
|
|
||||||
evdev_log_bug_libinput_ratelimit(pad->device,
|
evdev_log_bug_libinput_ratelimit(pad->device,
|
||||||
&pad->modes.group_not_found,
|
&pad->modes.group_not_found,
|
||||||
"Unable to find mode group for dial %d\n",
|
"Unable to find mode group for dial %d",
|
||||||
dial);
|
dial);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -329,7 +329,7 @@ pad_ring_get_mode_group(struct pad_dispatch *pad, unsigned int ring)
|
||||||
|
|
||||||
evdev_log_bug_libinput_ratelimit(pad->device,
|
evdev_log_bug_libinput_ratelimit(pad->device,
|
||||||
&pad->modes.group_not_found,
|
&pad->modes.group_not_found,
|
||||||
"Unable to find mode group for ring %d\n",
|
"Unable to find mode group for ring %d",
|
||||||
ring);
|
ring);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -348,7 +348,7 @@ pad_strip_get_mode_group(struct pad_dispatch *pad, unsigned int strip)
|
||||||
|
|
||||||
evdev_log_bug_libinput_ratelimit(pad->device,
|
evdev_log_bug_libinput_ratelimit(pad->device,
|
||||||
&pad->modes.group_not_found,
|
&pad->modes.group_not_found,
|
||||||
"Unable to find mode group for strip %d\n",
|
"Unable to find mode group for strip %d",
|
||||||
strip);
|
strip);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -357,7 +357,7 @@ pad_strip_get_mode_group(struct pad_dispatch *pad, unsigned int strip)
|
||||||
static void
|
static void
|
||||||
pad_check_notify_axes(struct pad_dispatch *pad,
|
pad_check_notify_axes(struct pad_dispatch *pad,
|
||||||
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_tablet_pad_mode_group *group;
|
struct libinput_tablet_pad_mode_group *group;
|
||||||
|
|
@ -452,7 +452,7 @@ static void
|
||||||
pad_process_key(struct pad_dispatch *pad,
|
pad_process_key(struct pad_dispatch *pad,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
struct evdev_event *e,
|
struct evdev_event *e,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
uint32_t is_press = e->value != 0;
|
uint32_t is_press = e->value != 0;
|
||||||
|
|
||||||
|
|
@ -481,7 +481,7 @@ pad_button_get_mode_group(struct pad_dispatch *pad, unsigned int button)
|
||||||
static void
|
static void
|
||||||
pad_notify_button_mask(struct pad_dispatch *pad,
|
pad_notify_button_mask(struct pad_dispatch *pad,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
const struct button_state *buttons,
|
const struct button_state *buttons,
|
||||||
enum libinput_button_state state)
|
enum libinput_button_state state)
|
||||||
{
|
{
|
||||||
|
|
@ -537,7 +537,7 @@ pad_notify_button_mask(struct pad_dispatch *pad,
|
||||||
static void
|
static void
|
||||||
pad_notify_buttons(struct pad_dispatch *pad,
|
pad_notify_buttons(struct pad_dispatch *pad,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum libinput_button_state state)
|
enum libinput_button_state state)
|
||||||
{
|
{
|
||||||
struct button_state buttons;
|
struct button_state buttons;
|
||||||
|
|
@ -565,7 +565,7 @@ pad_change_to_left_handed(struct evdev_device *device)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pad_flush(struct pad_dispatch *pad, struct evdev_device *device, usec_t time)
|
pad_flush(struct pad_dispatch *pad, struct evdev_device *device, uint64_t time)
|
||||||
{
|
{
|
||||||
if (pad_has_status(pad, PAD_AXES_UPDATED)) {
|
if (pad_has_status(pad, PAD_AXES_UPDATED)) {
|
||||||
pad_check_notify_axes(pad, device, time);
|
pad_check_notify_axes(pad, device, time);
|
||||||
|
|
@ -594,7 +594,7 @@ static void
|
||||||
pad_process_event(struct evdev_dispatch *dispatch,
|
pad_process_event(struct evdev_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 pad_dispatch *pad = pad_dispatch(dispatch);
|
struct pad_dispatch *pad = pad_dispatch(dispatch);
|
||||||
|
|
||||||
|
|
@ -629,7 +629,7 @@ static void
|
||||||
pad_process(struct evdev_dispatch *dispatch,
|
pad_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);
|
||||||
|
|
@ -822,7 +822,7 @@ pad_init(struct pad_dispatch *pad, struct evdev_device *device)
|
||||||
pad->device = device;
|
pad->device = device;
|
||||||
pad->status = PAD_NONE;
|
pad->status = PAD_NONE;
|
||||||
pad->changed_axes = PAD_AXIS_NONE;
|
pad->changed_axes = PAD_AXIS_NONE;
|
||||||
ratelimit_init(&pad->modes.group_not_found, usec_from_hours(1), 3);
|
ratelimit_init(&pad->modes.group_not_found, h2us(1), 3);
|
||||||
|
|
||||||
/* We expect the kernel to either give us both axes as hires or neither.
|
/* We expect the kernel to either give us both axes as hires or neither.
|
||||||
* Getting one is a kernel bug we don't need to care about */
|
* Getting one is a kernel bug we don't need to care about */
|
||||||
|
|
@ -842,7 +842,7 @@ pad_init(struct pad_dispatch *pad, struct evdev_device *device)
|
||||||
rc = pad_init_leds(pad, device, wacom);
|
rc = pad_init_leds(pad, device, wacom);
|
||||||
|
|
||||||
/* at most 5 "Multiple EV_ABS events" log messages per hour */
|
/* at most 5 "Multiple EV_ABS events" log messages per hour */
|
||||||
ratelimit_init(&pad->duplicate_abs_limit, usec_from_seconds(60 * 60), 5);
|
ratelimit_init(&pad->duplicate_abs_limit, s2us(60 * 60), 5);
|
||||||
|
|
||||||
#ifdef HAVE_LIBWACOM
|
#ifdef HAVE_LIBWACOM
|
||||||
if (wacom)
|
if (wacom)
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ tablet_filter_axis_fuzz(const struct tablet_dispatch *tablet,
|
||||||
|
|
||||||
fuzz = libevdev_get_abs_fuzz(device->evdev, evdev_usage_code(e->usage));
|
fuzz = libevdev_get_abs_fuzz(device->evdev, evdev_usage_code(e->usage));
|
||||||
|
|
||||||
/* ABS_DISTANCE doesn't have fuzz set and causes continuous
|
/* ABS_DISTANCE doesn't have have fuzz set and causes continuous
|
||||||
* updates for the cursor/lens tools. Add a minimum fuzz of 2, same
|
* updates for the cursor/lens tools. Add a minimum fuzz of 2, same
|
||||||
* as the xf86-input-wacom driver
|
* as the xf86-input-wacom driver
|
||||||
*/
|
*/
|
||||||
|
|
@ -197,7 +197,7 @@ static void
|
||||||
tablet_process_absolute(struct tablet_dispatch *tablet,
|
tablet_process_absolute(struct tablet_dispatch *tablet,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
struct evdev_event *e,
|
struct evdev_event *e,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
enum libinput_tablet_tool_axis axis;
|
enum libinput_tablet_tool_axis axis;
|
||||||
|
|
||||||
|
|
@ -557,7 +557,7 @@ tablet_tool_process_delta(struct tablet_dispatch *tablet,
|
||||||
struct libinput_tablet_tool *tool,
|
struct libinput_tablet_tool *tool,
|
||||||
const struct evdev_device *device,
|
const struct evdev_device *device,
|
||||||
struct tablet_axes *axes,
|
struct tablet_axes *axes,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
const struct normalized_coords zero = { 0.0, 0.0 };
|
const struct normalized_coords zero = { 0.0, 0.0 };
|
||||||
struct device_coords delta = { 0, 0 };
|
struct device_coords delta = { 0, 0 };
|
||||||
|
|
@ -759,7 +759,7 @@ tablet_check_notify_axes(struct tablet_dispatch *tablet,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
struct libinput_tablet_tool *tool,
|
struct libinput_tablet_tool *tool,
|
||||||
struct tablet_axes *axes_out,
|
struct tablet_axes *axes_out,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
struct tablet_axes axes = { 0 };
|
struct tablet_axes axes = { 0 };
|
||||||
const char tmp[sizeof(tablet->changed_axes)] = { 0 };
|
const char tmp[sizeof(tablet->changed_axes)] = { 0 };
|
||||||
|
|
@ -884,7 +884,7 @@ static void
|
||||||
tablet_process_key(struct tablet_dispatch *tablet,
|
tablet_process_key(struct tablet_dispatch *tablet,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
struct evdev_event *e,
|
struct evdev_event *e,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
enum libinput_tablet_tool_type type;
|
enum libinput_tablet_tool_type type;
|
||||||
|
|
||||||
|
|
@ -930,7 +930,7 @@ static void
|
||||||
tablet_process_relative(struct tablet_dispatch *tablet,
|
tablet_process_relative(struct tablet_dispatch *tablet,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
struct evdev_event *e,
|
struct evdev_event *e,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
enum libinput_tablet_tool_axis axis;
|
enum libinput_tablet_tool_axis axis;
|
||||||
|
|
||||||
|
|
@ -960,7 +960,7 @@ static void
|
||||||
tablet_process_misc(struct tablet_dispatch *tablet,
|
tablet_process_misc(struct tablet_dispatch *tablet,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
struct evdev_event *e,
|
struct evdev_event *e,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
switch (evdev_usage_enum(e->usage)) {
|
switch (evdev_usage_enum(e->usage)) {
|
||||||
case EVDEV_MSC_SERIAL:
|
case EVDEV_MSC_SERIAL:
|
||||||
|
|
@ -1311,6 +1311,18 @@ eraser_button_get_default_mode(struct libinput_tablet_tool *tool)
|
||||||
static enum libinput_config_status
|
static enum libinput_config_status
|
||||||
eraser_button_set_button(struct libinput_tablet_tool *tool, uint32_t button)
|
eraser_button_set_button(struct libinput_tablet_tool *tool, uint32_t button)
|
||||||
{
|
{
|
||||||
|
switch (button) {
|
||||||
|
case BTN_STYLUS:
|
||||||
|
case BTN_STYLUS2:
|
||||||
|
case BTN_STYLUS3:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
log_bug_libinput(libinput_device_get_context(tool->last_device),
|
||||||
|
"Unsupported eraser button 0x%x",
|
||||||
|
button);
|
||||||
|
return LIBINPUT_CONFIG_STATUS_INVALID;
|
||||||
|
}
|
||||||
|
|
||||||
tool->eraser_button.want_button = button;
|
tool->eraser_button.want_button = button;
|
||||||
|
|
||||||
eraser_button_toggle(tool);
|
eraser_button_toggle(tool);
|
||||||
|
|
@ -1510,7 +1522,7 @@ tablet_get_tool(struct tablet_dispatch *tablet,
|
||||||
static void
|
static void
|
||||||
tablet_notify_button_mask(struct tablet_dispatch *tablet,
|
tablet_notify_button_mask(struct tablet_dispatch *tablet,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
struct libinput_tablet_tool *tool,
|
struct libinput_tablet_tool *tool,
|
||||||
const struct button_state *buttons,
|
const struct button_state *buttons,
|
||||||
enum libinput_button_state state)
|
enum libinput_button_state state)
|
||||||
|
|
@ -1544,7 +1556,7 @@ tablet_notify_button_mask(struct tablet_dispatch *tablet,
|
||||||
static void
|
static void
|
||||||
tablet_notify_buttons(struct tablet_dispatch *tablet,
|
tablet_notify_buttons(struct tablet_dispatch *tablet,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
struct libinput_tablet_tool *tool,
|
struct libinput_tablet_tool *tool,
|
||||||
enum libinput_button_state state)
|
enum libinput_button_state state)
|
||||||
{
|
{
|
||||||
|
|
@ -1905,7 +1917,7 @@ tablet_calculate_arbitration_rect(struct tablet_dispatch *tablet)
|
||||||
static inline void
|
static inline void
|
||||||
tablet_update_touch_device_rect(struct tablet_dispatch *tablet,
|
tablet_update_touch_device_rect(struct tablet_dispatch *tablet,
|
||||||
const struct tablet_axes *axes,
|
const struct tablet_axes *axes,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
struct evdev_dispatch *dispatch;
|
struct evdev_dispatch *dispatch;
|
||||||
struct phys_rect rect = { 0 };
|
struct phys_rect rect = { 0 };
|
||||||
|
|
@ -1929,7 +1941,7 @@ tablet_send_proximity_in(struct tablet_dispatch *tablet,
|
||||||
struct libinput_tablet_tool *tool,
|
struct libinput_tablet_tool *tool,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
struct tablet_axes *axes,
|
struct tablet_axes *axes,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
if (!tablet_has_status(tablet, TABLET_TOOL_ENTERING_PROXIMITY))
|
if (!tablet_has_status(tablet, TABLET_TOOL_ENTERING_PROXIMITY))
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1957,7 +1969,7 @@ tablet_send_proximity_out(struct tablet_dispatch *tablet,
|
||||||
struct libinput_tablet_tool *tool,
|
struct libinput_tablet_tool *tool,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
struct tablet_axes *axes,
|
struct tablet_axes *axes,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
if (tablet_has_status(tablet, TABLET_TOOL_LEAVING_PROXIMITY) &&
|
if (tablet_has_status(tablet, TABLET_TOOL_LEAVING_PROXIMITY) &&
|
||||||
!tablet_has_status(tablet, TABLET_TOOL_OUTSIDE_AREA)) {
|
!tablet_has_status(tablet, TABLET_TOOL_OUTSIDE_AREA)) {
|
||||||
|
|
@ -1977,7 +1989,7 @@ tablet_send_tip(struct tablet_dispatch *tablet,
|
||||||
struct libinput_tablet_tool *tool,
|
struct libinput_tablet_tool *tool,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
struct tablet_axes *axes,
|
struct tablet_axes *axes,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
if (tablet_has_status(tablet, TABLET_TOOL_ENTERING_CONTACT)) {
|
if (tablet_has_status(tablet, TABLET_TOOL_ENTERING_CONTACT)) {
|
||||||
tablet_notify_tip(&device->base,
|
tablet_notify_tip(&device->base,
|
||||||
|
|
@ -2027,7 +2039,7 @@ tablet_send_axes(struct tablet_dispatch *tablet,
|
||||||
struct libinput_tablet_tool *tool,
|
struct libinput_tablet_tool *tool,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
struct tablet_axes *axes,
|
struct tablet_axes *axes,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
enum libinput_tablet_tool_tip_state tip_state;
|
enum libinput_tablet_tool_tip_state tip_state;
|
||||||
|
|
||||||
|
|
@ -2057,7 +2069,7 @@ static inline void
|
||||||
tablet_send_buttons(struct tablet_dispatch *tablet,
|
tablet_send_buttons(struct tablet_dispatch *tablet,
|
||||||
struct libinput_tablet_tool *tool,
|
struct libinput_tablet_tool *tool,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
if (tablet_has_status(tablet, TABLET_BUTTONS_RELEASED)) {
|
if (tablet_has_status(tablet, TABLET_BUTTONS_RELEASED)) {
|
||||||
tablet_notify_buttons(tablet,
|
tablet_notify_buttons(tablet,
|
||||||
|
|
@ -2082,7 +2094,7 @@ static void
|
||||||
tablet_send_events(struct tablet_dispatch *tablet,
|
tablet_send_events(struct tablet_dispatch *tablet,
|
||||||
struct libinput_tablet_tool *tool,
|
struct libinput_tablet_tool *tool,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
struct tablet_axes axes = { 0 };
|
struct tablet_axes axes = { 0 };
|
||||||
|
|
||||||
|
|
@ -2119,7 +2131,7 @@ tablet_send_events(struct tablet_dispatch *tablet,
|
||||||
static void
|
static void
|
||||||
tablet_update_tool_state(struct tablet_dispatch *tablet,
|
tablet_update_tool_state(struct tablet_dispatch *tablet,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
enum libinput_tablet_tool_type type;
|
enum libinput_tablet_tool_type type;
|
||||||
uint32_t changed;
|
uint32_t changed;
|
||||||
|
|
@ -2194,7 +2206,7 @@ update_pressure_range(struct tablet_dispatch *tablet,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tablet_flush(struct tablet_dispatch *tablet, struct evdev_device *device, usec_t time)
|
tablet_flush(struct tablet_dispatch *tablet, struct evdev_device *device, uint64_t time)
|
||||||
{
|
{
|
||||||
struct libinput_tablet_tool *tool;
|
struct libinput_tablet_tool *tool;
|
||||||
|
|
||||||
|
|
@ -2278,7 +2290,7 @@ static inline void
|
||||||
tablet_set_touch_device_enabled(struct tablet_dispatch *tablet,
|
tablet_set_touch_device_enabled(struct tablet_dispatch *tablet,
|
||||||
enum evdev_arbitration_state which,
|
enum evdev_arbitration_state which,
|
||||||
const struct phys_rect *rect,
|
const struct phys_rect *rect,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
struct evdev_device *touch_device = tablet->touch_device;
|
struct evdev_device *touch_device = tablet->touch_device;
|
||||||
struct evdev_dispatch *dispatch;
|
struct evdev_dispatch *dispatch;
|
||||||
|
|
@ -2300,7 +2312,7 @@ tablet_set_touch_device_enabled(struct tablet_dispatch *tablet,
|
||||||
static inline void
|
static inline void
|
||||||
tablet_toggle_touch_device(struct tablet_dispatch *tablet,
|
tablet_toggle_touch_device(struct tablet_dispatch *tablet,
|
||||||
struct evdev_device *tablet_device,
|
struct evdev_device *tablet_device,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
enum evdev_arbitration_state which;
|
enum evdev_arbitration_state which;
|
||||||
struct phys_rect r = { 0 };
|
struct phys_rect r = { 0 };
|
||||||
|
|
@ -2347,7 +2359,7 @@ static void
|
||||||
tablet_process_event(struct evdev_dispatch *dispatch,
|
tablet_process_event(struct evdev_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 tablet_dispatch *tablet = tablet_dispatch(dispatch);
|
struct tablet_dispatch *tablet = tablet_dispatch(dispatch);
|
||||||
|
|
||||||
|
|
@ -2383,7 +2395,7 @@ static void
|
||||||
tablet_process(struct evdev_dispatch *dispatch,
|
tablet_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);
|
||||||
|
|
@ -2398,7 +2410,7 @@ tablet_suspend(struct evdev_dispatch *dispatch, struct evdev_device *device)
|
||||||
{
|
{
|
||||||
struct tablet_dispatch *tablet = tablet_dispatch(dispatch);
|
struct tablet_dispatch *tablet = tablet_dispatch(dispatch);
|
||||||
struct libinput *li = tablet_libinput_context(tablet);
|
struct libinput *li = tablet_libinput_context(tablet);
|
||||||
usec_t now = libinput_now(li);
|
uint64_t now = libinput_now(li);
|
||||||
|
|
||||||
tablet_set_touch_device_enabled(tablet, ARBITRATION_NOT_ACTIVE, NULL, now);
|
tablet_set_touch_device_enabled(tablet, ARBITRATION_NOT_ACTIVE, NULL, now);
|
||||||
|
|
||||||
|
|
@ -2465,7 +2477,7 @@ tablet_setup_touch_arbitration(struct evdev_device *device,
|
||||||
struct libinput_device_group *group2 =
|
struct libinput_device_group *group2 =
|
||||||
libinput_device_get_device_group(&new_device->base);
|
libinput_device_get_device_group(&new_device->base);
|
||||||
|
|
||||||
/* same physical device? -> better, otherwise keep the one we have */
|
/* same phsical device? -> better, otherwise keep the one we have */
|
||||||
if (group1 != group2)
|
if (group1 != group2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ totem_new_tool(struct totem_dispatch *totem)
|
||||||
static inline void
|
static inline void
|
||||||
totem_set_touch_device_enabled(struct totem_dispatch *totem,
|
totem_set_touch_device_enabled(struct totem_dispatch *totem,
|
||||||
bool enable_touch_device,
|
bool enable_touch_device,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
struct evdev_device *touch_device = totem->touch_device;
|
struct evdev_device *touch_device = totem->touch_device;
|
||||||
struct evdev_dispatch *dispatch;
|
struct evdev_dispatch *dispatch;
|
||||||
|
|
@ -183,7 +183,7 @@ static void
|
||||||
totem_process_key(struct totem_dispatch *totem,
|
totem_process_key(struct totem_dispatch *totem,
|
||||||
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)
|
||||||
|
|
@ -205,7 +205,7 @@ static void
|
||||||
totem_process_abs(struct totem_dispatch *totem,
|
totem_process_abs(struct totem_dispatch *totem,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
struct evdev_event *e,
|
struct evdev_event *e,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
struct totem_slot *slot = &totem->slots[totem->slot];
|
struct totem_slot *slot = &totem->slots[totem->slot];
|
||||||
|
|
||||||
|
|
@ -263,7 +263,7 @@ totem_slot_fetch_axes(struct totem_dispatch *totem,
|
||||||
struct totem_slot *slot,
|
struct totem_slot *slot,
|
||||||
struct libinput_tablet_tool *tool,
|
struct libinput_tablet_tool *tool,
|
||||||
struct tablet_axes *axes_out,
|
struct tablet_axes *axes_out,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
struct evdev_device *device = totem->device;
|
struct evdev_device *device = totem->device;
|
||||||
const char tmp[sizeof(slot->changed_axes)] = { 0 };
|
const char tmp[sizeof(slot->changed_axes)] = { 0 };
|
||||||
|
|
@ -358,7 +358,7 @@ slot_axes_initialize(struct totem_dispatch *totem, struct totem_slot *slot)
|
||||||
static enum totem_slot_state
|
static enum totem_slot_state
|
||||||
totem_handle_slot_state(struct totem_dispatch *totem,
|
totem_handle_slot_state(struct totem_dispatch *totem,
|
||||||
struct totem_slot *slot,
|
struct totem_slot *slot,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
struct evdev_device *device = totem->device;
|
struct evdev_device *device = totem->device;
|
||||||
struct tablet_axes axes;
|
struct tablet_axes axes;
|
||||||
|
|
@ -493,7 +493,7 @@ totem_handle_slot_state(struct totem_dispatch *totem,
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum totem_slot_state
|
static enum totem_slot_state
|
||||||
totem_handle_state(struct totem_dispatch *totem, usec_t time)
|
totem_handle_state(struct totem_dispatch *totem, uint64_t time)
|
||||||
{
|
{
|
||||||
enum totem_slot_state global_state = SLOT_STATE_NONE;
|
enum totem_slot_state global_state = SLOT_STATE_NONE;
|
||||||
|
|
||||||
|
|
@ -514,7 +514,7 @@ static void
|
||||||
totem_process_event(struct evdev_dispatch *dispatch,
|
totem_process_event(struct evdev_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 totem_dispatch *totem = totem_dispatch(dispatch);
|
struct totem_dispatch *totem = totem_dispatch(dispatch);
|
||||||
enum totem_slot_state global_state;
|
enum totem_slot_state global_state;
|
||||||
|
|
@ -549,7 +549,7 @@ static void
|
||||||
totem_interface_process(struct evdev_dispatch *dispatch,
|
totem_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);
|
||||||
|
|
@ -563,7 +563,7 @@ static void
|
||||||
totem_interface_suspend(struct evdev_dispatch *dispatch, struct evdev_device *device)
|
totem_interface_suspend(struct evdev_dispatch *dispatch, struct evdev_device *device)
|
||||||
{
|
{
|
||||||
struct totem_dispatch *totem = totem_dispatch(dispatch);
|
struct totem_dispatch *totem = totem_dispatch(dispatch);
|
||||||
usec_t now = libinput_now(evdev_libinput_context(device));
|
uint64_t now = libinput_now(evdev_libinput_context(device));
|
||||||
|
|
||||||
for (size_t i = 0; i < totem->nslots; i++) {
|
for (size_t i = 0; i < totem->nslots; i++) {
|
||||||
struct totem_slot *slot = &totem->slots[i];
|
struct totem_slot *slot = &totem->slots[i];
|
||||||
|
|
@ -682,7 +682,7 @@ totem_interface_initial_proximity(struct evdev_device *device,
|
||||||
struct evdev_dispatch *dispatch)
|
struct evdev_dispatch *dispatch)
|
||||||
{
|
{
|
||||||
struct totem_dispatch *totem = totem_dispatch(dispatch);
|
struct totem_dispatch *totem = totem_dispatch(dispatch);
|
||||||
usec_t now = libinput_now(evdev_libinput_context(device));
|
uint64_t now = libinput_now(evdev_libinput_context(device));
|
||||||
bool enable_touch = true;
|
bool enable_touch = true;
|
||||||
|
|
||||||
for (size_t i = 0; i < totem->nslots; i++) {
|
for (size_t i = 0; i < totem->nslots; i++) {
|
||||||
|
|
|
||||||
98
src/evdev.c
98
src/evdev.c
|
|
@ -53,8 +53,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_WHEEL_CLICK_ANGLE 15
|
#define DEFAULT_WHEEL_CLICK_ANGLE 15
|
||||||
#define DEFAULT_BUTTON_SCROLL_TIMEOUT usec_from_millis(200)
|
#define DEFAULT_BUTTON_SCROLL_TIMEOUT ms2us(200)
|
||||||
#define SCROLL_BUTTON_LOCK_GRACE_TIMEOUT usec_from_millis(500)
|
|
||||||
|
|
||||||
enum evdev_device_udev_tags {
|
enum evdev_device_udev_tags {
|
||||||
EVDEV_UDEV_TAG_NONE = 0,
|
EVDEV_UDEV_TAG_NONE = 0,
|
||||||
|
|
@ -168,7 +167,7 @@ evdev_device_switch_get_state(struct evdev_device *device, enum libinput_switch
|
||||||
|
|
||||||
void
|
void
|
||||||
evdev_pointer_notify_physical_button(struct evdev_device *device,
|
evdev_pointer_notify_physical_button(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)
|
||||||
{
|
{
|
||||||
|
|
@ -180,7 +179,7 @@ evdev_pointer_notify_physical_button(struct evdev_device *device,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evdev_pointer_post_button(struct evdev_device *device,
|
evdev_pointer_post_button(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)
|
||||||
{
|
{
|
||||||
|
|
@ -206,7 +205,7 @@ evdev_pointer_post_button(struct evdev_device *device,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evdev_button_scroll_timeout(usec_t time, void *data)
|
evdev_button_scroll_timeout(uint64_t time, void *data)
|
||||||
{
|
{
|
||||||
struct evdev_device *device = data;
|
struct evdev_device *device = data;
|
||||||
|
|
||||||
|
|
@ -214,7 +213,7 @@ evdev_button_scroll_timeout(usec_t time, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
evdev_button_scroll_button(struct evdev_device *device, usec_t time, int is_press)
|
evdev_button_scroll_button(struct evdev_device *device, uint64_t time, int is_press)
|
||||||
{
|
{
|
||||||
/* Where the button lock is enabled, we wrap the buttons into
|
/* Where the button lock is enabled, we wrap the buttons into
|
||||||
their own little state machine and filter out the events.
|
their own little state machine and filter out the events.
|
||||||
|
|
@ -229,15 +228,6 @@ evdev_button_scroll_button(struct evdev_device *device, usec_t time, int is_pres
|
||||||
break; /* handle event */
|
break; /* handle event */
|
||||||
case BUTTONSCROLL_LOCK_FIRSTDOWN:
|
case BUTTONSCROLL_LOCK_FIRSTDOWN:
|
||||||
assert(!is_press);
|
assert(!is_press);
|
||||||
if (device->scroll.button_scroll_state == BUTTONSCROLL_SCROLLING &&
|
|
||||||
usec_cmp(usec_delta(time, device->scroll.button_down_time),
|
|
||||||
SCROLL_BUTTON_LOCK_GRACE_TIMEOUT) >= 0) {
|
|
||||||
/* held + scrolled past grace period: temporary scroll,
|
|
||||||
* no lock engaged */
|
|
||||||
device->scroll.lock_state = BUTTONSCROLL_LOCK_IDLE;
|
|
||||||
evdev_log_debug(device, "scroll lock: temp scroll done\n");
|
|
||||||
break; /* pass release through */
|
|
||||||
}
|
|
||||||
device->scroll.lock_state = BUTTONSCROLL_LOCK_FIRSTUP;
|
device->scroll.lock_state = BUTTONSCROLL_LOCK_FIRSTUP;
|
||||||
evdev_log_debug(device, "scroll lock: first up\n");
|
evdev_log_debug(device, "scroll lock: first up\n");
|
||||||
return; /* filter release event */
|
return; /* filter release event */
|
||||||
|
|
@ -275,10 +265,9 @@ evdev_button_scroll_button(struct evdev_device *device, usec_t time, int is_pres
|
||||||
flags = TIMER_FLAG_ALLOW_NEGATIVE;
|
flags = TIMER_FLAG_ALLOW_NEGATIVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
libinput_timer_set_flags(
|
libinput_timer_set_flags(&device->scroll.timer,
|
||||||
&device->scroll.timer,
|
time + DEFAULT_BUTTON_SCROLL_TIMEOUT,
|
||||||
usec_add(time, DEFAULT_BUTTON_SCROLL_TIMEOUT),
|
flags);
|
||||||
flags);
|
|
||||||
} else {
|
} else {
|
||||||
/* For extra mouse buttons numbered 6 or more (0x115+) we assume
|
/* For extra mouse buttons numbered 6 or more (0x115+) we assume
|
||||||
* it is dedicated exclusively to scrolling, so we don't apply
|
* it is dedicated exclusively to scrolling, so we don't apply
|
||||||
|
|
@ -325,7 +314,7 @@ evdev_button_scroll_button(struct evdev_device *device, usec_t time, int is_pres
|
||||||
|
|
||||||
void
|
void
|
||||||
evdev_pointer_notify_button(struct evdev_device *device,
|
evdev_pointer_notify_button(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)
|
||||||
{
|
{
|
||||||
|
|
@ -405,7 +394,7 @@ evdev_device_transform_y(struct evdev_device *device, double y, uint32_t height)
|
||||||
|
|
||||||
void
|
void
|
||||||
evdev_notify_axis_legacy_wheel(struct evdev_device *device,
|
evdev_notify_axis_legacy_wheel(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
uint32_t axes,
|
uint32_t axes,
|
||||||
const struct normalized_coords *delta_in,
|
const struct normalized_coords *delta_in,
|
||||||
const struct discrete_coords *discrete_in)
|
const struct discrete_coords *discrete_in)
|
||||||
|
|
@ -430,7 +419,7 @@ evdev_notify_axis_legacy_wheel(struct evdev_device *device,
|
||||||
|
|
||||||
void
|
void
|
||||||
evdev_notify_axis_wheel(struct evdev_device *device,
|
evdev_notify_axis_wheel(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
uint32_t axes,
|
uint32_t axes,
|
||||||
const struct normalized_coords *delta_in,
|
const struct normalized_coords *delta_in,
|
||||||
const struct wheel_v120 *v120_in)
|
const struct wheel_v120 *v120_in)
|
||||||
|
|
@ -455,7 +444,7 @@ evdev_notify_axis_wheel(struct evdev_device *device,
|
||||||
|
|
||||||
void
|
void
|
||||||
evdev_notify_axis_finger(struct evdev_device *device,
|
evdev_notify_axis_finger(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
uint32_t axes,
|
uint32_t axes,
|
||||||
const struct normalized_coords *delta_in)
|
const struct normalized_coords *delta_in)
|
||||||
{
|
{
|
||||||
|
|
@ -471,7 +460,7 @@ evdev_notify_axis_finger(struct evdev_device *device,
|
||||||
|
|
||||||
void
|
void
|
||||||
evdev_notify_axis_continous(struct evdev_device *device,
|
evdev_notify_axis_continous(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
uint32_t axes,
|
uint32_t axes,
|
||||||
const struct normalized_coords *delta_in)
|
const struct normalized_coords *delta_in)
|
||||||
{
|
{
|
||||||
|
|
@ -499,7 +488,6 @@ static void
|
||||||
evdev_tag_trackpoint(struct evdev_device *device, struct udev_device *udev_device)
|
evdev_tag_trackpoint(struct evdev_device *device, struct udev_device *udev_device)
|
||||||
{
|
{
|
||||||
char *prop;
|
char *prop;
|
||||||
const char *udev_prop;
|
|
||||||
|
|
||||||
if (!libevdev_has_property(device->evdev, INPUT_PROP_POINTING_STICK) &&
|
if (!libevdev_has_property(device->evdev, INPUT_PROP_POINTING_STICK) &&
|
||||||
!parse_udev_flag(device, udev_device, "ID_INPUT_POINTINGSTICK"))
|
!parse_udev_flag(device, udev_device, "ID_INPUT_POINTINGSTICK"))
|
||||||
|
|
@ -507,22 +495,10 @@ evdev_tag_trackpoint(struct evdev_device *device, struct udev_device *udev_devic
|
||||||
|
|
||||||
device->tags |= EVDEV_TAG_TRACKPOINT;
|
device->tags |= EVDEV_TAG_TRACKPOINT;
|
||||||
|
|
||||||
udev_prop = udev_device_get_property_value(udev_device, "ID_INTEGRATION");
|
|
||||||
if (udev_prop) {
|
|
||||||
if (streq(udev_prop, "internal")) {
|
|
||||||
/* noop, this is the default anyway */
|
|
||||||
} else if (streq(udev_prop, "external"))
|
|
||||||
device->tags |= EVDEV_TAG_EXTERNAL_MOUSE;
|
|
||||||
else
|
|
||||||
evdev_log_info(device,
|
|
||||||
"tagged with unknown value %s\n",
|
|
||||||
udev_prop);
|
|
||||||
}
|
|
||||||
|
|
||||||
_unref_(quirks) *q = libinput_device_get_quirks(&device->base);
|
_unref_(quirks) *q = libinput_device_get_quirks(&device->base);
|
||||||
if (q && quirks_get_string(q, QUIRK_ATTR_TRACKPOINT_INTEGRATION, &prop)) {
|
if (q && quirks_get_string(q, QUIRK_ATTR_TRACKPOINT_INTEGRATION, &prop)) {
|
||||||
if (streq(prop, "internal")) {
|
if (streq(prop, "internal")) {
|
||||||
device->tags &= ~EVDEV_TAG_EXTERNAL_MOUSE;
|
/* noop, this is the default anyway */
|
||||||
} else if (streq(prop, "external")) {
|
} else if (streq(prop, "external")) {
|
||||||
device->tags |= EVDEV_TAG_EXTERNAL_MOUSE;
|
device->tags |= EVDEV_TAG_EXTERNAL_MOUSE;
|
||||||
evdev_log_info(device, "is an external pointing stick\n");
|
evdev_log_info(device, "is an external pointing stick\n");
|
||||||
|
|
@ -550,7 +526,6 @@ static void
|
||||||
evdev_tag_keyboard(struct evdev_device *device, struct udev_device *udev_device)
|
evdev_tag_keyboard(struct evdev_device *device, struct udev_device *udev_device)
|
||||||
{
|
{
|
||||||
char *prop;
|
char *prop;
|
||||||
const char *udev_prop;
|
|
||||||
int code;
|
int code;
|
||||||
|
|
||||||
if (!libevdev_has_event_type(device->evdev, EV_KEY))
|
if (!libevdev_has_event_type(device->evdev, EV_KEY))
|
||||||
|
|
@ -561,18 +536,6 @@ evdev_tag_keyboard(struct evdev_device *device, struct udev_device *udev_device)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
udev_prop = udev_device_get_property_value(udev_device, "ID_INTEGRATION");
|
|
||||||
if (udev_prop) {
|
|
||||||
if (streq(udev_prop, "internal"))
|
|
||||||
evdev_tag_keyboard_internal(device);
|
|
||||||
else if (streq(udev_prop, "external"))
|
|
||||||
evdev_tag_keyboard_external(device);
|
|
||||||
else
|
|
||||||
evdev_log_info(device,
|
|
||||||
"tagged with unknown value %s\n",
|
|
||||||
udev_prop);
|
|
||||||
}
|
|
||||||
|
|
||||||
_unref_(quirks) *q = libinput_device_get_quirks(&device->base);
|
_unref_(quirks) *q = libinput_device_get_quirks(&device->base);
|
||||||
if (q && quirks_get_string(q, QUIRK_ATTR_KEYBOARD_INTEGRATION, &prop)) {
|
if (q && quirks_get_string(q, QUIRK_ATTR_KEYBOARD_INTEGRATION, &prop)) {
|
||||||
if (streq(prop, "internal")) {
|
if (streq(prop, "internal")) {
|
||||||
|
|
@ -1051,7 +1014,7 @@ evdev_note_time_delay(struct evdev_device *device, const struct input_event *ev)
|
||||||
{
|
{
|
||||||
struct libinput *libinput = evdev_libinput_context(device);
|
struct libinput *libinput = evdev_libinput_context(device);
|
||||||
uint32_t tdelta;
|
uint32_t tdelta;
|
||||||
usec_t eventtime = input_event_time(ev);
|
uint64_t eventtime = input_event_time(ev);
|
||||||
|
|
||||||
/* if we have a current libinput_dispatch() snapshot, compare our
|
/* if we have a current libinput_dispatch() snapshot, compare our
|
||||||
* event time with the one from the snapshot. If we have more than
|
* event time with the one from the snapshot. If we have more than
|
||||||
|
|
@ -1059,11 +1022,10 @@ evdev_note_time_delay(struct evdev_device *device, const struct input_event *ev)
|
||||||
* where there is no steady event flow and thus SYN_DROPPED may not
|
* where there is no steady event flow and thus SYN_DROPPED may not
|
||||||
* get hit by the kernel despite us being too slow.
|
* get hit by the kernel despite us being too slow.
|
||||||
*/
|
*/
|
||||||
if (usec_is_zero(libinput->dispatch_time) ||
|
if (libinput->dispatch_time == 0 || eventtime > libinput->dispatch_time)
|
||||||
usec_cmp(eventtime, libinput->dispatch_time) > 0)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tdelta = usec_to_millis(usec_delta(libinput->dispatch_time, eventtime));
|
tdelta = us2ms(libinput->dispatch_time - eventtime);
|
||||||
if (tdelta > 20) {
|
if (tdelta > 20) {
|
||||||
evdev_log_bug_client_ratelimit(
|
evdev_log_bug_client_ratelimit(
|
||||||
device,
|
device,
|
||||||
|
|
@ -1361,7 +1323,7 @@ evdev_read_wheel_click_count_prop(struct evdev_device *device,
|
||||||
|
|
||||||
evdev_log_error(device,
|
evdev_log_error(device,
|
||||||
"mouse wheel click count is present but invalid, "
|
"mouse wheel click count is present but invalid, "
|
||||||
"using %d degrees for angle instead\n",
|
"using %d degrees for angle instead instead\n",
|
||||||
DEFAULT_WHEEL_CLICK_ANGLE);
|
DEFAULT_WHEEL_CLICK_ANGLE);
|
||||||
*angle = DEFAULT_WHEEL_CLICK_ANGLE;
|
*angle = DEFAULT_WHEEL_CLICK_ANGLE;
|
||||||
|
|
||||||
|
|
@ -1810,9 +1772,9 @@ evdev_disable_accelerometer_axes(struct evdev_device *device)
|
||||||
libevdev_disable_event_code(evdev, EV_ABS, ABS_Y);
|
libevdev_disable_event_code(evdev, EV_ABS, ABS_Y);
|
||||||
libevdev_disable_event_code(evdev, EV_ABS, ABS_Z);
|
libevdev_disable_event_code(evdev, EV_ABS, ABS_Z);
|
||||||
|
|
||||||
libevdev_disable_event_code(evdev, EV_REL, REL_X);
|
libevdev_disable_event_code(evdev, EV_ABS, REL_X);
|
||||||
libevdev_disable_event_code(evdev, EV_REL, REL_Y);
|
libevdev_disable_event_code(evdev, EV_ABS, REL_Y);
|
||||||
libevdev_disable_event_code(evdev, EV_REL, REL_Z);
|
libevdev_disable_event_code(evdev, EV_ABS, REL_Z);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
|
@ -2037,11 +1999,6 @@ evdev_configure_device(struct evdev_device *device,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (libevdev_has_event_code(evdev, EV_SW, SW_KEYPAD_SLIDE)) {
|
|
||||||
device->seat_caps |= EVDEV_DEVICE_SWITCH;
|
|
||||||
device->tags |= EVDEV_TAG_KEYPAD_SLIDE_SWITCH;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (device->seat_caps & EVDEV_DEVICE_SWITCH)
|
if (device->seat_caps & EVDEV_DEVICE_SWITCH)
|
||||||
evdev_log_info(device, "device is a switch device\n");
|
evdev_log_info(device, "device is a switch device\n");
|
||||||
}
|
}
|
||||||
|
|
@ -2351,11 +2308,11 @@ evdev_device_create(struct libinput_seat *seat, struct udev_device *udev_device)
|
||||||
device->dpi = DEFAULT_MOUSE_DPI;
|
device->dpi = DEFAULT_MOUSE_DPI;
|
||||||
|
|
||||||
/* at most 5 SYN_DROPPED log-messages per 30s */
|
/* at most 5 SYN_DROPPED log-messages per 30s */
|
||||||
ratelimit_init(&device->syn_drop_limit, usec_from_seconds(30), 5);
|
ratelimit_init(&device->syn_drop_limit, s2us(30), 5);
|
||||||
/* at most 5 "delayed processing" log messages per hour */
|
/* at most 5 "delayed processing" log messages per hour */
|
||||||
ratelimit_init(&device->delay_warning_limit, usec_from_hours(1), 5);
|
ratelimit_init(&device->delay_warning_limit, s2us(60 * 60), 5);
|
||||||
/* at most 5 log-messages per 5s */
|
/* at most 5 log-messages per 5s */
|
||||||
ratelimit_init(&device->nonpointer_rel_limit, usec_from_seconds(5), 5);
|
ratelimit_init(&device->nonpointer_rel_limit, s2us(5), 5);
|
||||||
|
|
||||||
matrix_init_identity(&device->abs.calibration);
|
matrix_init_identity(&device->abs.calibration);
|
||||||
matrix_init_identity(&device->abs.usermatrix);
|
matrix_init_identity(&device->abs.usermatrix);
|
||||||
|
|
@ -2713,9 +2670,6 @@ evdev_device_has_switch(struct evdev_device *device, enum libinput_switch sw)
|
||||||
case LIBINPUT_SWITCH_TABLET_MODE:
|
case LIBINPUT_SWITCH_TABLET_MODE:
|
||||||
code = SW_TABLET_MODE;
|
code = SW_TABLET_MODE;
|
||||||
break;
|
break;
|
||||||
case LIBINPUT_SWITCH_KEYPAD_SLIDE:
|
|
||||||
code = SW_KEYPAD_SLIDE;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -2743,7 +2697,7 @@ evdev_start_scrolling(struct evdev_device *device, enum libinput_pointer_axis ax
|
||||||
|
|
||||||
void
|
void
|
||||||
evdev_post_scroll(struct evdev_device *device,
|
evdev_post_scroll(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum libinput_pointer_axis_source source,
|
enum libinput_pointer_axis_source source,
|
||||||
const struct normalized_coords *delta)
|
const struct normalized_coords *delta)
|
||||||
{
|
{
|
||||||
|
|
@ -2817,7 +2771,7 @@ evdev_post_scroll(struct evdev_device *device,
|
||||||
|
|
||||||
void
|
void
|
||||||
evdev_stop_scroll(struct evdev_device *device,
|
evdev_stop_scroll(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum libinput_pointer_axis_source source)
|
enum libinput_pointer_axis_source source)
|
||||||
{
|
{
|
||||||
const struct normalized_coords zero = { 0.0, 0.0 };
|
const struct normalized_coords zero = { 0.0, 0.0 };
|
||||||
|
|
|
||||||
46
src/evdev.h
46
src/evdev.h
|
|
@ -80,7 +80,6 @@ enum evdev_device_tags {
|
||||||
EVDEV_TAG_TABLET_MODE_SWITCH = bit(8),
|
EVDEV_TAG_TABLET_MODE_SWITCH = bit(8),
|
||||||
EVDEV_TAG_TABLET_TOUCHPAD = bit(9),
|
EVDEV_TAG_TABLET_TOUCHPAD = bit(9),
|
||||||
EVDEV_TAG_VIRTUAL = bit(10),
|
EVDEV_TAG_VIRTUAL = bit(10),
|
||||||
EVDEV_TAG_KEYPAD_SLIDE_SWITCH = bit(11),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum evdev_middlebutton_state {
|
enum evdev_middlebutton_state {
|
||||||
|
|
@ -219,7 +218,7 @@ struct evdev_device {
|
||||||
/* Currently enabled method, button */
|
/* Currently enabled method, button */
|
||||||
enum libinput_config_scroll_method method;
|
enum libinput_config_scroll_method method;
|
||||||
evdev_usage_t button;
|
evdev_usage_t button;
|
||||||
usec_t button_down_time;
|
uint64_t button_down_time;
|
||||||
|
|
||||||
/* set during device init, used at runtime to delay changes
|
/* set during device init, used at runtime to delay changes
|
||||||
* until all buttons are up */
|
* until all buttons are up */
|
||||||
|
|
@ -279,7 +278,7 @@ struct evdev_device {
|
||||||
enum evdev_middlebutton_state state;
|
enum evdev_middlebutton_state state;
|
||||||
struct libinput_timer timer;
|
struct libinput_timer timer;
|
||||||
uint32_t button_mask;
|
uint32_t button_mask;
|
||||||
usec_t first_event_time;
|
uint64_t first_event_time;
|
||||||
} middlebutton;
|
} middlebutton;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -298,7 +297,7 @@ struct evdev_dispatch_interface {
|
||||||
void (*process)(struct evdev_dispatch *dispatch,
|
void (*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);
|
||||||
|
|
||||||
/* Device is being suspended */
|
/* Device is being suspended */
|
||||||
void (*suspend)(struct evdev_dispatch *dispatch, struct evdev_device *device);
|
void (*suspend)(struct evdev_dispatch *dispatch, struct evdev_device *device);
|
||||||
|
|
@ -337,7 +336,7 @@ struct evdev_dispatch_interface {
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
enum evdev_arbitration_state which,
|
enum evdev_arbitration_state which,
|
||||||
const struct phys_rect *rect, /* may be NULL */
|
const struct phys_rect *rect, /* may be NULL */
|
||||||
usec_t now);
|
uint64_t now);
|
||||||
|
|
||||||
/* Called when touch arbitration is on, updates the area where touch
|
/* Called when touch arbitration is on, updates the area where touch
|
||||||
* arbitration should apply.
|
* arbitration should apply.
|
||||||
|
|
@ -345,7 +344,7 @@ struct evdev_dispatch_interface {
|
||||||
void (*touch_arbitration_update_rect)(struct evdev_dispatch *dispatch,
|
void (*touch_arbitration_update_rect)(struct evdev_dispatch *dispatch,
|
||||||
struct evdev_device *device,
|
struct evdev_device *device,
|
||||||
const struct phys_rect *rect,
|
const struct phys_rect *rect,
|
||||||
usec_t now);
|
uint64_t now);
|
||||||
|
|
||||||
/* Return the state of the given switch */
|
/* Return the state of the given switch */
|
||||||
enum libinput_switch_state (*get_switch_state)(struct evdev_dispatch *dispatch,
|
enum libinput_switch_state (*get_switch_state)(struct evdev_dispatch *dispatch,
|
||||||
|
|
@ -553,12 +552,12 @@ evdev_notify_resumed_device(struct evdev_device *device);
|
||||||
|
|
||||||
void
|
void
|
||||||
evdev_pointer_notify_button(struct evdev_device *device,
|
evdev_pointer_notify_button(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);
|
||||||
void
|
void
|
||||||
evdev_pointer_notify_physical_button(struct evdev_device *device,
|
evdev_pointer_notify_physical_button(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);
|
||||||
|
|
||||||
|
|
@ -579,36 +578,36 @@ evdev_update_key_down_count(struct evdev_device *device,
|
||||||
|
|
||||||
void
|
void
|
||||||
evdev_notify_axis_legacy_wheel(struct evdev_device *device,
|
evdev_notify_axis_legacy_wheel(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
uint32_t axes,
|
uint32_t axes,
|
||||||
const struct normalized_coords *delta_in,
|
const struct normalized_coords *delta_in,
|
||||||
const struct discrete_coords *discrete_in);
|
const struct discrete_coords *discrete_in);
|
||||||
void
|
void
|
||||||
evdev_notify_axis_wheel(struct evdev_device *device,
|
evdev_notify_axis_wheel(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
uint32_t axes,
|
uint32_t axes,
|
||||||
const struct normalized_coords *delta_in,
|
const struct normalized_coords *delta_in,
|
||||||
const struct wheel_v120 *v120_in);
|
const struct wheel_v120 *v120_in);
|
||||||
void
|
void
|
||||||
evdev_notify_axis_finger(struct evdev_device *device,
|
evdev_notify_axis_finger(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
uint32_t axes,
|
uint32_t axes,
|
||||||
const struct normalized_coords *delta_in);
|
const struct normalized_coords *delta_in);
|
||||||
void
|
void
|
||||||
evdev_notify_axis_continous(struct evdev_device *device,
|
evdev_notify_axis_continous(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
uint32_t axes,
|
uint32_t axes,
|
||||||
const struct normalized_coords *delta_in);
|
const struct normalized_coords *delta_in);
|
||||||
|
|
||||||
void
|
void
|
||||||
evdev_post_scroll(struct evdev_device *device,
|
evdev_post_scroll(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum libinput_pointer_axis_source source,
|
enum libinput_pointer_axis_source source,
|
||||||
const struct normalized_coords *delta);
|
const struct normalized_coords *delta);
|
||||||
|
|
||||||
void
|
void
|
||||||
evdev_stop_scroll(struct evdev_device *device,
|
evdev_stop_scroll(struct evdev_device *device,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum libinput_pointer_axis_source source);
|
enum libinput_pointer_axis_source source);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -619,7 +618,7 @@ evdev_device_destroy(struct evdev_device *device);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
evdev_middlebutton_filter_button(struct evdev_device *device,
|
evdev_middlebutton_filter_button(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);
|
||||||
|
|
||||||
|
|
@ -970,9 +969,7 @@ evdev_device_init_abs_range_warnings(struct evdev_device *device)
|
||||||
device->abs.warning_range.max.y = y->maximum + 0.05 * height;
|
device->abs.warning_range.max.y = y->maximum + 0.05 * height;
|
||||||
|
|
||||||
/* One warning every 5 min is enough */
|
/* One warning every 5 min is enough */
|
||||||
ratelimit_init(&device->abs.warning_range.range_warn_limit,
|
ratelimit_init(&device->abs.warning_range.range_warn_limit, s2us(3000), 1);
|
||||||
usec_from_seconds(3000),
|
|
||||||
1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
|
@ -1011,20 +1008,19 @@ evdev_device_check_abs_axis_range(struct evdev_device *device,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct evdev_paired_device {
|
struct evdev_paired_keyboard {
|
||||||
struct list link;
|
struct list link;
|
||||||
struct evdev_device *device;
|
struct evdev_device *device;
|
||||||
struct libinput_event_listener listener;
|
struct libinput_event_listener listener;
|
||||||
uint32_t flags; /* generic flags used by the caller */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
evdev_paired_device_destroy(struct evdev_paired_device *device)
|
evdev_paired_keyboard_destroy(struct evdev_paired_keyboard *kbd)
|
||||||
{
|
{
|
||||||
device->device = NULL;
|
kbd->device = NULL;
|
||||||
libinput_device_remove_event_listener(&device->listener);
|
libinput_device_remove_event_listener(&kbd->listener);
|
||||||
list_remove(&device->link);
|
list_remove(&kbd->link);
|
||||||
free(device);
|
free(kbd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
|
|
|
||||||
|
|
@ -29,12 +29,12 @@
|
||||||
#include "filter-private.h"
|
#include "filter-private.h"
|
||||||
#include "filter.h"
|
#include "filter.h"
|
||||||
|
|
||||||
#define MOTION_TIMEOUT usec_from_millis(1000)
|
#define MOTION_TIMEOUT ms2us(1000)
|
||||||
#define FIRST_MOTION_TIME_INTERVAL usec_from_millis(7) /* random but good enough interval for very first event */
|
#define FIRST_MOTION_TIME_INTERVAL ms2us(7) /* random but good enough interval for very first event */
|
||||||
|
|
||||||
struct custom_accel_function {
|
struct custom_accel_function {
|
||||||
usec_t last_time;
|
uint64_t last_time;
|
||||||
usec_t last_delta_time;
|
uint64_t last_delta_time;
|
||||||
double step;
|
double step;
|
||||||
size_t npoints;
|
size_t npoints;
|
||||||
double points[];
|
double points[];
|
||||||
|
|
@ -58,7 +58,7 @@ create_custom_accel_function(double step, const double *points, size_t npoints)
|
||||||
|
|
||||||
struct custom_accel_function *cf =
|
struct custom_accel_function *cf =
|
||||||
zalloc(sizeof(*cf) + npoints * sizeof(*points));
|
zalloc(sizeof(*cf) + npoints * sizeof(*points));
|
||||||
cf->last_time = usec_from_uint64_t(0);
|
cf->last_time = 0;
|
||||||
cf->last_delta_time = FIRST_MOTION_TIME_INTERVAL;
|
cf->last_delta_time = FIRST_MOTION_TIME_INTERVAL;
|
||||||
cf->step = step;
|
cf->step = step;
|
||||||
cf->npoints = npoints;
|
cf->npoints = npoints;
|
||||||
|
|
@ -79,7 +79,7 @@ custom_accel_function_destroy(struct custom_accel_function *cf)
|
||||||
static double
|
static double
|
||||||
custom_accel_function_calculate_speed(struct custom_accel_function *cf,
|
custom_accel_function_calculate_speed(struct custom_accel_function *cf,
|
||||||
const struct device_float_coords *unaccelerated,
|
const struct device_float_coords *unaccelerated,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
/* Although most devices have a constant polling rate, and for fast
|
/* Although most devices have a constant polling rate, and for fast
|
||||||
* movements these distances do represent the actual speed,
|
* movements these distances do represent the actual speed,
|
||||||
|
|
@ -121,11 +121,10 @@ custom_accel_function_calculate_speed(struct custom_accel_function *cf,
|
||||||
* Reusing the last delta_time is a graceful fallback even if there are
|
* Reusing the last delta_time is a graceful fallback even if there are
|
||||||
* duplicate events or event-ordering bugs.
|
* duplicate events or event-ordering bugs.
|
||||||
*/
|
*/
|
||||||
usec_t delta_time = usec_cmp(time, cf->last_time) > 0
|
uint64_t delta_time =
|
||||||
? usec_delta(time, cf->last_time)
|
(time > cf->last_time) ? time - cf->last_time : cf->last_delta_time;
|
||||||
: cf->last_delta_time;
|
|
||||||
/* handle first event in a motion */
|
/* handle first event in a motion */
|
||||||
if (usec_cmp(delta_time, MOTION_TIMEOUT) > 0)
|
if (delta_time > MOTION_TIMEOUT)
|
||||||
delta_time = FIRST_MOTION_TIME_INTERVAL;
|
delta_time = FIRST_MOTION_TIME_INTERVAL;
|
||||||
|
|
||||||
/* speed is in device-units per ms */
|
/* speed is in device-units per ms */
|
||||||
|
|
@ -197,7 +196,7 @@ custom_accel_function_profile(struct custom_accel_function *cf, double speed_in)
|
||||||
static struct normalized_coords
|
static struct normalized_coords
|
||||||
custom_accel_function_filter(struct custom_accel_function *cf,
|
custom_accel_function_filter(struct custom_accel_function *cf,
|
||||||
const struct device_float_coords *unaccelerated,
|
const struct device_float_coords *unaccelerated,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
double speed = custom_accel_function_calculate_speed(cf, unaccelerated, time);
|
double speed = custom_accel_function_calculate_speed(cf, unaccelerated, time);
|
||||||
|
|
||||||
|
|
@ -253,7 +252,7 @@ static struct normalized_coords
|
||||||
custom_accelerator_filter(enum libinput_config_accel_type accel_type,
|
custom_accelerator_filter(enum libinput_config_accel_type accel_type,
|
||||||
struct motion_filter *filter,
|
struct motion_filter *filter,
|
||||||
const struct device_float_coords *unaccelerated,
|
const struct device_float_coords *unaccelerated,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
struct custom_accelerator *f = (struct custom_accelerator *)filter;
|
struct custom_accelerator *f = (struct custom_accelerator *)filter;
|
||||||
struct custom_accel_function *cf;
|
struct custom_accel_function *cf;
|
||||||
|
|
@ -264,7 +263,7 @@ custom_accelerator_filter(enum libinput_config_accel_type accel_type,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
custom_accelerator_restart(struct motion_filter *filter, void *data, usec_t time)
|
custom_accelerator_restart(struct motion_filter *filter, void *data, uint64_t time)
|
||||||
{
|
{
|
||||||
/* noop, this function has no effect in the custom interface */
|
/* noop, this function has no effect in the custom interface */
|
||||||
}
|
}
|
||||||
|
|
@ -348,7 +347,7 @@ double
|
||||||
custom_accel_profile_fallback(struct motion_filter *filter,
|
custom_accel_profile_fallback(struct motion_filter *filter,
|
||||||
void *data,
|
void *data,
|
||||||
double speed_in,
|
double speed_in,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
return custom_accelerator_profile(LIBINPUT_ACCEL_TYPE_FALLBACK,
|
return custom_accelerator_profile(LIBINPUT_ACCEL_TYPE_FALLBACK,
|
||||||
filter,
|
filter,
|
||||||
|
|
@ -359,7 +358,7 @@ static struct normalized_coords
|
||||||
custom_accelerator_filter_fallback(struct motion_filter *filter,
|
custom_accelerator_filter_fallback(struct motion_filter *filter,
|
||||||
const struct device_float_coords *unaccelerated,
|
const struct device_float_coords *unaccelerated,
|
||||||
void *data,
|
void *data,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
return custom_accelerator_filter(LIBINPUT_ACCEL_TYPE_FALLBACK,
|
return custom_accelerator_filter(LIBINPUT_ACCEL_TYPE_FALLBACK,
|
||||||
filter,
|
filter,
|
||||||
|
|
@ -371,7 +370,7 @@ double
|
||||||
custom_accel_profile_motion(struct motion_filter *filter,
|
custom_accel_profile_motion(struct motion_filter *filter,
|
||||||
void *data,
|
void *data,
|
||||||
double speed_in,
|
double speed_in,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
return custom_accelerator_profile(LIBINPUT_ACCEL_TYPE_MOTION, filter, speed_in);
|
return custom_accelerator_profile(LIBINPUT_ACCEL_TYPE_MOTION, filter, speed_in);
|
||||||
}
|
}
|
||||||
|
|
@ -380,7 +379,7 @@ static struct normalized_coords
|
||||||
custom_accelerator_filter_motion(struct motion_filter *filter,
|
custom_accelerator_filter_motion(struct motion_filter *filter,
|
||||||
const struct device_float_coords *unaccelerated,
|
const struct device_float_coords *unaccelerated,
|
||||||
void *data,
|
void *data,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
return custom_accelerator_filter(LIBINPUT_ACCEL_TYPE_MOTION,
|
return custom_accelerator_filter(LIBINPUT_ACCEL_TYPE_MOTION,
|
||||||
filter,
|
filter,
|
||||||
|
|
@ -392,7 +391,7 @@ double
|
||||||
custom_accel_profile_scroll(struct motion_filter *filter,
|
custom_accel_profile_scroll(struct motion_filter *filter,
|
||||||
void *data,
|
void *data,
|
||||||
double speed_in,
|
double speed_in,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
return custom_accelerator_profile(LIBINPUT_ACCEL_TYPE_SCROLL, filter, speed_in);
|
return custom_accelerator_profile(LIBINPUT_ACCEL_TYPE_SCROLL, filter, speed_in);
|
||||||
}
|
}
|
||||||
|
|
@ -401,7 +400,7 @@ static struct normalized_coords
|
||||||
custom_accelerator_filter_scroll(struct motion_filter *filter,
|
custom_accelerator_filter_scroll(struct motion_filter *filter,
|
||||||
const struct device_float_coords *unaccelerated,
|
const struct device_float_coords *unaccelerated,
|
||||||
void *data,
|
void *data,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum filter_scroll_type type)
|
enum filter_scroll_type type)
|
||||||
{
|
{
|
||||||
return custom_accelerator_filter(LIBINPUT_ACCEL_TYPE_SCROLL,
|
return custom_accelerator_filter(LIBINPUT_ACCEL_TYPE_SCROLL,
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ static struct normalized_coords
|
||||||
accelerator_filter_flat(struct motion_filter *filter,
|
accelerator_filter_flat(struct motion_filter *filter,
|
||||||
const struct device_float_coords *unaccelerated,
|
const struct device_float_coords *unaccelerated,
|
||||||
void *data,
|
void *data,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
struct pointer_accelerator_flat *accel_filter =
|
struct pointer_accelerator_flat *accel_filter =
|
||||||
(struct pointer_accelerator_flat *)filter;
|
(struct pointer_accelerator_flat *)filter;
|
||||||
|
|
@ -65,7 +65,7 @@ static struct normalized_coords
|
||||||
accelerator_filter_constant_flat(struct motion_filter *filter,
|
accelerator_filter_constant_flat(struct motion_filter *filter,
|
||||||
const struct device_float_coords *unaccelerated,
|
const struct device_float_coords *unaccelerated,
|
||||||
void *data,
|
void *data,
|
||||||
usec_t time)
|
uint64_t time)
|
||||||
{
|
{
|
||||||
/* We map the unaccelerated flat filter to have the same behavior as
|
/* We map the unaccelerated flat filter to have the same behavior as
|
||||||
* the "accelerated" flat filter.
|
* the "accelerated" flat filter.
|
||||||
|
|
@ -85,7 +85,7 @@ static struct normalized_coords
|
||||||
accelerator_filter_scroll_flat(struct motion_filter *filter,
|
accelerator_filter_scroll_flat(struct motion_filter *filter,
|
||||||
const struct device_float_coords *unaccelerated,
|
const struct device_float_coords *unaccelerated,
|
||||||
void *data,
|
void *data,
|
||||||
usec_t time,
|
uint64_t time,
|
||||||
enum filter_scroll_type type)
|
enum filter_scroll_type type)
|
||||||
{
|
{
|
||||||
/* Scroll wheels were not historically accelerated and have different
|
/* Scroll wheels were not historically accelerated and have different
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue