Commit graph

5768 commits

Author SHA1 Message Date
Peter Hutterer
dee2d38476 Add libinput_tablet_tool_get_name() for the tool's specific name
If the tool has a name let's provide that to the caller. We have it
easily accessible so let's export it to make everyone's life easier. The
name is provided by libwacom, there is no need for us
to even copy that value since we don't need it ourselves.

Note that at this point effectively only (some) Wacom devices have
meaningful names. Virtually all non-wacom devices will use a generic
tool and even the built-in Wacoms will largely just say "AES Pen".

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1399>
2026-01-14 16:44:01 +10:00
Peter Hutterer
7d19cb5f40 CI: rebuild to pick up newer libwacom on Fedora 43
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1399>
2026-01-14 09:27:28 +10:00
Peter Hutterer
21ac8568d5 CI: temporarily drop FreeBSD
14.2 is 404 so we cannot rebuild any images and,
14.3 has a bug that blocks it from building images:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292375

So let's disable BSD until the bug is fixed.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1409>
2026-01-13 22:42:07 +00:00
Peter Hutterer
6b4d1905b6 plugin: always disable wheel debouncing on request
The WHEEL_STATE_NONE check was effectively always false:
- if we didn't receive any event yet, wheel_maybe_disable() wasn't
  called in any code path
- if we did receive a scroll event, the wheel state was either
  WHEEL_STATE_SCROLLING or WHEEL_STATE_ACCUMULATING_SCROLL

Fix this two-pronged: remove the check for WHEEL_STATE_NONE but also
immediately call disable when we disable the feature. We don't carry
enough state in this plugin to really worry about the device being in
a fully neutral state (and realistically the vast majority of use-cases
will likely disable wheel debouncing on new device anyway).

Closes #1241

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1408>
2026-01-13 21:52:52 +00:00
Peter Hutterer
005a3e5622 test: remove a leftover etrace()
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1408>
2026-01-13 21:52:52 +00:00
David Santamaría Rogado
2772863af0 quirks: separate logitech quirks
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1407>
2026-01-13 01:50:51 +00:00
David Santamaría Rogado
47312e99d8 quirks: wipe HP Elite x2 G3 keyboard and touchpad
Actually not needed using internal approach.

Keyboard is ps2 wired in pogo pins and touchpad is usb, both internal by
default so dwt is in effect.

If tablet side buttons are also within ps2, they are not going to be
disabled as chassis is detachable.

Tablet mode switch untouched as is unclear if actual kernels play nice
with it.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1406>
2026-01-13 01:53:28 +01:00
David Santamaría Rogado
24ac440ecc quirks: add edit warning where missing
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1405>
2026-01-13 01:00:19 +01:00
David Santamaría Rogado
0110512b3e quirks: huawei better use pn instead pvr
Huawei MateBook X 2020 used M1010 product version but is used within
different Matebook X over the years.

Use EUL-WX9 product name instead.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1403>
2026-01-12 03:49:00 +01:00
David Santamaría Rogado
605abf2f37 quirks: normalize dmi matches
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1403>
2026-01-12 03:49:00 +01:00
David Santamaría Rogado
9a036bec30 test: set usb touchpad as internal
Actually all usb touchpads are internal by default, reflect this in the
acer touchpad definition.

This causes that not only the acer keyboard in its group activates DWT
but all the intenal keyboards.

Remove asserting that other keyboards doesn't affect DWT as that is the
intended behaviour.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1400>
2026-01-10 23:33:41 +01:00
Peter Hutterer
731d4452c3 meson: revamp the debug build detection for the builddir lookup
Ifdef out any special behavior we want so we no longer leak this via
strings in the resulting binary. Ideally we want the compile to fail for
anything missed rather than surprising behavior when we try to access
files in the build directory.

Closes: #1230
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1396>
2026-01-10 10:39:21 +00:00
David Santamaría Rogado
48e367e841 quirks: missing matches
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1402>
2026-01-10 10:23:19 +00:00
David Santamaría Rogado
1e9b81f75d quirks: refactor pixart touchpads
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1401>
2026-01-09 18:46:40 +01:00
David Santamaría Rogado
02b495e790 quirks: internal integration for lenovo detachable
These are quirks needed for Lenovo detachable devices by setting the
keyboard as internal to enable DWT and act as if it's a laptop.

Here we try to cover all the ideapad ones.

Also remove a quirk in Chicony that sets the touchpad below to enable
DWT, prefer to set the keyboard as internal as touchpad position is
intended for external ones like the input device we also move to the
bottom in Lenovo to have all pure input device quirks in one place.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1389>
2026-01-09 02:44:11 +00:00
Peter Hutterer
822a6d9365 tools: make the touchpad-pressure thresholds interactive
Easier to play around with than having to re-start with different
commandline arguments all the time.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1394>
2026-01-09 02:21:13 +00:00
Peter Hutterer
49624ace16 tools: use box-drawing characters for the table in touchpad-pressure
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1394>
2026-01-09 02:21:13 +00:00
Peter Hutterer
82cbbdab78 test: add (a broken) test for a second range config
This tests for a known bug in the implementation rather than the ideal case
how it should work.

The config is applied to the tool and on prox out to the current tablet
but then the tool goes in prox on a new tablet and the configuration
doesn't get applied there. In the test we work around this by injecting
an extra proximity event to get the range applied.

This needs some rework in the evdev-tablet code but it's questionable
whether it makes a difference given the small number of users with
multiple tablets and pressure ranges set.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1397>
2026-01-09 02:01:14 +00:00
Peter Hutterer
47c7bd934a test: fix the multiple-tablet-pressure-range test
The previous test was incomplete, add support for setting pressure
ranges and generally expand and tighten up the test case so it tests
more specficially for the expected events.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1397>
2026-01-09 02:01:14 +00:00
Peter Hutterer
ef1ee837e4 test: allow overriding any axis value
Previously test devices had to set LITEST_AUTO_ASSIGN to be able
to override an axis-specific value. But this prevented us from
easily overriding other axis values (e.g. tablet tool ids) that usually
have the same value.

LITEST_AUTO_ASSIGN should indicate a value that must always be
auto-assigned, that makes a lot more sense.

This does mean we need to handle ABS_MT_TRACKING_ID -1 to avoid that
getting overwritten by auto_assign_tablet_value() but oh well.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1398>
2026-01-09 01:47:13 +00:00
Peter Hutterer
c8e0312195 test: don't assign -1/-1 to x/y on proximity out
This only worked because any all our test devices declare a fixed 0
value for x/y in the proximity out event frame. Since 0 !=
LITEST_AUTO_ASSIGN we never got to the litest_scale() for x/y which
would abort because of the -1 value.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1398>
2026-01-09 01:47:13 +00:00
Peter Hutterer
c9e175a507 test: correct overriding ABS_MISC in litest event frames
This still requires LITEST_AUTO_ASSIGN for that value in the test
devices (which no device currently sets) but meanwhile: not scaling
ABS_MISC into a magic range is the correct thing to do.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1398>
2026-01-09 01:47:12 +00:00
David Santamaría Rogado
d5110e1e68 quirks: acer add detachable keyboards
Cover Acer detachable keyboards used in Switch tablet devices to set
them internal and allow DWT.

Move one of them from chicony using the below method.

While at it change the match for internal keyboard in Acer Spin 5 to
rely of bus and type and add ':' before svn dmi match.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1392>
2026-01-06 22:41:37 +00:00
David Santamaría Rogado
130f95fd43 quirks: rework minisforum keyboard and add one
Use ids for Minisforum V3 and remove dmi match.

Also add Minisforum V3 SE one.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1395>
2026-01-06 13:58:57 +01:00
David Santamaría Rogado
b60416083e quirks: rework tablet mode using chassis type
Don't disable inputs for detachable and tablet devices, they are
physically unplugged from their input devices but tend to have buttons
as internal keyboard in the tablet part that must work always. We know
what kind of device is using the Chassis Type DMI value.

Also remove specific device quirks now covered by the chassis type.

Finally refactor some Lenovo devices using this quirk and redefine Dell
2-in-1 with this quirk using chassis type.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1390>
2026-01-05 04:44:41 +00:00
Peter Hutterer
58228f12f0 tools: fix the man page for the libinput-test command
The way we run this, the feature is appended to the libinput-test
command so this resulted in trying to execute libinput
libinput-test-libinput-test-suite.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1384>
2026-01-05 01:53:41 +00:00
Peter Hutterer
b48ce4c5be test: fix --help output for --filter-deviceless
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1384>
2026-01-05 01:53:41 +00:00
Peter Hutterer
6c2b9dcbde meson.build: add a summary for the test options
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1384>
2026-01-05 01:53:41 +00:00
Peter Hutterer
1d4ce84746 test: only use the quirks srcdir if we have a builddir
Same approach as we already do for other constants though note the
builddir_lookup() hack only works for release builds.

Closes #1230

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1384>
2026-01-05 01:53:41 +00:00
David Santamaría Rogado
08a8e0cc38 quirks: add missing match in synaptic touchpad
Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1391>
2026-01-02 06:07:28 +01:00
David Santamaría Rogado
83966ee306 quirks: remove now not needed entries
The recently added ITE usb keyboard and pressure touchpad entries makes
them unnecessary.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1383>
2025-12-23 21:06:27 +01:00
David Santamaría Rogado
56eec4afca quirks: add another lenovo haptic touchpad quirk
Used at least in another more Lenovo model that the one in the comment
where is actually.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1383>
2025-12-23 20:03:05 +01:00
David Santamaría Rogado
a525b30326 quirks: add Lenovo touchpad quirk in a generic way
Matching in vendor and product covers many models as possible.

01E8 product is always haptic.

01E0 can be or not haptic, leave it outside this and mantain it per
system model. When the kernel detects haptic touchpads the ones that
cannot be differenciated won't need to have quirk neither.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1383>
2025-12-23 18:27:53 +01:00
David Santamaría Rogado
8901ddf354 quirks: define generic quirks for ITE
Actual quirk in ITE vendor changed for a more generic one.
This is a step prior to cleanup other quirks.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1383>
2025-12-23 15:22:30 +01:00
David Santamaría Rogado
3cac03c8b2 quirks: Remove Vaio quirks file
The only rule is already defined for the touchpad in it's vendor file.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1386>
2025-12-22 23:35:05 +00:00
David Santamaría Rogado
3a54526d03 quirks: Move Synaptics touchpad to Hanticks
Synaptics 0911:5288 Touchpad really is a Hantick one, move it.

Also change it to rely on bus and ids because name can vary.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1381>
2025-12-22 22:20:18 +00:00
David Santamaría Rogado
23cd0408cc quirks: HP 14-fh0xxx just match internal touchpad
Apply ModelTabletModeNoSuspend just for internal touchpad no matter what
model is.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1388>
2025-12-22 00:01:34 +01:00
Peter Hutterer
0412fb3d44 pad: fix missing newline for mode group error messages
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1380>
2025-12-17 14:37:59 +10:00
David Santamaría Rogado
a376fe366c quirks: HP 14-fh0xxx rely on bus, ids and type
Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1378>
2025-12-16 21:52:31 +01:00
David Santamaría Rogado
9a07784451 quirks: Sort HP entries alphabetically
Also remove generic HP Haptics Touchpad CFD2 moved to Synaptics.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1378>
2025-12-16 21:51:53 +01:00
David Santamaría Rogado
3cf723451f quirks: Add generic Synaptics quirk found in HP ones
This quirk is a generic one for all the HP laptops with haptic touchpad
so makes more sense here because we are applying it dmi independent
being more difficult to track this change if the touchpad became used in
other vendors.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1378>
2025-12-16 16:35:22 +01:00
Peter Hutterer
2d3e47290c quirks: add a quirk for the RazerBlade182025 keyboard
Generated by tools/razer-quirks-lister.py

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1379>
2025-12-16 16:54:18 +10:00
Peter Hutterer
5bd7f93c16 doc/user: add a graph of how different contexts work
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1376>
2025-12-12 04:29:13 +00:00
Peter Hutterer
a202ed6115 Use a newtype usec_t for timestamps for better type-safety
This avoids mixing up milliseconds and usec, both by failing if
we're providing just a number somewhere we expect usecs and also
by making the API blindingly obvious that we're in usecs now.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1373>
2025-12-12 04:15:15 +00:00
Peter Hutterer
c0c809aaa1 util: fix documentation issues for newtypes
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1373>
2025-12-12 04:15:15 +00:00
Peter Hutterer
e8dfc3bfd6 util: make the newtype comparision functions return bool
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1373>
2025-12-12 04:15:15 +00:00
Sicelo A. Mhlongo
b3f7b4b1ea evdev: add support for SW_KEYPAD_SLIDE
A few devices have a keyboard/keypad which can be slid under the device,
leaving the device with only touch-based interaction. The corresponding kernel
event is reported as SW_KEYPAD_SLIDE [0]. Implement support in libinput.

Since the position of the switch varies across devices, it cannot always be
certain whether the keypad is usable when the switch is in the set position.
Therefore, do not automatically disable the keyboard.

[0] e68d80b13b/include/linux/linux/input-event-codes.h (L885)

Closes: #1069
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1242>
2025-12-11 13:28:41 +02:00
Peter Hutterer
0285001272 touchpad: make the dwt/dwtp timeout inclusive min/max
This makes it easier in callers that don't really differ between
inclusive and exclusive and makes the visualization in UIs a bit
nicer to look at too.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1377>
2025-12-10 03:07:36 +00:00
Peter Hutterer
bde6d07d57 quirks: replace ModelPressurepad with setting INPUT_PROP_PRESSUREPAD
This is the more generic approach and doesn't require us to have any
specific implementation in libinput itself.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1374>
2025-12-09 06:07:01 +00:00
Peter Hutterer
1b4dbb9087 doc/user: minor update to the forcepad/pressurepad documentation
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1374>
2025-12-09 06:07:01 +00:00