Compare commits

..

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

342 changed files with 3261 additions and 13705 deletions

View file

@ -74,7 +74,6 @@ ForEachMacros:
- tp_for_each_touch
- range_for_each
- litest_log_group
- litest_with_logcapture
- litest_with_parameters
- litest_with_event_frame
- udev_list_entry_foreach

View file

@ -4,4 +4,4 @@
Checks: >
-clang-analyzer-unix.Malloc,
-clang-analyzer-optin.core.EnumCastOutOfRange
WarningsAsErrors: '*'
WarningsAsErrors: true

View file

@ -49,6 +49,8 @@ include:
- '/templates/debian.yml'
# Fedora container builder template
- '/templates/fedora.yml'
# Freebsd container builder template
- '/templates/freebsd.yml'
# Ubuntu container builder template
- '/templates/ubuntu.yml'
@ -96,22 +98,24 @@ variables:
# See the documentation here: #
# https://wayland.freedesktop.org/libinput/doc/latest/building.html #
###############################################################################
FEDORA_PACKAGES: 'git-core gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx_rtd_theme python3-pytest-xdist libwacom-devel cairo-devel gtk4-devel glib2-devel mtdev-devel diffutils wayland-protocols-devel black clang clang-tools-extra jq rpmdevtools valgrind systemd-udev qemu-img qemu-system-x86-core qemu-system-aarch64-core jq python3-click python3-rich virtme-ng lua-devel'
DEBIAN_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 curl 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'
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'
FEDORA_PACKAGES: 'git-core gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx_rtd_theme python3-pytest-xdist libwacom-devel cairo-devel gtk4-devel glib2-devel mtdev-devel diffutils wayland-protocols-devel black clang clang-tools-extra jq rpmdevtools valgrind systemd-udev qemu-img qemu-system-x86-core qemu-system-aarch64-core jq python3-click python3-rich virtme-ng'
DEBIAN_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 curl'
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'
ARCH_PACKAGES: 'git gcc pkgconfig meson check libsystemd libevdev python-pytest-xdist libwacom gtk4 mtdev diffutils'
ALPINE_PACKAGES: 'git gcc build-base pkgconfig meson check-dev eudev-dev libevdev-dev libwacom-dev cairo-dev gtk4.0-dev mtdev-dev bash'
FREEBSD_PACKAGES: 'git pkgconf meson libepoll-shim libudev-devd libevdev libwacom gtk3 libmtdev bash wayland'
############################ end of package lists #############################
# these tags should be updated each time the list of packages is updated
# changing these will force rebuilding the associated image
# Note: these tags have no meaning and are not tied to a particular
# libinput version
FEDORA_TAG: '2026-01-09.0'
DEBIAN_TAG: '2026-01-09.0'
UBUNTU_TAG: '2026-01-09.0'
ARCH_TAG: '2026-01-09.0'
ALPINE_TAG: '2026-01-09.0'
FEDORA_TAG: '2025-05-19.0'
DEBIAN_TAG: '2025-05-19.0'
UBUNTU_TAG: '2025-05-19.0'
ARCH_TAG: '2025-05-19.0'
ALPINE_TAG: '2025-05-19.0'
FREEBSD_TAG: '2025-05-19.0'
FDO_UPSTREAM_REPO: libinput/libinput
@ -263,6 +267,18 @@ pre-commit-hooks:
# #
#################################################################
fedora:41@container-prep:
extends:
- .fdo.container-build@fedora
- .policy
- .fdo-runner-tags
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '41'
FDO_DISTRIBUTION_PACKAGES: $FEDORA_PACKAGES
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
fedora:42@container-prep:
extends:
- .fdo.container-build@fedora
@ -275,18 +291,6 @@ fedora:42@container-prep:
FDO_DISTRIBUTION_PACKAGES: $FEDORA_PACKAGES
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
fedora:43@container-prep:
extends:
- .fdo.container-build@fedora
- .policy
- .fdo-runner-tags
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '43'
FDO_DISTRIBUTION_PACKAGES: $FEDORA_PACKAGES
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
debian:stable@container-prep:
extends:
- .fdo.container-build@debian
@ -299,7 +303,7 @@ debian:stable@container-prep:
FDO_DISTRIBUTION_PACKAGES: $DEBIAN_PACKAGES
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
ubuntu:25.10@container-prep:
ubuntu:25.04@container-prep:
extends:
- .fdo.container-build@ubuntu
- .policy
@ -307,7 +311,7 @@ ubuntu:25.10@container-prep:
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '25.10'
FDO_DISTRIBUTION_VERSION: '25.04'
FDO_DISTRIBUTION_PACKAGES: $UBUNTU_PACKAGES
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
@ -335,6 +339,20 @@ alpine:latest@container-prep:
FDO_DISTRIBUTION_PACKAGES: $ALPINE_PACKAGES
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
#################################################################
@ -368,6 +386,16 @@ alpine:latest@container-prep:
only:
- schedules
fedora:41@container-clean:
extends:
- .policy
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '41'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
fedora:42@container-clean:
extends:
- .policy
@ -378,16 +406,6 @@ fedora:42@container-clean:
FDO_DISTRIBUTION_VERSION: '42'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
fedora:43@container-clean:
extends:
- .policy
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '43'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
debian:stable@container-clean:
extends:
- .policy
@ -398,14 +416,14 @@ debian:stable@container-clean:
FDO_DISTRIBUTION_VERSION: 'stable'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
ubuntu:25.10@container-clean:
ubuntu:25.04@container-clean:
extends:
- .policy
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/ubuntu/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '25.10'
FDO_DISTRIBUTION_VERSION: '25.04'
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
arch:rolling@container-clean:
@ -428,6 +446,16 @@ alpine:latest@container-clean:
FDO_DISTRIBUTION_VERSION: 'latest'
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
#################################################################
# #
@ -549,20 +577,20 @@ alpine:latest@container-clean:
- export MESON_TEST_ARGS="$MESON_TEST_ARGS $SUITES"
.fedora:43@test-suite-vm:
.fedora:42@test-suite-vm:
extends:
- .fdo.distribution-image@fedora
- .test-suite-vm
variables:
FDO_DISTRIBUTION_VERSION: 43
FDO_DISTRIBUTION_VERSION: 42
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- "fedora:43@container-prep"
- "fedora:42@container-prep"
vm-touchpad:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'touchpad'
@ -575,7 +603,7 @@ vm-touchpad-no-libwacom:
vm-touchpad_palm:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'touchpad_palm'
@ -588,7 +616,7 @@ vm-touchpad_palm-no-libwacom:
vm-touchpad_dwt:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'touchpad_dwt'
@ -601,7 +629,7 @@ vm-touchpad_dwt-no-libwacom:
vm-tap:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'touchpad_tap'
@ -614,7 +642,7 @@ vm-tap-no-libwacom:
vm-tap-drag:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'touchpad_tap_drag'
@ -627,7 +655,7 @@ vm-tap-drag-no-libwacom:
vm-tap-palm:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'touchpad_tap_palm'
@ -640,7 +668,7 @@ vm-tap-palm-no-libwacom:
vm-touchpad-buttons:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'touchpad_buttons'
@ -653,7 +681,7 @@ vm-touchpad-buttons-no-libwacom:
vm-tablet:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'tablet'
@ -666,7 +694,7 @@ vm-tablet-no-libwacom:
vm-tablet_left_handed:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'tablet_left_handed'
@ -679,7 +707,7 @@ vm-tablet_left_handed-no-libwacom:
vm-tablet_proximity_tip:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'tablet_proximity tablet_tip'
@ -692,7 +720,7 @@ vm-tablet_proximity_tip-no-libwacom:
vm-tablet_eraser:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'tablet_eraser'
@ -705,7 +733,7 @@ vm-tablet_eraser-no-libwacom:
vm-gestures:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'gestures'
@ -718,7 +746,7 @@ vm-gestures-no-libwacom:
vm-backends:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'path udev'
@ -731,7 +759,7 @@ vm-backends-no-libwacom:
vm-misc:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'log misc quirks device'
@ -744,7 +772,7 @@ vm-misc-no-libwacom:
vm-other devices:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'keyboard pad switch trackball trackpoint totem touch'
@ -757,7 +785,7 @@ vm-other devices-no-libwacom:
vm-pointer:
extends:
- .fedora:43@test-suite-vm
- .fedora:42@test-suite-vm
variables:
SUITE_NAMES: 'pointer'
@ -768,19 +796,6 @@ vm-pointer-no-libwacom:
variables:
MESON_ARGS: '-Dlibwacom=false'
vm-lua:
extends:
- .fedora:43@test-suite-vm
variables:
SUITE_NAMES: 'lua'
vm-lua-no-libwacom:
extends:
- vm-lua
stage: test-suite-no-libwacom
variables:
MESON_ARGS: '-Dlibwacom=false'
vm-valgrind-touchpad:
stage: valgrind
@ -990,32 +1005,18 @@ vm-valgrind-pointer:
rules:
- if: $GITLAB_USER_LOGIN != "marge-bot"
vm-valgrind-lua:
stage: valgrind
extends:
- vm-lua
- .policy-retry-on-failure
variables:
MESON_TEST_ARGS: '--setup=valgrind'
LITEST_JOBS: 0
retry:
max: 2
rules:
- if: $GITLAB_USER_LOGIN != "marge-bot"
.fedora-build@template:
extends:
- .fdo.distribution-image@fedora
- .build@template
variables:
FDO_DISTRIBUTION_VERSION: '43'
FDO_DISTRIBUTION_VERSION: '42'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- "fedora:43@container-prep"
- "fedora:42@container-prep"
default-build-release@fedora:43:
default-build-release@fedora:42:
stage: distro
extends:
- .fedora-build@template
@ -1023,7 +1024,7 @@ default-build-release@fedora:43:
MESON_ARGS: "-Dbuildtype=release"
CFLAGS: "-Werror"
clang-tidy@fedora:43:
clang-tidy@fedora:42:
extends:
- .fedora-build@template
variables:
@ -1038,13 +1039,13 @@ clang-tidy@fedora:43:
# run them on one image, they shouldn't fail on one distro
# when they succeed on another.
build-no-libwacom@fedora:43:
build-no-libwacom@fedora:42:
extends:
- .fedora-build@template
variables:
MESON_ARGS: "-Dlibwacom=false"
build-no-libwacom-nodeps@fedora:43:
build-no-libwacom-nodeps@fedora:42:
extends:
- .fedora-build@template
variables:
@ -1052,13 +1053,13 @@ build-no-libwacom-nodeps@fedora:43:
before_script:
- dnf remove -y libwacom libwacom-devel
build-no-mtdev@fedora:43:
build-no-mtdev@fedora:42:
extends:
- .fedora-build@template
variables:
MESON_ARGS: "-Dmtdev=false"
build-no-mtdev-nodeps@fedora:43:
build-no-mtdev-nodeps@fedora:42:
extends:
- .fedora-build@template
variables:
@ -1066,27 +1067,13 @@ build-no-mtdev-nodeps@fedora:43:
before_script:
- dnf remove -y mtdev mtdev-devel
build-no-lua@fedora:43:
extends:
- .fedora-build@template
variables:
MESON_ARGS: "-Dlua-plugins=disabled"
build-no-lua-nodeps@fedora:43:
extends:
- .fedora-build@template
variables:
MESON_ARGS: "-Dlua-plugins=disabled"
before_script:
- dnf remove -y lua lua-devel
build-docs@fedora:43:
build-docs@fedora:42:
extends:
- .fedora-build@template
variables:
MESON_ARGS: "-Ddocumentation=true"
build-no-docs-nodeps@fedora:43:
build-no-docs-nodeps@fedora:42:
extends:
- .fedora-build@template
variables:
@ -1094,13 +1081,13 @@ build-no-docs-nodeps@fedora:43:
before_script:
- dnf remove -y doxygen graphviz
build-no-debuggui@fedora:43:
build-no-debuggui@fedora:42:
extends:
- .fedora-build@template
variables:
MESON_ARGS: "-Ddebug-gui=false"
build-no-debuggui-nodeps@fedora:43:
build-no-debuggui-nodeps@fedora:42:
extends:
- .fedora-build@template
variables:
@ -1108,13 +1095,13 @@ build-no-debuggui-nodeps@fedora:43:
before_script:
- dnf remove -y gtk3-devel gtk4-devel
build-no-tests@fedora:43:
build-no-tests@fedora:42:
extends:
- .fedora-build@template
variables:
MESON_ARGS: "-Dtests=false"
build-no-tests-nodeps@fedora:43:
build-no-tests-nodeps@fedora:42:
extends:
- .fedora-build@template
variables:
@ -1122,7 +1109,7 @@ build-no-tests-nodeps@fedora:43:
before_script:
- dnf remove -y check-devel
valgrind@fedora:43:
valgrind@fedora:42:
extends:
- .fedora-build@template
variables:
@ -1130,7 +1117,7 @@ valgrind@fedora:43:
# Python checks, only run on Fedora
usr-bin-env-python@fedora:43:
usr-bin-env-python@fedora:42:
extends:
- .fedora-build@template
script:
@ -1176,7 +1163,6 @@ check-test-suites:
libinput-test-suite-totem
libinput-test-suite-touch
libinput-test-suite-pointer
libinput-test-suite-lua
EOF
- sort -o ci-testsuites ci-testsuites
- diff -u8 -w ci-testsuites meson-testsuites || (echo "Some test suites are not run in the CI" && false)
@ -1241,6 +1227,18 @@ coverity:
# #
#################################################################
fedora:41@default-build:
stage: distro
extends:
- .build@template
- .fdo.distribution-image@fedora
variables:
FDO_DISTRIBUTION_VERSION: '41'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- "fedora:41@container-prep"
fedora:42@default-build:
stage: distro
extends:
@ -1253,18 +1251,6 @@ fedora:42@default-build:
- "fedora:42@container-prep"
fedora:43@default-build:
stage: distro
extends:
- .build@template
- .fdo.distribution-image@fedora
variables:
FDO_DISTRIBUTION_VERSION: '43'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- "fedora:43@container-prep"
debian:stable@default-build:
stage: distro
extends:
@ -1277,16 +1263,16 @@ debian:stable@default-build:
- "debian:stable@container-prep"
ubuntu:25.10@default-build:
ubuntu:25.04@default-build:
stage: distro
extends:
- .build@template
- .fdo.distribution-image@ubuntu
variables:
FDO_DISTRIBUTION_VERSION: '25.10'
FDO_DISTRIBUTION_VERSION: '25.04'
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
needs:
- "ubuntu:25.10@container-prep"
- "ubuntu:25.04@container-prep"
arch:rolling@default-build:
@ -1316,6 +1302,19 @@ alpine:latest@default-build:
- "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"
#################################################################
# #
@ -1323,6 +1322,27 @@ alpine:latest@default-build:
# #
#################################################################
#
# Verify that the merge request has the allow-collaboration checkbox ticked
#
check-merge-request:
extends:
- .fdo.ci-fairy
- .policy
- .fdo-runner-tags
stage: deploy
script:
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
artifacts:
when: on_failure
reports:
junit: results.xml
allow_failure: true
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
build rpm:
extends:
- .fdo.distribution-image@fedora
@ -1330,10 +1350,10 @@ build rpm:
- .fdo-runner-tags
stage: deploy
variables:
FDO_DISTRIBUTION_VERSION: '43'
FDO_DISTRIBUTION_VERSION: '42'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- "fedora:43@container-prep"
- "fedora:42@container-prep"
script:
- meson "$MESON_BUILDDIR"
- VERSION=$(meson introspect "$MESON_BUILDDIR" --projectinfo | jq -r .version)
@ -1351,12 +1371,14 @@ build rpm:
wayland-web:
stage: deploy
trigger: wayland/wayland.freedesktop.org
except:
refs:
- schedules
variables:
MESON_ARGS: '-Ddocumentation=true -Ddebug-gui=false -Dlibwacom=false -Dtests=false'
MESON_BUILDDIR: 'builddir'
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- if: '$CI_COMMIT_BRANCH == "main" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_PROJECT_PATH == $FDO_UPSTREAM_REPO'
when: on_success
- when: never
only:
refs:
- main
variables:
- $CI_PROJECT_PATH == "libinput/libinput"

View file

@ -492,7 +492,6 @@ vm-valgrind-{{suite.name}}:
- if: $GITLAB_USER_LOGIN != "marge-bot"
{% endfor %}
{% endfor %}{# for if distro.use_for_qemu_tests #}
{% for distro in distributions if distro.use_for_custom_build_tests %}
@ -558,20 +557,6 @@ build-no-mtdev-nodeps@{{distro.name}}:{{version}}:
before_script:
- dnf remove -y mtdev mtdev-devel
build-no-lua@{{distro.name}}:{{version}}:
extends:
- .{{distro.name}}-build@template
variables:
MESON_ARGS: "-Dlua-plugins=disabled"
build-no-lua-nodeps@{{distro.name}}:{{version}}:
extends:
- .{{distro.name}}-build@template
variables:
MESON_ARGS: "-Dlua-plugins=disabled"
before_script:
- dnf remove -y lua lua-devel
build-docs@{{distro.name}}:{{version}}:
extends:
- .{{distro.name}}-build@template
@ -761,6 +746,27 @@ coverity:
# #
#################################################################
#
# Verify that the merge request has the allow-collaboration checkbox ticked
#
check-merge-request:
extends:
- .fdo.ci-fairy
- .policy
- .fdo-runner-tags
stage: deploy
script:
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
artifacts:
when: on_failure
reports:
junit: results.xml
allow_failure: true
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
{% for distro in distributions if distro.name == "fedora" %}
{% set version = "{}".format(distro.versions|last()) %}
build rpm:
@ -792,12 +798,14 @@ build rpm:
wayland-web:
stage: deploy
trigger: wayland/wayland.freedesktop.org
except:
refs:
- schedules
variables:
MESON_ARGS: '-Ddocumentation=true -Ddebug-gui=false -Dlibwacom=false -Dtests=false'
MESON_BUILDDIR: 'builddir'
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- if: '$CI_COMMIT_BRANCH == "main" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_PROJECT_PATH == $FDO_UPSTREAM_REPO'
when: on_success
- when: never
only:
refs:
- main
variables:
- $CI_PROJECT_PATH == "libinput/libinput"

View file

@ -3,14 +3,14 @@
#
# We're happy to rebuild all containers when one changes.
.default_tag: &default_tag '2026-01-09.0'
.default_tag: &default_tag '2025-05-19.0'
distributions:
- name: fedora
tag: *default_tag
versions:
- '41'
- '42'
- '43'
use_for_custom_build_tests: true
use_for_qemu_tests: true
packages:
@ -50,7 +50,6 @@ distributions:
- python3-click
- python3-rich
- virtme-ng
- lua-devel
- name: debian
tag: *default_tag
versions:
@ -76,11 +75,10 @@ distributions:
- libglib2.0-dev
- libmtdev-dev
- curl # for the coverity job
- lua5.4-dev
- name: ubuntu
tag: *default_tag
versions:
- '25.10'
- '25.04'
packages:
- git
- gcc
@ -101,7 +99,6 @@ distributions:
- libgtk-3-dev
- libglib2.0-dev
- libmtdev-dev
- lua5.4-dev
- name: arch
tag: *default_tag
versions:
@ -119,7 +116,6 @@ distributions:
- gtk4
- mtdev
- diffutils
- lua
build:
extra_variables:
- "MESON_ARGS: '-Ddocumentation=false'" # python-recommonmark is no longer in the repos
@ -140,7 +136,6 @@ distributions:
- gtk4.0-dev
- mtdev-dev
- bash
- lua5.4-dev
build:
extra_variables:
- "MESON_ARGS: '-Ddocumentation=false' # alpine does not have python-recommonmark"
@ -148,6 +143,29 @@ distributions:
# for any tcase_add_exit_test/tcase_add_test_raise_signal
# but someone more invested in musl will have to figure that out.
- "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:
- name: touchpad
@ -209,9 +227,6 @@ test_suites:
- name: pointer
suites:
- pointer
- name: lua
suites:
- lua
vng:
kernel: https://gitlab.freedesktop.org/api/v4/projects/libevdev%2Fhid-tools/packages/generic/kernel-x86_64/v6.14/bzImage

View file

@ -100,7 +100,6 @@ intended to be run by users.
%files utils
%{_libexecdir}/libinput/libinput-debug-gui
%{_libexecdir}/libinput/libinput-debug-tablet
%{_libexecdir}/libinput/libinput-debug-tablet-pad
%{_libexecdir}/libinput/libinput-list-kernel-devices
%{_libexecdir}/libinput/libinput-measure
%{_libexecdir}/libinput/libinput-measure-fuzz
@ -118,7 +117,6 @@ intended to be run by users.
%{_libexecdir}/libinput/libinput-analyze-touch-down-state
%{_mandir}/man1/libinput-debug-gui.1*
%{_mandir}/man1/libinput-debug-tablet.1*
%{_mandir}/man1/libinput-debug-tablet-pad.1*
%{_mandir}/man1/libinput-list-kernel-devices.1*
%{_mandir}/man1/libinput-measure.1*
%{_mandir}/man1/libinput-measure-fuzz.1*

View file

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

View file

@ -183,16 +183,6 @@ resource_rules:
For a detailed explanation on the how and why of this process please see
the [Closed Issues wiki page](https://gitlab.freedesktop.org/libinput/libinput/-/wikis/Closed-Issues).
status: "close"
- name: "Re-close bug for reopening"
conditions:
labels:
- "bugbot::re-close"
actions:
remove_labels:
- "bugbot::re-close"
comment: |
I'm temporarily closing this bug again. This is not a final close, see my comments above for the open/close process.
status: "close"
- *udev_hid_bpf
- *libinput_record
- *hid_recorder

View file

@ -45,7 +45,6 @@ __all_seats()
'--verbose[Use verbose output]' \
'--show-keycodes[Make all keycodes visible]' \
'--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/' \
'--udev=[Listen for notifications on the given seat]:seat:__all_seats' \
'--apply-to=[Apply configuration options where the device name matches the pattern]:pattern' \
@ -94,9 +93,6 @@ __all_seats()
+ '(natural-scrolling)' \
'--enable-natural-scrolling[Enable natural scrolling]' \
'--disable-natural-scrolling[Disable natural scrolling]' \
+ '(plugins)' \
'--enable-plugins[Enable plugins]' \
'--disable-plugins[Disable plugins]' \
+ '(tap-to-click)' \
'--enable-tap[Enable tap-to-click]' \
'--disable-tap[Disable tap-to-click]'

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 489 KiB

After

Width:  |  Height:  |  Size: 181 KiB

View file

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

View file

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

View file

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

View file

@ -13,7 +13,7 @@ Instructions on how to build libinput and its tools and how to build against
libinput.
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.
.. _distribution_repos:
@ -27,7 +27,7 @@ the latest libinput without building it manually.
.. note:: The list below is provided for convenience. The libinput community
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.
The following repositories provide an up-to-date package for libinput:

View file

@ -30,7 +30,7 @@ The "bounce" method guarantees that all press events are delivered
immediately and most release events are delivered immediately. The
"spurious" method requires that release events are delayed, libinput thus
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
substandard hardware. Debouncing also exists as an accessibility feature

View file

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

View file

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

View file

@ -6,21 +6,15 @@ Configuration options
Below is a list of configurable options exposed to the users.
.. contents::
:depth: 1
:local:
.. hint:: Not all configuration options are available on all devices. Use
:ref:`libinput list-devices <libinput-list-devices>` to show the
configuration options for local devices.
libinput's configuration interface is available to the caller only, not
directly to the user. Thus it is the responsibility of the caller to expose
directly to the user. Thus is is the responsibility of the caller to expose
the various options and how these options are exposed. For example, the
`xf86-input-libinput driver <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/>`_
exposes the options through X Input device properties and `xorg.conf.d
<https://linux.die.net/man/5/xorg.conf.d>`_ options. See the `libinput(4)
xf86-input-libinput driver exposes the options through X Input device
properties and xorg.conf.d options. See the `libinput(4)
<https://www.mankier.com/4/libinput>`_ man page for more details.
@ -47,7 +41,7 @@ for those devices it is expected to be implemented by the toolkit.
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
:ref:`tapndrag`. See :ref:`drag_3fg` for details on how this feature works.
@ -165,7 +159,7 @@ most touchpads.
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,
being enabled again after a timeout. See :ref:`disable-while-trackpointing` for
more info.
@ -205,24 +199,12 @@ Tablet tool pressure range
The pressure range on a :ref:`Tablet tool <tablet-tools>` can be reduced
from the full available hardware range to a subset of that range. The effect
of this is that the tablet will not register pressure until the given
threshold is met, and will reach the maximum logical pressure
of this is that the tablet will not register pressure below the given
the given threshold is met, and will reach the maximum logical pressure
before the maximum hardware-supported pressure is reached.
See :ref:`tablet-pressure-range` for more info.
.. _config-tablet-eraser-buttons:
------------------------------------------------------------------------------
Tablet tool eraser buttons
------------------------------------------------------------------------------
On many contemporary :ref:`Tablet tools <tablet-tools>` one button is hardcoded
in firmware to emulate an eraser. This button can be remapped to provide
a normal stylus button instead.
See :ref:`tablet-eraser-button` for more info.
------------------------------------------------------------------------------
Area configuration
------------------------------------------------------------------------------

View file

@ -144,9 +144,10 @@ This test suite can take test names etc. as arguments, have a look at
:ref:`test-suite` for more info. There are a bunch of other tests that are
run by the CI on merge requests, you can run those locally with ::
$> sudo meson test -C builddir
$> sudo ninja -C builddir check
So it always pays to run that before submitting.
So it always pays to run that before submitting. This will also run the code
through valgrind and pick up any memory leaks.
.. _contributing_submitting_code:
@ -180,7 +181,7 @@ sufficient to make some of the more confusing steps obvious.
with your username). git will call this repository ``gitlab``. ::
cd /path/to/libinput.git
git remote add gitlab git@ssh.gitlab.freedesktop.org:USERNAME/libinput.git
git remote add gitlab git@gitlab.freedesktop.org:USERNAME/libinput.git
git fetch gitlab
- Create a new branch and commit your changes to that branch. ::

View file

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

View file

@ -23,7 +23,7 @@ the serial bus (PS/2) as internal keyboards: ::
[Serial Keyboards]
MatchUdevType=keyboard
MatchBus=ps2
MatchBus=serial
AttrKeyboardIntegration=internal
@ -46,7 +46,7 @@ Installing temporary local device quirks
The model quirks are part of the source distribution and should never be
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
modification must be upstreamed** or it may cease to work at any time.
@ -130,7 +130,7 @@ Quirks starting with **Model*** triggers implementation-defined behaviour
for this device not needed for any other device. Only the more
general-purpose **Model*** flags are listed here.
ModelALPSSerialTouchpad, ModelAppleTouchpad, ModelWacomTouchpad, ModelChromebook
ModelALPSTouchpad, ModelAppleTouchpad, ModelWacomTouchpad, ModelChromebook
Reserved for touchpads made by the respective vendors
ModelTouchpadVisibleMarker
Indicates the touchpad has a drawn-on visible marker between the software
@ -148,9 +148,6 @@ ModelBouncingKeys
ModelSynapticsSerialTouchpad
Reserved for touchpads made by Synaptics on the serial bus
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,
on pressure pads pressure is a real physical axis.
Indicates that the device is a pressure pad.
@ -158,13 +155,9 @@ ModelTouchpadPhantomClicks
Some laptops are prone to registering touchpad clicks when the case is
bent. Indicates that clicks should be ignored if no fingers are on the
touchpad.
ModelScrollOnMiddleClick
Some mice can generate unwanted high-resolution scroll events when the wheel
is pressed. Increases the scroll threshold required to start scrolling to
avoid accidentally scrolling when middle clicking.
AttrSizeHint=NxM, AttrResolutionHint=NxM
AttrSizeHint=NxM, AttrResolutionHint=N
Hints at the width x height of the device in mm, or the resolution
of the x and y axes in units/mm. These may only be used where they apply to
of the x/y axis in units/mm. These may only be used where they apply to
a large proportion of matching devices. They should not be used for any
specific device, override ``EVDEV_ABS_*`` instead, see
:ref:`absolute_coordinate_ranges_fix`.
@ -202,9 +195,6 @@ AttrInputProp=+INPUT_PROP_BUTTONPAD;-INPUT_PROP_POINTER;
Enables or disables the evdev input property on the device. The prefix
for each entry is either '+' (enable) or '-' (disable). Entries may be
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
Indicates the integration of the pointing stick. This is a string enum.
Only needed for external pointing sticks. These are rare.

View file

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

View file

@ -1,31 +0,0 @@
digraph stack
{
compound=true;
rankdir="LR";
node [
shape="box";
]
subgraph cluster_2 {
label="Kernel";
event0 [label="/dev/input/event0"]
}
subgraph cluster_1 {
label="libinput";
subgraph cluster_0 {
label="Plugin pipeline";
p1 [label="00-foo.lua"];
p2 [label="10-bar.lua"];
}
libinput [label="libinput core"];
}
compositor [label="Compositor"];
event0 -> p1;
p1 -> p2;
p2 -> libinput;
libinput -> compositor [ltail=cluster_1 label="libinput API"];
}

View file

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

View file

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

View file

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

View file

@ -12,7 +12,6 @@
troubleshooting
contributing
development
lua-plugins
API documentation <@HTTP_DOC_LINK@/api/>

View file

@ -1,661 +0,0 @@
.. _lua_plugins:
==============================================================================
Lua Plugins
==============================================================================
libinput provides a plugin system that allows users to modify the behavior
of devices. For example, a plugin may add or remove axes and/or buttons on a
device and/or modify the event stream seen by this device before it is passed
to libinput.
Plugins are implemented in `Lua <https://www.lua.org/>`_ (version 5.4)
and are typically loaded from the following paths:
- ``/etc/libinput/plugins/*.lua``, and
- ``/usr/lib{64}/libinput/plugins/*.lua``
Plugins are loaded in alphabetical order and where
multiple plugins share the same file name, the one in the highest precedence
directory is used. Plugins in ``/etc`` take precedence over
plugins in ``/usr``.
.. note:: Plugins lookup paths and their order are decided by the compositor.
Some compositors may support more/fewer/other lookup paths than the
above defaults.
Plugins are run sequentially in ascending sort-order (i.e. ``00-foo.lua`` runs
before ``10-bar.lua``) and each plugin sees the state left by any previous
plugins. For example if ``00-foo.lua`` changes all left button events to right
button events, ``10-bar.lua`` only ever sees right button events.
See the `Lua Reference manual <https://www.lua.org/manual/5.4/manual.html>`_ for
details on the Lua language.
.. note:: Plugins are **not** loaded by default, it is up to the compositor
whether to allow plugins. An explicit call to
``libinput_plugin_system_load_plugins()`` is required.
------------------------------------------------------------------------------
Limitations
------------------------------------------------------------------------------
Each script runs in its own sandbox and cannot communicate or share state with
other scripts.
Tables that hold API methods are not writable, i.e. it is not possible
to overwrite the default functionality of those APIs.
The Lua API available to plugins is limited to the following calls::
assert error ipairs next pairs tonumber
pcall select print tostring type xpcall
table string math _VERSION
It is not possible to e.g. use the ``io`` module from a script.
To use methods on instantiated objects, the ``object:method`` method call
syntax must be used. For example:
.. code-block:: lua
libinput:register()
libinput.register() -- this will fail
------------------------------------------------------------------------------
When to use plugins
------------------------------------------------------------------------------
libinput plugins are a relatively niche use-case that typically need to
address either once-off issues (e.g. those caused by worn-out hardware) or
user preferences that libinput does not and will not cater for.
Plugins should not be used for issues that can be fixed generically, for
example via :ref:`device-quirks`.
As a rule of thumb: a plugin should be a once-off that only works for one
user's hardware. If a plugin can be shared with many users then the plugin
implements functionality that should be integrated into libinput proper.
------------------------------------------------------------------------------
Testing plugins
------------------------------------------------------------------------------
Our :ref:`tools` support plugins if passed the ``--enable-plugins`` commandline
option. For implementing and testing plugins the easiest commands to test are
- ``libinput debug-events --enable-plugins`` (see :ref:`libinput-debug-events` docs)
- ``libinput debug-gui --enable-plugins`` (see :ref:`libinput-debug-gui` docs)
Where libinput is built and run from git, the tools will also look for plugins
in the meson build directory. See the ``plugins/meson.build`` file for details.
.. _plugins_api_lua:
--------------------------------------------------------------------------------
Lua Plugin API
--------------------------------------------------------------------------------
Lua plugins sit effectively below libinput and the API is not a
representation of the libinput API. Plugins modify the evdev event stream
received from the kernel.
.. graphviz:: plugin-stack.gv
The API revolves around two types: ``libinput`` and ``EvdevDevice``. The
``libinput`` type is used to register a plugin from a script, the
``EvdevDevice`` represents one device that is present in the system (but may
not have yet been added by libinput).
Typically a script does the following steps:
- register with libinput via ``libinput:register({versions})``
- connect to the ``"new-evdev-device"`` event
- receive an ``EvdevDevice`` object in the ``"new-evdev-device"`` callback
- check and/or modify the evdev event codes on the device
- connect to the device's ``"evdev-frame"`` event
- receive an :ref:`evdev frame <plugins_api_evdev_frame>` in the device's
``"evdev-frame"`` callback
- check and/or modify the events in that frame
Where multiple plugins are active, the evdev frame passed to the callback is
the combined frame as processed by all previous plugins in ascending sort order.
For example, if one plugin discards all button events subsequent plugins will
never see those button events in the frame.
.. _plugins_api_version_stability:
..............................................................................
Plugin version stability
..............................................................................
Plugin API version stability is provided on a best effort basis. We aim to provide
stable plugin versions for as long as feasible but may need to retire some older
versions over time. For this reason a plugin can select multiple versions it
implements, libinput will pick one supported version and adjust the plugin
behavior to match that version. See the ``libinput:register()`` call for details.
--------------------------------------------------------------------------------
Lua Plugin API Reference
--------------------------------------------------------------------------------
libinput provides the following globals and types:
.. _plugins_api_evdev_usage:
................................................................................
Evdev Usages
................................................................................
Evdev usages are a libinput-specific wrapper around the ``linux/input-event-codes.h``
evdev types and codes. They are used by libinput internally and are a 32-bit
combination of ``type << 16 | code``. Each usage carries the type and code and
is thus simpler to pass around and less prone to type confusion.
The :ref:`evdev global <plugins_api_evdev_global>` attempts to provide all
available usages but for the niche cases where it does not provide a named constant
the value can be crafted manually:
.. code-block:: lua
evdev_type = 0x2 -- EV_REL
evdev_code = 0x1 -- REL_Y
evdev_usage = (evdev_type << 16) | evdev_code
assert(usage == evdev.REL_Y)
.. _plugins_api_evdev_global:
................................................................................
The ``evdev`` global
................................................................................
The ``evdev`` global represents all known :ref:`plugins_api_evdev_usage`,
effectively in the form:
.. code-block:: lua
evdev = {
ABS_X = (3 << 16) | 0,
ABS_Y = (3 << 16) | 1,
...
REL_X = (2 << 16) | 0,
REL_Y = (2 << 16) | 1,
...
}
This global is provided for convenience to improve readability in the code.
Note that the name uses the event code name only (e.g. ``evdev.ABS_Y``) but the
value is an :ref:`Evdev Usage <plugins_api_evdev_usage>` (type and code).
See the ``linux/input-event-codes.h`` header file provided by your kernel
for a list of all evdev types and codes.
The evdev global also provides the bus type constants, e.g. ``evdev.BUS_USB``.
See the ``linux/input.h`` header file provided by your kernel
for a list of bus types.
.. _plugins_api_evdev_frame:
................................................................................
Evdev frames
................................................................................
Evdev frames represent a single frame of evdev events for a device. A frame
is a group of events that occurred at the same time. The frame usually only
contains state that has changed compared to the previous frame.
In our API a frame is exposed as a nested table with the following structure:
.. code-block:: lua
frame1 = {
{ usage = evdev.ABS_X, value = 123 },
{ usage = evdev.ABS_Y, value = 456 },
{ usage = evdev.BTN_LEFT, value = 1 },
}
frame2 = {
{ usage = evdev.ABS_Y, value = 457 },
}
frame3 = {
{ usage = evdev.ABS_X, value = 124 },
{ usage = evdev.BTN_LEFT, value = 0 },
}
.. note:: This API does not use ``SYN_REPORT`` events, it is implied at the
end of the table. Where a plugin writes a ``SYN_REPORT`` into the
list of events, that ``SYN_REPORT`` terminates the event frame
(similar to writing a ``\0`` into the middle of a C string).
A frame containing only a ``SYN_REPORT`` is functionally equivalent
to an empty frame.
Events or frames do not have a timestamp. Where a timestamp is required, that
timestamp is passed as additional argument to the function or return value.
See :ref:`plugins_api_evdev_global` for a list of known usages.
.. warning:: Evdev frames have an implementation-defined size limit of how many
events can be added to a single frame. This limit should never be
hit by valid plugins.
.. _plugins_api_libinputglobal:
................................................................................
The ``libinput`` global object
................................................................................
The core of our plugin API is the ``libinput`` global object. A script must
immediately ``register()`` to be active, otherwise it is unloaded immediately.
All libinput-specific APIs can be accessed through the ``libinput`` object.
.. function:: libinput:register({1, 2, ...})
Register this plugin with the given table of supported version numbers and
returns the version number selected by libinput for this plugin. See
:ref:`plugins_api_version_stability` for details.
.. code-block:: lua
-- this plugin can support versions 1, 4 and 5
version = libinput:register({1, 4, 5})
if version == 1 then
...
This function must be the first function called.
If the plugin calls any other functions before ``register()``, those functions
return the default zero value for the return type (``nil``, ``0``, an empty
table, etc.).
If the plugin does not call ``register()`` it will be removed immediately.
Once registered, any connected callbacks will be invoked whenever libinput
detects new devices, removes devices, etc.
This function must only be called once.
.. function:: libinput:unregister()
Unregister this plugin. This removes the plugin from libinput and releases
any resources associated with this plugin. This call must be the last call
in your plugin, it is effectively equivalent to Lua's
`os.exit() <https://www.lua.org/manual/5.4/manual.html#pdf-os.exit>`_.
.. function:: libinput:log_debug(message)
Log a message at the libinput debug log priority. See
``libinput:log_error()`` for details.
.. function:: libinput:log_info(message)
Log a message at the libinput info log priority. See
``libinput:log_error()`` for details.
.. function:: libinput:log_error(message)
Log a message at the libinput error log priority. Whether a message is
displayed in the log depends on libinput's log priority, set by the caller.
A compositor may disable stdout and stderr. Log messages should be preferred
over Lua's ``print()`` function to ensure the messages end up in the same
location as other libinput log messages and are not discarded.
.. function:: libinput:now()
Returns the current time in microseconds in ``CLOCK_MONOTONIC``. This is
the timestamp libinput uses internally. This timestamp cannot be mapped
to any particular time of day, see the
`clock_gettime() man page <https://man7.org/linux/man-pages/man3/clock_gettime.3.html>`_
for details.
.. function:: libinput:version()
Returns the agreed-on version of the plugin, see ``libinput:register()``.
If called before ``libinput:register()`` this function returns ``0``.
.. function:: libinput:connect(name, function)
Set the callback to the given event name. Only one callback
may be set for an event name at any time, subsequent callbacks
will replace any earlier callbacks for the same name.
Version 1 of the plugin API supports the following events and callback arguments:
- ``"new-evdev-device"``: A new :ref:`EvdevDevice <plugins_api_evdevdevice>`
has been seen by libinput but not yet added.
.. code-block:: lua
libinput:connect("new-evdev-device", function (device) ... end)
- ``"timer-expired"``: The timer for this plugin has expired. This event is
only sent if the plugin has set a timer with ``timer_set()``.
.. code-block:: lua
libinput:connect("timer-expired", function (now) ... end)
The ``now`` argument is the current time in microseconds in
``CLOCK_MONOTONIC`` (see ``libinput:now()``).
.. function:: libinput:timer_cancel()
Cancel the timer for this plugin. This is a no-op if the timer
has not been set or has already expired.
.. function:: libinput:timer_set_absolute(time)
Set a timer for this plugin, with the given time in microseconds.
The timeout specifies an absolute time in microseconds (see
``libinput:now()``) The timer will expire once and then call the
``"timer-expired"`` event handler (if any).
See ``libinput:timer_set_relative()`` for a relative timer.
The following two lines of code are equivalent:
.. code-block:: lua
libinput:timer_set_relative(1000000) -- 1 second from now
libinput:timer_set_absolute(libinput:now() + 1000000) -- 1 second from now
Calling this function will cancel any existing (relative or absolute) timer.
.. function:: libinput:timer_set_relative(timeout)
Set a timer for this plugin, with the given timeout in microseconds from
the current time. The timer will expire once and then call the
``"timer-expired"`` event handler (if any).
See ``libinput:timer_set_absolute()`` for an absolute timer.
The following two lines of code are equivalent:
.. code-block:: lua
libinput:timer_set_relative(1000000) -- 1 second from now
libinput:timer_set_absolute(libinput:now() + 1000000) -- 1 second from now
Calling this function will cancel any existing (relative or absolute) timer.
.. _plugins_api_evdevdevice:
................................................................................
The ``EvdevDevice`` type
................................................................................
The ``EvdevDevice`` type represents a device available in the system
but not (yet) added by libinput. This device may be used to modify
a device's capabilities before the device is processed by libinput.
A plugin should always ``connect()`` to the ``"device-removed"`` callback
to be notified when a device is removed. If the plugin keeps a reference
to this device but the device is discarded by libinput, the device's query
methods will return zero values (e.g. ``nil``, ``0``, an empty table) and
methods will be noops.
.. function:: EvdevDevice:info()
A table containing static information about the device, e.g.
.. code-block:: lua
{
bustype = evdev.BUS_USB,
vid = 0x1234,
pid = 0x5678,
}
A plugin must ignore keys it does not know about.
Version 1 of the plugin API supports the following keys and values:
- ``bustype``: The numeric bustype of the device. See the
``BUS_*`` defines in ``linux/input.h`` for the list of possible values.
- ``vid``: The 16-bit vendor ID of the device
- ``pid``: The 16-bit product ID of the device
If the device has since been discarded by libinput, this function returns an
empty table.
.. function:: EvdevDevice:name()
The device name as set by the kernel
.. function:: EvdevDevice:usages()
Returns a table of all usages that are currently enabled for this
device. Any type that exists on the device has a table assigned and in this
table any code that exists on the device is a boolean true.
For example:
.. code-block:: lua
{
evdev.REL_X = true,
evdev.REL_Y = true,
evdev.BTN_LEFT = true,
}
All other usages are ``nil``, so that the following code is possible:
.. code-block:: lua
local usages = device:usages()
if usages[evdev.REL_X] then
-- do something
end
If the device has since been discarded by libinput, this function returns an
empty table.
.. function:: EvdevDevice:absinfos()
Returns a table of all ``EV_ABS`` codes that are currently enabled for this device.
The event code is the key, each value is a table containing the following keys:
``minimum``, ``maximum``, ``fuzz``, ``flat``, ``resolution``.
.. code-block:: lua
{
evdev.ABS_X = {
minimum = 0,
maximum = 1234,
fuzz = 0,
flat = 0,
resolution = 45,
},
}
If the device has since been discarded by libinput, this function returns an
empty table.
.. function:: EvdevDevice:udev_properties()
Returns a table containing a filtered list of udev properties available on this device
in the form ``{ property_name = property_value, ... }``.
udev properties used as a boolean (e.g. ``ID_INPUT``) are only present if their
value is a logical true.
Version 1 of the plugin API supports the following udev properties:
- All of ``ID_INPUT_*`` that denote the device type as assigned
by udev. This information is usually used by libinput to determine a
device type. Note that for historical reasons these properties have
varying rules - some properties may be mutually exclusive, others are
independent, others may only be set if another property is set. Refer to
the udev documentation (if any) for details. ``ID_INPUT_WIDTH_MM`` and
``ID_INPUT_HEIGHT_MM`` are excluded from this set.
If the device has since been discarded by libinput, this function returns an
empty table.
.. function:: EvdevDevice:enable_evdev_usage(usage)
Enable the given :ref:`evdev usage <plugins_api_evdev_usage>` for this device.
Use :ref:`plugins_api_evdev_global` for better readability,
e.g. ``device:enable_evdev_usage(evdev.REL_X)``.
This function must not be used for ``ABS_*`` events, use ``set_absinfo()``
instead.
Once a usage is enabled, events for that usage may be added to a device's
frame.
If the device has since been discarded by libinput, this function does nothing.
.. function:: EvdevDevice:disable_evdev_usage(usage)
Disable the given :ref:`evdev usage <plugins_api_evdev_usage>` for this device.
Use :ref:`plugins_api_evdev_global` for better readability,
e.g. ``device:disable_evdev_usage(evdev.REL_X)``.
Once a usage is disabled, events for that usage are discarded from any
device frame.
If the device has since been discarded by libinput, this function does nothing.
.. function:: EvdevDevice:set_absinfo(usage, absinfo)
Set the absolute axis information for the given :ref:`evdev usage <plugins_api_evdev_usage>`
and enable it if it does not yet exist on the device. The ``absinfo`` argument is a table
containing zero or more of the following keys: ``minimum``, ``maximum``, ``fuzz``,
``flat``, ``resolution``. Any missing key defaults the corresponding
value from the device if the device already has this event usage or zero otherwise.
For example, the following code changes the resolution but leaves everything
else as-is:
.. code-block:: lua
local absinfo = {
resolution = 40,
}
device:set_absinfo(evdev.ABS_X, absinfo)
device:set_absinfo(evdev.ABS_Y, absinfo)
Use :ref:`plugins_api_evdev_global` for better readability as shown in the
example above.
If the device has since been discarded by libinput, this function does nothing.
.. note:: Overriding the absinfo values often indicates buggy firmware. This should
typically be fixed with an entry in the
`60-evdev.hwdb <https://github.com/systemd/systemd/blob/main/hwdb.d/60-evdev.hwdb>`_
or :ref:`device-quirks` instead of a plugin so all users of that
device can benefit from the fix.
.. function:: EvdevDevice:connect(name, function)
Set the callback to the given event name. Only one callback
may be set for an event name at any time, subsequent callbacks
will overwrite any earlier callbacks for the same name.
If the device has since been discarded by libinput, this function does nothing.
Version 1 of the plugin API supports the following events and callback arguments:
- ``"evdev-frame"``: A new :ref:`evdev frame <plugins_api_evdev_frame>` has
started for this device. If the callback returns a value other than
``nil``, that value is the frame with any modified events.
An empty frame (``{}``) causes libinput to drop the current event frame.
.. code-block:: lua
device:connect("evdev-frame", function (device, frame, timestamp)
-- change any event into a movement left by 1 pixel
move_left = {
{ usage = evdev.REL_X, value = -1, },
}
return move_left
end
The timestamp of an event frame is in microseconds in ``CLOCK_MONOTONIC``, see
``libinput:now()`` for details.
For performance reasons plugins that do not modify the event frame should
return ``nil`` (or nothing) instead of the event frame that was passed
as argument.
- ``"device-removed"``: This device was removed by libinput. This may happen
without the device ever becoming a libinput device as seen by libinput's
public API (e.g. if the device does not meet the requirements to be
added). Once this callback is invoked, the plugin should remove any
references to this device and stop using it.
.. code-block:: lua
device:connect("device-removed", function (device) ... end)
Functions to query the device's capabilities (e.g. ``usages()``) will
return an empty table.
.. function:: EvdevDevice:disconnect(name)
Disconnect the existing callback (if any) for the given event name. See
``EvdevDevice:connect()`` for a list of supported names.
.. function:: EvdevDevice:prepend_frame(frame)
Prepend an :ref:`evdev frame <plugins_api_evdev_frame>` for this device
**before** the current frame (if any). The **next** plugin will see the
prepended frame first followed by the current frame.
This function can only be called from within a device's ``"evdev-frame"``
handler or from within the plugin's timer callback function.
For example, to change a single event into a drag, prepend a button
down and append a button up before each event:
.. code:: lua
function frame_handler(device, frame, timestamp)
device:prepend_frame({
{ usage = evdev.BTN_LEFT, value = 1}
})
device:append_frame({
{ usage = evdev.BTN_LEFT, value = 0}
})
return nil -- return the current frame unmodified
-- The next plugin sees the event sequence:
-- button down, frame, button up
end
If called from within the plugin's timer there is no current frame and this
function is identical to ``append_frame()``.
.. function:: EvdevDevice:append_frame(frame)
Appends an :ref:`evdev frame <plugins_api_evdev_frame>` for this device
**after** the current frame (if any). This function can only be called from
within a device's ``"evdev-frame"`` handler or from within the plugin's timer
callback function.
If called from within the plugin's timer there is no current frame and this
function is identical to ``prepend_frame()``.
See ``prepend_frame()`` for more details.
.. function:: EvdevDevice:disable_feature(feature_name)
Disable the given libinput-internal feature for this device. This should be used
by plugins that replace that feature with a custom implementation for this device.
libinput may have multiple internal implementations for any given feature, disabling
it via this API disables any and all of those implementations, causing the feature to
no longer work at all. It is up to the plugin implementation to re-implement that
feature to match the user's expectation.
Version 1 of the plugin API supports the following features:
- ``"button-debouncing"``: see :ref:`button_debouncing`
- ``"touchpad-hysteresis"``: see :ref:`touchpad_jitter`
- ``"touchpad-jump-detection"``: see :ref:`touchpad_jumping_cursor`
- ``"touchpad-palm-detection"``: see :ref:`palm_detection`
- ``"wheel-debouncing"``: some high-resolution mouse wheel movements inside libinput
are delayed and/or modified

View file

@ -95,13 +95,11 @@ src_rst = files(
# dot drawings
'dot/seats-sketch.gv',
'dot/seats-sketch-libinput.gv',
'dot/libinput-contexts.gv',
'dot/libinput-stack-wayland.gv',
'dot/libinput-stack-xorg.gv',
'dot/libinput-stack-gnome.gv',
'dot/evemu.gv',
'dot/libinput-record.gv',
'dot/plugin-stack.gv',
# svgs
'svg/button-debouncing-wave-diagram.svg',
'svg/button-scrolling.svg',
@ -131,7 +129,6 @@ src_rst = files(
'svg/tablet-intuos-modes.svg',
'svg/tablet-left-handed.svg',
'svg/tablet-out-of-bounds.svg',
'svg/tablet-touch-arbitration.svg',
'svg/tablet.svg',
'svg/tap-n-drag.svg',
'svg/thumb-detection.svg',
@ -158,7 +155,6 @@ src_rst = files(
'middle-button-emulation.rst',
'normalization-of-relative-motion.rst',
'palm-detection.rst',
'lua-plugins.rst',
'pointer-acceleration.rst',
'reporting-bugs.rst',
'scrolling.rst',

View file

@ -14,7 +14,7 @@ touch the bottom edges of the touchpad during normal interaction.
Interference from a palm depends on the size of the touchpad and the position
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
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
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
the threshold again. This ensures that a palm remains a palm even when the
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
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
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.
libinput employs a method similar to :ref:`disable-while-typing` to detect

View file

@ -39,7 +39,7 @@ Velocity calculation
------------------------------------------------------------------------------
The device's speed of movement is measured across multiple input events
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,
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

View file

@ -113,8 +113,8 @@ When you file a bug, please attach the following information:
- the output from udevadm info, see :ref:`udev_info`.
- the vendor model number of your laptop (e.g. "Lenovo Thinkpad T440s")
- and the content of ``/sys/class/dmi/id/modalias``.
- run ``libinput measure touchpad-size`` tool (see :ref:`absolute_coordinate_ranges_fix`)
and verify that the ranges and sizes it prints match the touchpad (up to 5mm
- run the ``touchpad-edge-detector`` tool (provided by libevdev) and verify
that the ranges and sizes it prints match the touchpad (up to 5mm
difference is ok)
If you are reporting a bug related to button event generation:
@ -185,7 +185,7 @@ When you file a bug, please attach the following information:
- a virtual description of your input device, see :ref:`libinput-record`.
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:
@ -368,7 +368,7 @@ them.
without someone stepping up to do the work. If you do see this tag, do ask
for guidance on how to implement it.
- **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*.
- **janitor**: a cleanup task that does not substantially affect how
libinput works. These are usually good bugs for newcomers to start on.
@ -389,7 +389,7 @@ them.
*cantfix*.
- **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
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
the issue to get further details.

View file

@ -12,7 +12,7 @@ one can be enabled at a time. As a general overview:
- touchpad devices with physical buttons below the touchpad support edge and
two-finger scrolling
- touchpad devices without physical buttons (:ref:`ClickPads <clickpad_softbuttons>`)
support two-finger scrolling and edge scrolling
support two-finger scrolling only
- pointing sticks provide on-button scrolling by default
- mice and other pointing devices support on-button scrolling but it is not
enabled by default
@ -124,12 +124,6 @@ button lock, the button is now considered logically held down. Pressing and
releasing the button a second time logically releases the button. While the
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:
------------------------------------------------------------------------------

View file

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

View file

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

Before

Width:  |  Height:  |  Size: 12 KiB

View file

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

View file

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

View file

@ -59,16 +59,13 @@ tap-and-drag enabled by default.
middle-click drag, tap with three fingers followed by a
single-finger drag.
Also optional is a feature called "drag lock". With drag lock **disabled**,
lifting the finger will stop any drag process. When **enabled**, the drag
process continues even after lifting a finger, allowing the user to
reset the finger position and keep moving without releasing the drag.
libinput supports two variations of this drag lock: "sticky" and "timeout".
In sticky mode, the drag lock must be ended with an explicit additional tap.
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()**.
Also optional is a feature called "drag lock". With drag lock disabled, lifting
the finger will stop any drag process. When enabled, the drag
process continues even after lifting a finger but can be ended
with an additional tap. If timeout-based drag-locks are enabled
the drag process will also automatically end once the finger has
been lifted for an implementation-specific 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.
.. 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
useful on small touchpads or with slow pointer acceleration.
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**
but the dragging finger is released at the very edge of the touchpad,
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 drag lock is enabled in sticky mode there is no timeout after
releasing a finger and an extra tap is required to release the button.
If two fingers are supported by the hardware, a second finger can be used to
drag while the first is held in-place.

View file

@ -15,7 +15,7 @@ run to check for behavior changes and/or regressions. For quick iteration,
the number of tests to run can be filtered, see :ref:`test-filtering`.
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
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.
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
``--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
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
make when run in gdb.
@ -235,7 +235,7 @@ suites as:
::
$ meson test --no-suite=hardware # only run container-friendly tests
$ meson test --no-suite=machine # only run container-friendly tests
$ meson test --suite=valgrind --setup=valgrind # run all valgrind-compatible tests
$ meson test --no-suite=root # run all tests not requiring root

View file

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

View file

@ -8,10 +8,10 @@ Touchpad jitter describes random movement by a few pixels even when the
user's finger is unmoving.
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
pointer movement. This is a simplified summary, developers should
read the implementation of the hysteresis in ``src/evdev.h``.
read the implementation of the hysteresis in ``src/evdev.c``.
libinput uses the kernel ``fuzz`` value to determine the size of the
hysteresis. Users should override this with a udev hwdb entry where the

View file

@ -53,38 +53,31 @@ Example output of the tool is below: ::
with --touch-thresholds=down:up using observed pressure values.
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
┌───────────────────────────────────────────────────────────────────────────────┐
│ Touch │ down │ up │ palm │ thumb │ min │ max │ p │ avg │ median │
├───────────────────────────────────────────────────────────────────────────────┤
│ 178 │ x │ x │ │ │ 75 │ 75 │ 0 │ 75 │ 75 │
│ 179 │ x │ x │ │ │ 35 │ 88 │ 0 │ 77 │ 81 │
│ 180 │ x │ x │ │ x │ 65 │ 113 │ 0 │ 98 │ 98 │
│ 181 │ x │ x │ │ x │ 50 │ 101 │ 0 │ 86 │ 90 │
│ 182 │ x │ x │ │ │ 40 │ 80 │ 0 │ 66 │ 70 │
│ 183 │ x │ │ │ │ 43 │ 78 │ 78 │ │
│ Thresh │ 70 │ 60 │ 130 │ 100 │
+-------------------------------------------------------------------------------+
| Thresh | 70 | 60 | 130 | 100 | |
+-------------------------------------------------------------------------------+
| Touch | down | up | palm | thumb | min | max | p | avg | median |
+-------------------------------------------------------------------------------+
| 178 | x | x | | | 75 | 75 | 0 | 75 | 75 |
| 179 | x | x | | | 35 | 88 | 0 | 77 | 81 |
| 180 | x | x | | x | 65 | 113 | 0 | 98 | 98 |
| 181 | x | x | | x | 50 | 101 | 0 | 86 | 90 |
| 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.
For each, the respective minimum and maximum pressure values are printed as
well as some statistics. The ``down`` column shows that each sequence was
considered logically down at some point (see the thresholds in the last line),
two of the sequences were considered thumbs. This is an interactive tool and
its output may change frequently. Refer to the
**libinput-measure-touchpad-pressure(1)** man page for more details.
well as some statistics. The ``down`` column show that each sequence was
considered logically down at some point, two of the sequences were considered
thumbs. This is an interactive tool and its output may change frequently. Refer
to the **libinput-measure-touchpad-pressure(1)** man page for more details.
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
the keys q/a, w/s, e/d and r/f or specify the 'logically down'
narrow down on the best values for your device, specify the 'logically down'
and 'logically up' pressure thresholds with the ``--touch-thresholds``
argument: ::
@ -107,12 +100,12 @@ Once the thresholds are decided on (e.g. 10 and 8), they can be enabled with
[Touchpad pressure override]
MatchUdevType=touchpad
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX230:*
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX230*
AttrPressureRange=10:8
AttrPalmPressureThreshold=150
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``
directives limit the quirk to your touchpad, make sure the device name
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
works for your device: ::
$ sudo libinput quirks list /dev/input/event10
$ sudo libinput list-quirks /dev/input/event10
AttrPressureRange=10:8
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]
MatchUdevType=touchpad
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnLENOVO:*:pvrThinkPadX230:*
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX230*
AttrTouchSizeRange=10:8
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
works for your device: ::
$ sudo libinput quirks list /dev/input/event10
$ sudo libinput list-quirks /dev/input/event10
AttrTouchSizeRange=10:8
Replace the event node with the one from your device. If the

View file

@ -50,7 +50,7 @@ touchpads. Some devices can detect multiple fingers but only provide
Some devices provide additional touch size information through
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
these axes are supposed to be mapped, few devices forward reliable
information. libinput uses these values together with a device-specific

View file

@ -17,7 +17,7 @@ other properties.
Number of buttons
------------------------------------------------------------------------------
.. _touchpads_buttons_phys:
.. _touchapds_buttons_phys:
..............................................................................
Physically separate buttons
@ -25,7 +25,7 @@ Physically separate buttons
Touchpads with physical buttons usually provide two buttons, left and right.
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
this when both buttons are pressed simultaneously.
@ -57,7 +57,7 @@ property.
.. _touchpads_buttons_forcepads:
..............................................................................
Forcepads/Pressurepads
Forcepads
..............................................................................
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
click or be co-opted for other tasks.
Forcepads are also called pressurepads or haptic touchpads.
.. _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
slots thus equals the number of simultaneous touches a device can track.
.. _touchpads_touch_st:
.. _touchapds_touch_st:
..............................................................................
Single-touch touchpads

View file

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

View file

@ -25,7 +25,7 @@ Button scrolling on trackpoints
------------------------------------------------------------------------------
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.
.. _trackpoint_range:

View file

@ -131,7 +131,7 @@ Handled device types
- Mice
- Keyboards
- 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
- :ref:`Trackpoints`

View file

@ -45,7 +45,7 @@ Both events have their own set of APIs to access the data within:
- ``LIBINPUT_EVENT_POINTER_SCROLL_WHEEL`` available since libinput 1.19.
* ``libinput_event_pointer_get_scroll_value_v120()`` returns a value
normalized into multiples of 120, see below. Any multiple of 120 should
normalized into the 0..120 range, see below. Any multiple of 120 should
be treated as one full wheel click.
.. note:: Where possible, the ``libinput_event_pointer_get_axis_value()``,
@ -77,7 +77,7 @@ wheel:
| 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:
+-------------+------------+---------------+------+

View file

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

View file

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

View file

@ -1,8 +1,8 @@
project('libinput', 'c',
version : '1.31.0',
version : '1.28.903',
license : 'MIT/Expat',
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
meson_version : '>= 0.64.0')
meson_version : '>= 0.56.0')
libinput_version = meson.project_version().split('.')
@ -80,11 +80,10 @@ endif
config_h.set_quoted('HTTP_DOC_LINK', doc_url)
config_h.set('_GNU_SOURCE', '1')
is_debug_build = get_option('buildtype') == 'debug' or get_option('buildtype') == 'debugoptimized'
if is_debug_build
config_h.set('IS_DEBUG_BUILD', '1')
if get_option('buildtype') == 'debug' or get_option('buildtype') == 'debugoptimized'
config_h.set_quoted('MESON_BUILD_ROOT', meson.current_build_dir())
else
config_h.set_quoted('MESON_BUILD_ROOT', '')
endif
prefix = '''#define _GNU_SOURCE 1
@ -157,9 +156,8 @@ if not cc.has_header_symbol('sys/ptrace.h', 'PTRACE_ATTACH', prefix : prefix)
config_h.set('PTRACE_CONT', 'PT_CONTINUE')
config_h.set('PTRACE_DETACH', 'PT_DETACH')
endif
if get_option('install-tests')
config_h.set('HAVE_INSTALLED_TESTS', 1)
endif
config_h.set10('HAVE_INSTALLED_TESTS', get_option('install-tests'))
# Dependencies
pkgconfig = import('pkgconfig')
@ -169,32 +167,6 @@ dep_libevdev = dependency('libevdev', version: '>= 1.10.0')
dep_lm = cc.find_library('m', required : false)
dep_rt = cc.find_library('rt', required : false)
dep_lua = dependency('lua-5.4', 'lua5.4', 'lua',
version : '>= 5.4',
required : get_option('lua-plugins'))
have_lua = dep_lua.found()
if have_lua
config_h.set('HAVE_LUA', 1)
endif
have_plugins = dep_lua.found()
if have_plugins
config_h.set('HAVE_PLUGINS', 1)
endif
autoload_plugins = get_option('autoload-plugins')
if autoload_plugins
config_h.set('AUTOLOAD_PLUGINS', 1)
endif
summary({
'Plugins enabled' : have_plugins,
'Autoload plugins' : autoload_plugins,
'Lua Plugin support' : have_lua,
},
section : 'Plugins',
bool_yn : true)
# Include directories
includes_include = include_directories('include')
includes_src = include_directories('src')
@ -202,8 +174,8 @@ includes_src = include_directories('src')
############ mtdev configuration ############
have_mtdev = get_option('mtdev')
config_h.set10('HAVE_MTDEV', have_mtdev)
if have_mtdev
config_h.set('HAVE_MTDEV', 1)
dep_mtdev = dependency('mtdev', version : '>= 1.1.0')
else
dep_mtdev = declare_dependency()
@ -212,8 +184,8 @@ endif
############ libwacom configuration ############
have_libwacom = get_option('libwacom')
config_h.set10('HAVE_LIBWACOM', have_libwacom)
if have_libwacom
config_h.set('HAVE_LIBWACOM', 1)
dep_libwacom = dependency('libwacom', version : '>= 0.27')
if cc.has_header_symbol('libwacom/libwacom.h', 'WACOM_BUTTON_DIAL_MODESWITCH',
dependencies : dep_libwacom)
@ -223,10 +195,6 @@ if have_libwacom
dependencies: dep_libwacom)
config_h.set('HAVE_LIBWACOM_BUTTON_MODESWITCH_MODE', '1')
endif
if cc.has_function('libwacom_stylus_is_generic',
dependencies: dep_libwacom)
config_h.set('HAVE_LIBWACOM_STYLUS_IS_GENERIC', '1')
endif
else
dep_libwacom = declare_dependency()
endif
@ -238,7 +206,6 @@ executable('libinput-device-group',
dependencies : [dep_udev, dep_libwacom],
include_directories : [includes_src, includes_include],
install : true,
install_tag : 'runtime',
install_dir : dir_udev_callouts)
executable('libinput-fuzz-extract',
'udev/libinput-fuzz-extract.c',
@ -247,18 +214,16 @@ executable('libinput-fuzz-extract',
dependencies : [dep_udev, dep_libevdev, dep_lm],
include_directories : [includes_src, includes_include],
install : true,
install_tag : 'runtime',
install_dir : dir_udev_callouts)
executable('libinput-fuzz-to-zero',
'udev/libinput-fuzz-to-zero.c',
dependencies : [dep_udev, dep_libevdev],
include_directories : [includes_src, includes_include],
install : true,
install_tag : 'runtime',
install_dir : dir_udev_callouts)
udev_rules_config = configuration_data()
udev_rules_config.set('UDEV_TEST_PATH', dir_udev_callouts + '/')
udev_rules_config.set('UDEV_TEST_PATH', '')
configure_file(input : 'udev/80-libinput-device-groups.rules.in',
output : '80-libinput-device-groups.rules',
install_dir : dir_udev_rules,
@ -404,16 +369,17 @@ libquirks = static_library('quirks', src_libquirks,
dep_libquirks = declare_dependency(link_with : libquirks)
# Create /etc/libinput
install_emptydir(dir_etc / 'libinput')
if meson.version().version_compare('>= 0.60')
install_emptydir(dir_etc / 'libinput')
else
install_subdir('libinput', install_dir : dir_etc)
endif
############ libinput.so ############
if get_option('internal-event-debugging')
config_h.set('EVENT_DEBUGGING', 1)
endif
config_h.set_quoted('LIBINPUT_PLUGIN_LIBDIR', dir_lib / 'libinput' / 'plugins')
config_h.set_quoted('LIBINPUT_PLUGIN_ETCDIR', dir_etc / 'libinput' / 'plugins')
install_headers('src/libinput.h')
src_libinput = src_libfilter + [
'src/libinput.c',
@ -445,17 +411,10 @@ src_libinput = src_libfilter + [
'src/timer.c',
'src/util-libinput.c',
]
if have_mtdev
src_libinput += ['src/libinput-plugin-mtdev.c']
endif
if dep_lua.found()
src_libinput += [
'src/libinput-plugin-lua.c',
]
endif
deps_libinput = [
dep_mtdev,
dep_udev,
@ -465,8 +424,7 @@ deps_libinput = [
dep_rt,
dep_libwacom,
dep_libinput_util,
dep_libquirks,
dep_lua,
dep_libquirks
]
libinput_version_h_config = configuration_data()
@ -497,7 +455,9 @@ dep_libinput = declare_dependency(
link_with : lib_libinput,
dependencies : deps_libinput)
meson.override_dependency('libinput', dep_libinput)
if meson.version().version_compare('>= 0.54.0')
meson.override_dependency('libinput', dep_libinput)
endif
pkgconfig.generate(
filebase : 'libinput',
@ -506,9 +466,6 @@ pkgconfig.generate(
version : meson.project_version(),
libraries : lib_libinput,
requires_private : dep_udev,
variables : [
'plugindir=${libdir}/libinput/plugins'
]
)
git_version_h = vcs_tag(command : ['git', 'describe'],
@ -516,8 +473,6 @@ git_version_h = vcs_tag(command : ['git', 'describe'],
input : 'src/libinput-git-version.h.in',
output :'libinput-git-version.h')
subdir('plugins')
############ documentation ############
if get_option('documentation')
@ -563,7 +518,6 @@ executable('libinput-debug-events',
dependencies : deps_tools,
include_directories : [includes_src, includes_include],
install_dir : libinput_tool_path,
install_tag : 'bin',
install : true
)
@ -573,17 +527,8 @@ executable('libinput-debug-tablet',
dependencies : deps_tools,
include_directories : [includes_src, includes_include],
install_dir : libinput_tool_path,
install_tag : 'bin',
install : true)
libinput_debug_tablet_pad_sources = [ 'tools/libinput-debug-tablet-pad.c' ]
executable('libinput-debug-tablet-pad',
libinput_debug_tablet_pad_sources,
dependencies : deps_tools,
include_directories : [includes_src, includes_include],
install_dir : libinput_tool_path,
install_tag : 'bin',
install : true)
libinput_quirks_sources = [ 'tools/libinput-quirks.c' ]
libinput_quirks = executable('libinput-quirks',
@ -591,7 +536,6 @@ libinput_quirks = executable('libinput-quirks',
dependencies : [dep_libquirks, dep_tools_shared, dep_libinput],
include_directories : [includes_src, includes_include],
install_dir : libinput_tool_path,
install_tag : 'bin',
install : true
)
test('validate-quirks',
@ -613,7 +557,6 @@ libinput_list_devices = executable('libinput-list-devices',
dependencies : deps_tools,
include_directories : [includes_src, includes_include],
install_dir : libinput_tool_path,
install_tag : 'bin',
install : true,
)
test('list-devices',
@ -626,7 +569,6 @@ executable('libinput-measure',
dependencies : deps_tools,
include_directories : [includes_src, includes_include],
install_dir : libinput_tool_path,
install_tag : 'bin',
install : true,
)
@ -636,22 +578,21 @@ executable('libinput-analyze',
dependencies : deps_tools,
include_directories : [includes_src, includes_include],
install_dir : libinput_tool_path,
install_tag : 'bin',
install : true,
)
src_python_tools = files(
'tools/libinput-analyze-buttons.py',
'tools/libinput-analyze-per-slot-delta.py',
'tools/libinput-analyze-recording.py',
'tools/libinput-analyze-touch-down-state.py',
'tools/libinput-list-kernel-devices.py',
'tools/libinput-measure-fuzz.py',
'tools/libinput-measure-touchpad-size.py',
'tools/libinput-measure-touchpad-tap.py',
'tools/libinput-measure-touchpad-pressure.py',
'tools/libinput-measure-touch-size.py',
'tools/libinput-replay.py'
'tools/libinput-analyze-buttons.py',
'tools/libinput-analyze-per-slot-delta.py',
'tools/libinput-analyze-recording.py',
'tools/libinput-analyze-touch-down-state.py',
'tools/libinput-list-kernel-devices.py',
'tools/libinput-measure-fuzz.py',
'tools/libinput-measure-touchpad-size.py',
'tools/libinput-measure-touchpad-tap.py',
'tools/libinput-measure-touchpad-pressure.py',
'tools/libinput-measure-touch-size.py',
'tools/libinput-replay.py'
)
foreach t : src_python_tools
@ -668,23 +609,23 @@ executable('libinput-record',
dependencies : deps_tools + [dep_udev],
include_directories : [includes_src, includes_include],
install_dir : libinput_tool_path,
install_tag : 'bin',
install : true,
)
config_h.set10('HAVE_DEBUG_GUI', get_option('debug-gui'))
if get_option('debug-gui')
config_h.set('HAVE_DEBUG_GUI', 1)
dep_gtk = dependency('gtk4', version : '>= 4.0', required : false)
if dep_gtk.found()
config_h.set('HAVE_GTK4', 1)
else
config_h.set10('HAVE_GTK4', dep_gtk.found())
if not dep_gtk.found()
dep_gtk = dependency('gtk+-3.0', version : '>= 3.20')
if dep_gtk.found()
config_h.set('HAVE_GTK3', 1)
endif
config_h.set10('HAVE_GTK3', dep_gtk.found())
endif
gtk_targets = dep_gtk.get_variable('targets')
if meson.version().version_compare('>= 0.58')
gtk_targets = dep_gtk.get_variable('targets')
else
gtk_targets = dep_gtk.get_pkgconfig_variable('targets')
endif
have_gtk_wayland = gtk_targets.contains('wayland')
have_gtk_x11 = gtk_targets.contains('x11')
@ -695,15 +636,18 @@ if get_option('debug-gui')
dep_wayland_client = dependency('wayland-client', required : false)
dep_wayland_protocols = dependency('wayland-protocols', required : false)
if have_gtk_x11 and dep_x11.found()
config_h.set('HAVE_GTK_X11', 1)
endif
config_h.set10('HAVE_GTK_X11', have_gtk_x11 and dep_x11.found())
config_h.set10('HAVE_GTK_WAYLAND', false)
debug_gui_sources = [ 'tools/libinput-debug-gui.c' ]
if have_gtk_wayland and dep_wayland_client.found() and dep_wayland_protocols.found()
wayland_scanner = find_program('wayland-scanner')
wlproto_dir = dep_wayland_protocols.get_variable('pkgdatadir')
if meson.version().version_compare('>= 0.58')
wlproto_dir = dep_wayland_protocols.get_variable('pkgdatadir')
else
wlproto_dir = dep_wayland_protocols.get_pkgconfig_variable('pkgdatadir')
endif
proto_name = 'pointer-constraints-unstable-v1'
input = files(wlproto_dir / 'unstable' / 'pointer-constraints' / '@0@.xml'.format(proto_name))
@ -721,7 +665,7 @@ if get_option('debug-gui')
)
debug_gui_sources += [ wayland_headers, wayland_sources ]
config_h.set('HAVE_GTK_WAYLAND', 1)
config_h.set10('HAVE_GTK_WAYLAND', true)
endif
deps_debug_gui = [
@ -737,7 +681,6 @@ if get_option('debug-gui')
dependencies : deps_debug_gui,
include_directories : [includes_src, includes_include],
install_dir : libinput_tool_path,
install_tag : 'bin',
install : true
)
src_man += files('tools/libinput-debug-gui.man')
@ -749,7 +692,6 @@ libinput_tool = executable('libinput',
libinput_sources,
dependencies : deps_tools,
include_directories : [includes_src, includes_include],
install_tag : 'bin',
install : true
)
@ -763,10 +705,10 @@ executable('ptraccel-debug',
# Don't run the test during a release build because we rely on the magic
# 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.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('TOOL_PATH', libinput_tool.full_path())
tool_option_test = configure_file(input: 'tools/test_tool_option_parsing.py',
@ -800,13 +742,6 @@ test('tools-builddir-lookup-installed',
############ tests ############
summary({
'Tests enabled' : get_option('tests'),
'Install tests' : get_option('install-tests'),
},
section : 'Tests',
bool_yn : true)
test('symbols-leak-test',
find_program('test/symbols-leak-test'),
args : [ dir_src / 'libinput.sym', dir_src],
@ -847,7 +782,6 @@ executable('libinput-test',
dependencies : deps_tools,
include_directories : [includes_src, includes_include],
install_dir : libinput_tool_path,
install_tag : 'tests',
install : true,
)
@ -857,15 +791,11 @@ if get_option('tests')
dep_check = dependency('check', version : '>= 0.9.10', required: false)
gstack = find_program('gstack', required : false)
if gstack.found()
config_h.set('HAVE_GSTACK', 1)
endif
config_h.set10('HAVE_GSTACK', gstack.found())
# for inhibit support during test run
dep_libsystemd = dependency('libsystemd', version : '>= 221', required : false)
if dep_libsystemd.found()
config_h.set('HAVE_LIBSYSTEMD', 1)
endif
config_h.set10('HAVE_LIBSYSTEMD', dep_libsystemd.found())
litest_sources = [
'src/libinput-private-config.c',
@ -892,8 +822,6 @@ if get_option('tests')
'test/litest-device-format-string.c',
'test/litest-device-generic-pressurepad.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-huion-pentablet.c',
'test/litest-device-huion-q620m-dial.c',
@ -905,7 +833,6 @@ if get_option('tests')
'test/litest-device-keyboard-razer-blackwidow.c',
'test/litest-device-keyboard-razer-blade-stealth.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-lid-switch.c',
'test/litest-device-lid-switch-surface3.c',
@ -915,7 +842,6 @@ if get_option('tests')
'test/litest-device-magic-trackpad.c',
'test/litest-device-mouse.c',
'test/litest-device-mouse-wheel-tilt.c',
'test/litest-device-mouse-wheel-hires-disabled.c',
'test/litest-device-mouse-ps2.c',
'test/litest-device-mouse-roccat.c',
'test/litest-device-mouse-low-dpi.c',
@ -1076,10 +1002,6 @@ if get_option('tests')
'test/test-switch.c',
'test/test-quirks.c',
]
if have_plugins and have_lua
tests_sources += ['test/test-plugins-lua.c']
endif
libinput_test_runner_sources = litest_sources + tests_sources
libinput_test_runner = executable('libinput-test-suite',
libinput_test_runner_sources,
@ -1121,9 +1043,6 @@ if get_option('tests')
'trackpoint',
'udev',
]
if have_plugins and have_lua
collections += ['lua']
endif
foreach group : collections
test('libinput-test-suite-@0@'.format(group),
@ -1184,7 +1103,6 @@ src_man += files(
'tools/libinput-analyze-touch-down-state.man',
'tools/libinput-debug-events.man',
'tools/libinput-debug-tablet.man',
'tools/libinput-debug-tablet-pad.man',
'tools/libinput-list-devices.man',
'tools/libinput-list-kernel-devices.man',
'tools/libinput-measure.man',

View file

@ -42,11 +42,3 @@ option('internal-event-debugging',
type: 'boolean',
value: false,
description: 'Enable additional internal event debug tracing. This will print key values to the logs and thus must never be enabled in a release build')
option('autoload-plugins',
type: 'boolean',
value: false,
description: 'Always load plugins from default plugin paths (only if the caller does not do so)')
option('lua-plugins',
type: 'feature',
value: 'auto',
description: 'Enable support for Lua plugins')

View file

@ -1,71 +0,0 @@
-- SPDX-License-Identifier: MIT
--
-- This is an example libinput plugin
--
-- This plugin detects the Copilot key on the keyboard with
-- the given VID/PID and replaces it with a different key (sequence).
-- UNCOMMENT THIS LINE TO ACTIVATE THE PLUGIN
-- libinput:register({1})
-- Replace this with your keyboard's VID/PID
KEYBOARD_VID = 0x046d
KEYBOARD_PID = 0x4088
meta_is_down = false
shift_is_down = false
-- shift-A, because you can never have enough screaming
replacement_sequence = { evdev.KEY_LEFTSHIFT, evdev.KEY_A }
function frame(device, frame, _)
for _, v in ipairs(frame) do
if v.value ~= 2 then -- ignore key repeats
if v.usage == evdev.KEY_LEFTMETA then
meta_is_down = v.value == 1
elseif v.usage == evdev.KEY_LEFTSHIFT then
shift_is_down = v.value == 1
elseif v.usage == evdev.KEY_F23 and meta_is_down and shift_is_down then
-- We know from the MS requirements that F23 for copilot is
-- either last key (on press) or the first key (on release)
-- of the three-key sequence, and no other keys are
-- within this frame.
if v.value == 1 then
-- Release our modifiers first
device:prepend_frame({
{ usage = evdev.KEY_LEFTSHIFT, value = 0 },
{ usage = evdev.KEY_LEFTMETA, value = 0 },
})
-- Insert our replacement press sequence
local replacement_frame = {}
for _, rv in ipairs(replacement_sequence) do
table.insert(replacement_frame, { usage = rv, value = 1 })
end
device:append_frame(replacement_frame)
else
-- Insert our replacement release sequence
local replacement_frame = {}
for idx = #replacement_sequence, 1, -1 do
table.insert(replacement_frame, { usage = replacement_sequence[idx], value = 0 })
end
device:append_frame(replacement_frame)
-- we don't care about re-pressing shift/meta because the
-- rest of the stack will filter the release for an
-- unpressed key anyway.
end
return {} -- discard this frame
end
end
end
end
function device_new(device)
local info = device:info()
if info.vid == KEYBOARD_VID and info.pid == KEYBOARD_PID then
device:connect("evdev-frame", frame)
end
end
libinput:connect("new-evdev-device", device_new)

View file

@ -1,64 +0,0 @@
-- SPDX-License-Identifier: MIT
--
-- This is an example libinput plugin
--
-- This plugin delays any event with relative motion by the given DELAY
-- by storing it in a table and replaying it via a timer callback later.
-- UNCOMMENT THIS LINE TO ACTIVATE THE PLUGIN
-- libinput:register({1})
DELAY = 1500 * 1000 -- 1.5s
next_timer_expiry = 0
devices = {}
function timer_expired(time_in_microseconds)
next_timer_expiry = 0
for device, frames in pairs(devices) do
while #frames > 0 and frames[1].time <= time_in_microseconds do
--- we don't have a current frame so it doesn't matter
--- whether we prepend or append
device:prepend_frame(frames[1].frame)
table.remove(frames, 1)
end
local next_frame = frames[1]
if next_frame and (next_timer_expiry == 0 or next_frame.time < next_timer_expiry) then
next_timer_expiry = next_frame.time
end
end
if next_timer_expiry ~= 0 then
libinput:timer_set_absolute(next_timer_expiry)
end
end
function frame(device, frame, timestamp)
for _, v in ipairs(frame) do
if v.usage == evdev.REL_X or v.usage == evdev.REL_Y then
local next_time = timestamp + DELAY
table.insert(devices[device], {
time = next_time,
frame = frame
})
if next_timer_expiry == 0 then
next_timer_expiry = next_time
libinput:timer_set_absolute(next_timer_expiry)
end
return {} -- discard frame
end
end
return nil
end
function device_new(device)
local usages = device:usages()
if usages[evdev.REL_X] then
devices[device] = {}
device:connect("evdev-frame", frame)
device:connect("device-removed", function(dev)
devices[dev] = nil
end)
end
end
libinput:connect("new-evdev-device", device_new)
libinput:connect("timer-expired", timer_expired)

View file

@ -1,16 +0,0 @@
-- SPDX-License-Identifier: MIT
--
-- An example plugin to show how to disable an internal feature.
--
-- Typically one would expect the plugin to re-implement the feature
-- in a more device-specific manner but that's not done here.
-- UNCOMMENT THIS LINE TO ACTIVATE THE PLUGIN
-- libinput:register({1})
libinput:connect("new-evdev-device", function(device)
local udev_info = device:udev_properties()
if udev_info["ID_INPUT_TOUCHPAD"] then
libinput:log_info("Disabling palm detection on " .. device:name())
device:disable_feature("touchpad-palm-detection")
end
end)

View file

@ -1,40 +0,0 @@
-- SPDX-License-Identifier: MIT
--
-- This plugin implements a very simple version of disable-while-typing.
-- It monitors all keyboard devices and if any of them send an event,
-- any touchpad device is disabled for 2 seconds.
-- And "disabled" means any event from that touchpad is simply
-- discarded.
--
-- Install this file in /etc/libinput/plugins and
--
-- UNCOMMENT THIS LINE TO ACTIVATE THE PLUGIN
-- libinput:register({1})
tp_enabled = true
libinput:connect("timer-expired", function(now)
libinput:log_debug("touchpad enabled")
tp_enabled = true
end)
libinput:connect("new-evdev-device", function (device)
local props = device:udev_properties()
if props.ID_INPUT_KEYBOARD then
device:connect("evdev-frame", function (device, frame, timestamp)
libinput:timer_set_relative(2000000)
if tp_enabled then
libinput:log_debug("touchpad disabled")
tp_enabled = false
end
end)
elseif props.ID_INPUT_TOUCHPAD then
libinput:log_debug("Touchpad detected: " .. device:name())
device:connect("evdev-frame", function (device, frame, timestamp)
if not tp_enabled then
-- Returning an empty table discards the event.
return {}
end
end)
end
end)

View file

@ -1,87 +0,0 @@
-- SPDX-License-Identifier: MIT
--
-- This is an example libinput plugin
--
-- This plugin swaps left and right buttons on any device that has both buttons.
-- Let's create a plugin. A single Lua script may create more than one
-- plugin instance but that's a bit of a nice use-case. Most scripts
-- should be a single plugin.
-- A plugin needs to be registered to activate. If it isn't, it is
-- cleaned up immediately. In the register call we supply
-- the list of plugin versions we support. Currently we only
-- have version 1.
--
-- UNCOMMENT THIS LINE TO ACTIVATE THE PLUGIN
-- libinput:register({1})
-- Note to the reader: it will be easier to understand this example
-- if you read it bottom-up from here on.
-- The callback for our "evdev-frame" signal.
-- These frames are sent *before* libinput gets to handle them so
-- any modifications will affect libinput.
function frame(device, frame, time_in_microseconds)
-- Frame is a table in the form
-- { { usage: 123, value: 3 }, ... }
-- Let's use the evdev module to make it more readable, evdev.KEY_A
-- is simply the value (0x1 << 16) | 0x1 (see linux/input-event-codes.h)
for _, v in ipairs(frame) do
-- If we get a right button event, change it to left, and
-- vice versa. Because this happens before libinput (or the next
-- plugin in the precedence order) sees the
-- frame it doesn't know that the swap happened.
if v.usage == evdev.BTN_RIGHT then
v.usage = evdev.BTN_LEFT
elseif v.usage == evdev.BTN_LEFT then
v.usage = evdev.BTN_RIGHT
end
end
-- We changed the frame, let's return it. If we return nil
-- the original frame is being used as-is.
return frame
end
-- This is a timer callback. It is invoked after one second
-- (see below) but only once - re-set the timer so
-- it goes off every second.
function timer_expired(time_in_microseconds)
libinput:timer_set_absolute(time_in_microseconds + 1000000)
end
-- Callback for the "new-evdev-device" signal, see below
-- The argument is the EvdevDevice object, see the documentation.
function device_new(device)
-- A table of evdev usages available on our device.
-- Using the evdev module makes it more readable but you can
-- use numbers (which is what evdev.EV_KEY and
-- friends resolve to anyway).
local usages = device:usages()
if usages[evdev.BTN_LEFT] and usages[evdev.BTN_RIGHT] then
-- The "evdev-frame" callback is invoked whenever the device
-- provided us with one evdev frame, i.e. a bunch of events up
-- to excluding EV_SYN SYN_REPORT.
device:connect("evdev-frame", frame)
end
-- The device has udev information, let's print it out. Right
-- now all we get are the ID_INPUT_ bits.
-- If this is empty we know libinput will ignore this device anyway
local udev_info = device:udev_properties()
for k, v in pairs(udev_info) do
libinput:log_debug(k .. "=" .. v)
end
end
-- Let's connect to the "new-evdev-device" signal. This function
-- is invoked when libinput detects a new evdev device (but before
-- that device is actually available to libinput as libinput device).
-- This allows us to e.g. change properties on the device.
libinput:connect("new-evdev-device", device_new)
-- Set our timer to expire 1s from now (in microseconds).
-- Timers are absolute, so they need to be added to the
-- current time
libinput:connect("timer-expired", timer_expired)
libinput:timer_set_relative(1000000)

View file

@ -1,32 +0,0 @@
-- SPDX-License-Identifier: MIT
--
-- This plugin inverts the horizontal scroll direction of
-- the Logitech MX Master mouse. OOTB the mouse scrolls
-- in the opposite direction to all other mice out there.
--
-- This plugin is only needed when the mouse is connected
-- to the Logitech Bolt receiver - on that receiver we cannot
-- tell which device is connected.
--
-- For the Logitech Unifying receiver and Bluetooth please
-- add the ModelInvertHorizontalScrolling=1 quirk
-- in quirks/30-vendor-logitech.quirks.
--
--
-- Install this file in /etc/libinput/plugins and
--
-- UNCOMMENT THIS LINE TO ACTIVATE THE PLUGIN
-- libinput:register({1})
libinput:connect("new-evdev-device", function (device)
local info = device:info()
if info.vid == 0x046D and info.pid == 0xC548 then
device:connect("evdev-frame", function (device, frame, timestamp)
for _, event in ipairs(frame) do
if event.usage == evdev.REL_HWHEEL or event.usage == evdev.REL_HWHEEL_HI_RES then
event.value = -event.value
end
end
return frame
end)
end
end)

View file

@ -1,22 +0,0 @@
-- SPDX-License-Identifier: MIT
--
-- An example plugin to make the pointer go three times as fast
--
-- Install this file in /etc/libinput/plugins and
--
-- UNCOMMENT THIS LINE TO ACTIVATE THE PLUGIN
-- libinput:register({1})
libinput:connect("new-evdev-device", function(device)
local usages = device:usages()
if usages[evdev.REL_X] then
device:connect("evdev-frame", function(device, frame, timestamp)
for _, v in ipairs(frame) do
if v.usage == evdev.REL_X or v.usage == evdev.REL_Y then
-- Multiply the relative motion by 3
v.value = v.value * 3
end
end
return frame
end)
end
end)

View file

@ -1,56 +0,0 @@
-- SPDX-License-Identifier: MIT
--
-- An example plugin to make the pointer go three times as slow
--
-- Install this file in /etc/libinput/plugins and
--
-- UNCOMMENT THIS LINE TO ACTIVATE THE PLUGIN
-- libinput:register({1})
remainders = {}
function split(v)
if math.abs(v) >= 1.0 then
local i = math.floor(math.abs(v))
local r = math.abs(v) % 1.0
if v < 0.0 then
i = -i
r = -r
end
return i, r
else
return 0, v
end
end
function decelerate(device, x, y)
local remainder = remainders[device]
local rx, ry = 0, 0
if x ~= 0.0 then
rx, remainder.x = split(remainder.x + x/3.0)
end
if y ~= 0.0 then
ry, remainder.y = split(remainder.y + y/3.0)
end
return rx, ry
end
libinput:connect("new-evdev-device", function(device)
local usages = device:usages()
if usages[evdev.REL_X] then
remainders[device] = { x = 0.0, y = 0.0 }
device:connect("evdev-frame", function(device, frame, timestamp)
for _, v in ipairs(frame) do
if v.usage == evdev.REL_X then
v.value, _ = decelerate(device, v.value, 0.0)
elseif v.usage == evdev.REL_Y then
_, v.value = decelerate(device, 0.0, v.value)
end
end
return frame
end)
device:connect("device-removed", function(dev)
remainders[dev] = nil
end)
end
end)

View file

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

View file

@ -1,64 +0,0 @@
-- SPDX-License-Identifier: MIT
--
-- This is an example libinput plugin
--
-- This plugin maps a downwards mouse wheel to a button down event and
-- an upwards wheel movement to a button up event.
-- UNCOMMENT THIS LINE TO ACTIVATE THE PLUGIN
-- libinput:register({1})
-- The button we want to press on wheel events
local wheel_button = evdev.BTN_EXTRA
local button_states = {}
local function evdev_frame(device, frame, timestamp)
local events = {}
local modified = false
for _, v in ipairs(frame) do
if v.usage == evdev.REL_WHEEL then
-- REL_WHEEL is inverted, neg value -> down, pos value -> up
if v.value < 0 then
if not button_states[device] then
table.insert(events, { usage = wheel_button, value = 1 })
button_states[device] = true
end
else
if button_states[device] then
table.insert(events, { usage = wheel_button, value = 0 })
button_states[device] = false
end
end
modified = true
-- Because REL_WHEEL is no longer a wheel, the high-res
-- events are dropped
elseif v.usage == evdev.REL_WHEEL_HI_RES then
modified = true
else
table.insert(events, v)
end
end
if modified then
return events
else
return nil
end
end
local function device_new(device)
local usages = device:usages()
if usages[evdev.REL_WHEEL] then
button_states[device] = false
if not usages[wheel_button] then
device:enable_evdev_usage(wheel_button)
end
device:connect("evdev-frame", evdev_frame)
device:connect("device-removed", function(dev)
button_states[dev] = nil
end)
end
end
libinput:connect("new-evdev-device", device_new)

View file

@ -1,17 +0,0 @@
plugins = [
'10-example.lua',
'10-dwt.lua',
'10-logitech-mx-master-horiz-scroll.lua',
'10-pointer-go-faster.lua',
'10-pointer-go-slower.lua',
'10-delay-motion.lua',
'10-disable-feature.lua',
'10-copilot-key-override.lua',
'10-wheel-to-button.lua',
'10-tablet-mouse-control.lua',
]
fs = import('fs')
foreach plugin : plugins
fs.copyfile(plugin)
endforeach

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,22 +0,0 @@
# Do not edit this file, it will be overwritten on update
# HTIX3602:00 0911:5288 touchpad, clickpad pretending it has a right button.
# Integrated into several systems, including
# Purism Librem 14v1
# Prestigio Smartbook 141 C2
# StarLite Mk II
# Iota IOTA2320
# with different names
# ALPS0001:00 0911:5288
# HTIX3602:00 0911:5288
# PCT2342:00 0911:5288
# SP3105FT:00 0911:5288
# SYNA3602:00 0911:5288
# Also exist FTSC1000:00 0911:5288 Mouse, so match in type
# is needed to leave mouse button untouched.
[Hantick 0911:5288 Touchpad]
MatchBus=i2c
MatchVendor=0x0911
MatchProduct=0x5288
MatchUdevType=touchpad
AttrEventCode=-BTN_RIGHT

View file

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

View file

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

View file

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

View file

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

View file

@ -55,12 +55,10 @@ AttrPalmPressureThreshold=400
MatchVendor=0x046D
MatchProduct=0x4041
ModelInvertHorizontalScrolling=1
[Logitech MX Master (4060)]
MatchVendor=0x046D
MatchProduct=0x4060
ModelInvertHorizontalScrolling=1
[Logitech MX Master (4071)]
MatchVendor=0x046D
MatchProduct=0x4071
@ -71,12 +69,10 @@ ModelInvertHorizontalScrolling=1
MatchVendor=0x046D
MatchProduct=0xB012
ModelInvertHorizontalScrolling=1
[Logitech MX Master (Bluetooth B017)]
MatchVendor=0x046D
MatchProduct=0xB017
ModelInvertHorizontalScrolling=1
[Logitech MX Master (Bluetooth B01E)]
MatchVendor=0x046D
MatchProduct=0xB01E
@ -86,45 +82,37 @@ ModelInvertHorizontalScrolling=1
MatchVendor=0x046D
MatchProduct=0x4069
ModelInvertHorizontalScrolling=1
ModelScrollOnMiddleClick=1
# MX Master 2S has a different PID on bluetooth
[Logitech MX Master 2S Bluetooth]
MatchVendor=0x046D
MatchProduct=0xB019
ModelInvertHorizontalScrolling=1
ModelScrollOnMiddleClick=1
[Logitech MX Master 3 USB]
MatchVendor=0x046D
MatchProduct=0x4082
ModelInvertHorizontalScrolling=1
ModelScrollOnMiddleClick=1
ModelLogitechMXMaster3=1
# MX Master 3 has a different PID on bluetooth
[Logitech MX Master 3 Bluetooth]
MatchVendor=0x046D
MatchProduct=0xB023
ModelInvertHorizontalScrolling=1
ModelScrollOnMiddleClick=1
ModelLogitechMXMaster3=1
[Logitech MX Master 3S]
MatchVendor=0x046D
MatchProduct=0xB034
ModelInvertHorizontalScrolling=1
ModelScrollOnMiddleClick=1
ModelLogitechMXMaster3=1
[Logitech MX Master 3B]
MatchVendor=0x046D
MatchProduct=0xB028
ModelInvertHorizontalScrolling=1
ModelScrollOnMiddleClick=1
[Logitech MX Master 4]
MatchVendor=0x046D
MatchProduct=0xB042
ModelInvertHorizontalScrolling=1
ModelScrollOnMiddleClick=1
ModelLogitechMXMaster3=1
# Don't add quirks for the Logitech Bolt Receiver:
# MatchVendor=0x046D

View file

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

View file

@ -1,10 +0,0 @@
# Do not edit this file, it will be overwritten on update
# Nulea M501 does not name itself as a "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.
[Nulea M501 Bluetooth Trackball]
MatchBus=bluetooth
MatchVendor=0x000E
MatchProduct=0x3412
ModelTrackball=1

View file

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

View file

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

View file

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

View file

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

View file

@ -7,22 +7,13 @@ MatchVendor=0x0002
MatchProduct=0x0007
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
# 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
AttrInputProp=+INPUT_PROP_PRESSUREPAD
# "SYNA3580:00 06CB:CFD2 Touchpad": pressure touchpad mostly used in HP laptops.
[Synaptics 06CB:CFD2 Touchpad]
MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xCFD2
MatchUdevType=touchpad
AttrInputProp=+INPUT_PROP_PRESSUREPAD
MatchName=* 0911:5288 Touchpad
AttrEventCode=-BTN_RIGHT

View file

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

View file

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

View file

@ -2,8 +2,8 @@
[VMWare Virtual PS/2 Mouse]
MatchName=*VirtualPS/2 VMware VMMouse*
AttrIsVirtual=1
ModelBouncingKeys=1
[VMware VMware Virtual USB Mouse]
MatchName=*VMware VMware Virtual USB Mouse*
AttrIsVirtual=1
ModelBouncingKeys=1

View file

@ -1,38 +1,9 @@
# Do not edit this file, it will be overwritten on update
[Acer Spin 5 (SP513-52N)]
MatchBus=ps2
MatchUdevType=keyboard
MatchDMIModalias=dmi:*:svnAcer:pnSpinSP513-52N:*
[Acer Switch Alpha 12]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnAcer:pnSwitchSA5-271:*
ModelTabletModeNoSuspend=1
# Input devices
# These ones are detachable keyboard+touchpad combos, set internal to allow DWT
# 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
[Acer Spin 5]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnAcer:pnSpinSP513-52N:*
ModelTabletModeNoSuspend=1

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -178,17 +178,3 @@ ModelChromebook=1
AttrPressureRange=0:-2
AttrThumbPressureThreshold=45
AttrPalmPressureThreshold=0
[Google Chromebook Roric]
MatchUdevType=touchpad
MatchName=PNP0C50:00 093A:3307 Touchpad
MatchDMIModalias=dmi:*svnGoogle:pnRoric*
ModelChromebook=1
AttrPressureRange=20:10
[Google Chromebook Rull]
MatchUdevType=touchpad
MatchName=PNP0C50:00 093A:3307 Touchpad
MatchDMIModalias=dmi:*svnGoogle:pnRull*
ModelChromebook=1
AttrPressureRange=20:10

View file

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

View file

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

View file

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

View file

@ -1,90 +1,29 @@
# Do not edit this file, it will be overwritten on update
[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
# https://bugs.freedesktop.org/show_bug.cgi?id=98538
[HP Compaq 6910p]
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnHewlett-Packard:pnHPCompaq6910p*:*
MatchDMIModalias=dmi:*svnHewlett-Packard:*pnHPCompaq6910p*
AttrEventCode=-BTN_TOOL_DOUBLETAP;-BTN_TOOL_TRIPLETAP;
# Claims to have double/tripletap but doesn't actually send it
# https://bugzilla.redhat.com/show_bug.cgi?id=1351285 and
[HP Compaq 8510w]
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnHewlett-Packard:pnHPCompaq8510w*:*
MatchDMIModalias=dmi:*svnHewlett-Packard:*pnHPCompaq8510w*
AttrEventCode=-BTN_TOOL_DOUBLETAP;-BTN_TOOL_TRIPLETAP;
[HP Elite x2 1013 G3 Tablet Mode Switch]
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]
[HP Pavilion dmi4]
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*:svnHewlett-Packard:pnHPPaviliondm4NotebookPC:*
MatchDMIModalias=dmi:*svnHewlett-Packard:*pnHPPaviliondm4NotebookPC*
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
# https://bugs.freedesktop.org/show_bug.cgi?id=97147
[HP Stream 11]
MatchName=SYN1EDE:00 06CB:7442*
MatchDMIModalias=dmi:*:svnHewlett-Packard:pnHPStreamNotebookPC11:*
MatchDMIModalias=dmi:*svnHewlett-Packard:pnHPStreamNotebookPC11*
AttrInputProp=+INPUT_PROP_BUTTONPAD
# The HP stream x360's embedded-controller filters out events form its builtin
@ -97,7 +36,65 @@ MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*:svnHewlett-Packard:pnHPStreamx360ConvertiblePC11:*
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]
MatchName=AlpsPS/2 ALPS GlidePoint
MatchDMIModalias=dmi:*:svnHP:pnHPZBookStudioG3:*
MatchDMIModalias=dmi:*svnHP:pnHPZBookStudioG3:*
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

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