Compare commits

..

163 commits
1.30.2 ... main

Author SHA1 Message Date
Peter Hutterer
e53c2141b3 util: add a free_clear() helper to reset after free
Same as e.g. g_clear_pointer(). Switch a number of obvious call sites
over to use this, the rest will come over time.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1472>
2026-04-24 00:24:24 +00:00
Peter Hutterer
c2c8414605 tools: update the tool option parsing test for newer options
Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1473>
2026-04-23 23:21:07 +00:00
Peter Hutterer
86a775b3ca tools/debug-tablet: guard against open() failures
This is a debugging tool so we don't expect NDEBUG but let's handle
errors correctly anyway.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1467>
2026-04-22 04:53:14 +00:00
Peter Hutterer
0fa334600d tools: always open with O_CLOEXEC
Doesn't have any effect but it's easy enough and good practice to do.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1467>
2026-04-22 04:53:14 +00:00
Peter Hutterer
a5a9d2d8df tools: guard against zero-length os-release files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1467>
2026-04-22 04:53:14 +00:00
Peter Hutterer
8afdc52eaf tools: Use xclose() over close()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1467>
2026-04-22 04:53:14 +00:00
Peter Hutterer
e53a78f7d7 tools/record: fix missing NULL check on tmpfile() return value
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1467>
2026-04-22 04:53:14 +00:00
Peter Hutterer
a51398cb8d tools: use save_atod instead of atof()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1467>
2026-04-22 04:53:13 +00:00
Peter Hutterer
74b4ca132f tools/debug-tablet-pad: add bounds checks for array accesses
A few not-really-an-issue fixes found by Claude:

1. ctx->buttons_down[number]: the 'number' value comes from
   libinput_event_tablet_pad_get_button_number() and is written into
   a fixed-size array of 32 elements without bounds checking. A crafted
   or malicious device reporting button numbers >= 32 causes a stack
   buffer overflow.

2. ctx->ring[number], ctx->strip[number], ctx->dial[number]: these are
   fixed-size arrays of 2 elements each. Ring/strip/dial numbers from
   libinput events are used as indices without bounds checking. Values
   >= 2 cause out-of-bounds writes.

3. assert()-based error handling for open() and libevdev_new_from_fd():
   assert() is compiled to a no-op in release builds (NDEBUG). This
   means that in release builds, a failed open() returns fd=-1, and
   libevdev_new_from_fd() is called with an invalid fd. The result is
   undefined behavior.

4. Variable-length array (VLA) 'empty[termwidth]' in print_bar():
   termwidth comes from an ioctl(TIOCGWINSZ) call and could be very
   large, causing a stack overflow. Replace with a fixed-size buffer.

None of these really matter for a niche debugging tool.

Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1467>
2026-04-22 04:53:13 +00:00
Peter Hutterer
f899da7552 tools/ptraccel-debug: replace atoi() with safe_atoi()
It's a niche development/debugging tool, argument parsing issues aren't
really something we need to care about but hey, this change is easy.

Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1467>
2026-04-22 04:53:13 +00:00
Peter Hutterer
20b52ffafc udev: use xclose() instead of close()
xclose does the fd == -1 dance which makes analyzers happier.

Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1467>
2026-04-22 04:53:13 +00:00
Peter Hutterer
c276c9579e plugin: use safe_strdup() instead of strdup()
safe_strdup() handles NULL correctly instead of just blowing up. This
shouldn't matter because without a name our plugins won't get here but
let's do this anwyay.

Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1467>
2026-04-22 04:53:13 +00:00
Peter Hutterer
d97983ee5e util: use lstat() instead of stat() in rmdir_r to prevent symlink attacks
stat() follows symbolic links which is definitely something we don't
want. If an attacker can place a symlink inside a directory being
recursively deleted (e.g. a temporary directory), stat() will report the
type of the symlink's target rather than the symlink itself. If the
target is a directory, rmdir_r() will follow the symlink and recursively
delete the target directory's contents outside the intended directory
tree.

This has no real effect, this is only used in the test suite.

Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1467>
2026-04-22 04:53:13 +00:00
Peter Hutterer
b87532dfb5 touchpad: replace sprintf strv_join in the touch state debugging
This is purely to make Claude happy, the function is ifdef'd out and to
actually hit the limit we'd need more than ~25 slots active.

Anyway, the strv helpers make for much nicer code anyway.

Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1467>
2026-04-22 04:53:13 +00:00
Peter Hutterer
75d4acfe94 util: allow for 'e' in safe_atod strings
1.5e2 is a valid string, so let's parse those.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1467>
2026-04-22 04:53:13 +00:00
Peter Hutterer
cc72db48fb doc/user: add an illustration of the touch arbitration rectangle
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1462>
2026-04-21 11:12:59 +10:00
Peter Hutterer
0e4492155f doc: add HOLD_END to libinput_event_gesture_get_cancelled() doc
The implementation accepts LIBINPUT_EVENT_GESTURE_HOLD_END in
require_event_type() but the API documentation only listed SWIPE_END
and PINCH_END. This was likely missed when hold gesture support was
added.

Co-authored-by: Claude <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1469>
2026-04-20 01:10:05 +00:00
Peter Hutterer
2da19a8802 doc: remove ID_INPUT from lua plugin udev properties list
The code in libinput-plugin-lua.c filters udev properties with
strstartswith(key, "ID_INPUT_") which requires a trailing underscore.
The bare 'ID_INPUT' property does not match this filter and is never
included in the properties table provided to plugins.

Co-authored-by: Claude <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1469>
2026-04-20 01:10:05 +00:00
Peter Hutterer
37e1dfd2d1 doc: update multi-device recording docs, --multiple is deprecated
The --multiple flag is deprecated and a no-op in the current code
(libinput-record.c). Multiple devices can simply be specified as
arguments on the commandline. Update the documentation to reflect
the current usage.

Co-authored-by: Claude <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1469>
2026-04-20 01:10:05 +00:00
Peter Hutterer
f87bae4ed2 doc: fix libinput replay output format in tools.rst
The example output showed 'Name: /dev/input/eventN' but the actual code
(libinput-replay.py) prints '/dev/input/eventN: Name'. Update the
example to match the actual output format.

Co-authored-by: Claude <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1469>
2026-04-20 01:10:05 +00:00
Peter Hutterer
20a53db063 doc: fix ClickPad scroll method description in scrolling.rst
ClickPads support both two-finger scrolling and edge scrolling, not
two-finger scrolling only. The code in evdev-mt-touchpad.c always
includes LIBINPUT_CONFIG_SCROLL_EDGE in the supported methods and adds
LIBINPUT_CONFIG_SCROLL_2FG if the touchpad supports 2+ touches.

Co-authored-by: Claude <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1469>
2026-04-20 01:10:05 +00:00
Peter Hutterer
f854eb0515 doc: fix typos and misspellings across documentation
Co-authored-by: Claude <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1469>
2026-04-20 01:10:05 +00:00
Peter Hutterer
60028ea595 doc: fix simplified hold gesture table in gestures.rst
The simplified table showed 'Finger 1 down' producing '<no event>' but
all the detailed examples later in the same document show that a single
finger down triggers a hold begin event with finger count 1, followed by
a cancel and new begin when the second finger arrives. Update the
simplified table to be consistent with the detailed examples and the
actual implementation.

Co-authored-by: Claude <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1469>
2026-04-20 01:10:05 +00:00
Peter Hutterer
2400a5c128 doc: fix reference to non-existent 'hold update' event in gestures.rst
There is no LIBINPUT_EVENT_GESTURE_HOLD_UPDATE event in the API.
When a finger is detected as thumb/palm during a hold and other fingers
remain, the implementation cancels the current hold and starts a new one
with an updated finger count. Update the documentation to describe the
actual behavior.

Co-authored-by: Claude <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1469>
2026-04-20 01:10:05 +00:00
Peter Hutterer
fdd43a4fcd touchpad: time the 3fg fast swipe timeout from the initial contact
We differ between a fast 3fg swipe and a 3fg drag based on whether we
move 5mm within 80ms of contact. Alas, the code started the timeout once
we had enough motion, not on initial contact.

Three fingers down, then resting for >80ms, then moving 5mm within the
subsequent 80ms would thus trigger a fast swipe because the timer wasn't
set until sufficient movement happened. Fix this by setting the timer
based on the initial touch point's time. This requires potentially
setting a negative timer to avoid duplicating parts of the state
machine.

Closes #1266

Fixes: fe1d44637f ("touchpad: add support for fast swipe when 3fg drag is enabled")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1466>
2026-04-17 02:32:50 +00:00
Peter Hutterer
2bea0f3e4e tablet: extend touch arbitration rect to cover full tablet height
The arbitration rectangle previously only covered a region from 100mm
above the pen tip to 150mm below it (250mm total). This let a few
unintentional touches through such as when some of the fingers are
extended while using the pen. Likewise, a large hand could fall below
the bottom edge of the rectangle.

Change the rect to span the full height and width of the tablet while
keeping the same horizontal logic (200mm wide, starting 20mm from the
pen tip toward the hand side). Simplify a few things too, there is no
need for clipping the rect.

Related: #1276
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1463>
2026-04-16 05:10:53 +00:00
Peter Hutterer
5f29257569 util: use zalloc in stringbuf
zalloc() aborts on allocation failure and it's what we use everywhere
else.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1465>
2026-04-16 04:55:23 +00:00
Peter Hutterer
2ea3fb1d13 tablet-pad: use strdup_printf in sysfs path construction
This simplifies the code and means we don't have to deal with snprintf
return values to ensure we're not truncating.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1465>
2026-04-16 04:55:23 +00:00
Peter Hutterer
9d8a8b4530 util: use snprintf for PID formatting in backtrace helper
Use snprintf to make analyziers happier and bump the buffer size to 16.
That's way larger than we'll need given the kernel's PID_MAX_LIMIT
(4194304) but it doesn't cost us anything.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1465>
2026-04-16 04:55:23 +00:00
Peter Hutterer
e32202eeae util: check for NULL on realloc in _infmask_ensure_size
And abort if that ever happens because it really shouldn't.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1465>
2026-04-16 04:55:23 +00:00
Peter Hutterer
aa04f67b1c plugin: guard against unsigned underflow in plugin_has_mask
nevents should never be zero but let's prevent against an underflow, if
only to make the analyzers happy.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1465>
2026-04-16 04:55:23 +00:00
Peter Hutterer
8c06ceecb2 quirks: add missing modification warning to a quirks file
And add a test to make sure we don't forget this in the future.

Fixes: 488c0c9645 ("quirks: add quirk for the Wareus B15")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1464>
2026-04-14 09:48:15 +10:00
Peter Hutterer
356c498fd4 lua: force text mode for loading plugins
luaL_loadfile() by default allows for both text files and precompiled
lua files. Precompiled files are not verified on load allowing for a
sandbox escape.

CVE-2026-35093

Fixes: #1271

Found-by: Koen Tange <koen@monokles.eu>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1459>
2026-04-01 23:53:12 +00:00
Peter Hutterer
45dfd0f030 lua: separate the API from the metatables
Previously we had one vtable for the libinputplugin and EvdevDevice
objects. This allowed plugins to call __gc(), a decidedly internal
method.

This fixes a use-after-free: A plugin that called EvdevDevice::__gc()
frees the plugin's copy of device->name but leaves the pointer in-place,
a subsequent call will thus cause a UAF read.

Fix this by separating what is the object's metatable from the public
methods that are accessible to a plugin.

CVE-2026-35094

Fixes: #1272

Found-by: Koen Tange <koen@monokles.eu>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1459>
2026-04-01 23:53:12 +00:00
David Santamaría Rogado
7face63bd5 quirks: add positivo vaio fe15 right button
Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1458>
2026-03-30 00:07:52 +02:00
Artem Proskurnev
488c0c9645 quirks: add quirk for the Wareus B15
Fix:
https://gitlab.freedesktop.org/libinput/libinput/-/work_items/1267

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1457>
2026-03-28 12:39:42 +03:00
Richie Roy Jayme
baddf1e2b6 quirks: add support for Goodix touchpad GXTP5400:00 27C6:0F96
This commit adds a specific vendor HWID for Goodix Haptic Touchpad to
improve detection and handling.

Signed-off-by: Richie Roy Jayme <rjayme.jp@gmail.com>
Signed-off-by: Richie Roy Jayme <rjayme2@lenovo.com>
Reviewed-by: Vishnu Sankar <vishnuocv@gmail.com>
Reviewed-by: Vishnu Sankar <vsankar@lenovo.com>
Tested-by: Ameer Ivan Julkarnain <ajulkarnain1@lenovo.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1455>
2026-03-25 18:33:21 +09:00
Peter Hutterer
9baccdf44c touchpad: support automatic drag-lock when releasing at the edge
If drag-lock is disabled but we're in a tap-and-drag state and the
finger is released near the edge (within 5mm), enable automatic drag
lock for 400ms.  This allows a user to quickly reset the finger and
continue with the drag.

The 400ms is a randomly guessed timeout - if you're using tap-and-drag
without draglock, finger dexterity should be high enough that resetting
the single finger can be done quickly but it's also short enough to not
make the occasional delayed button be painful in day-to-day use.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1447>
2026-03-24 05:50:24 +00:00
Peter Hutterer
1486c7ae17 test: change where our finger ends up before releasing
No effect on the test right now but on some small test touchpads
this is close enough to the edge to mess with future tests.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1447>
2026-03-24 05:50:24 +00:00
Peter Hutterer
f97d0e6db1 doc/user: document sticky vs timeout based drag lock a bit better
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1447>
2026-03-24 05:50:23 +00:00
Peter Hutterer
1c4040ffa3 tools/debug-tablet: switch an snprintf to strvs
Less having to think about snprintf's buffer correctness

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1453>
2026-03-24 05:24:35 +00:00
Peter Hutterer
166201d9fc util: fix remaininig usec computation on 32 bits
Follow-up from commit dcbfbc4cf1 ("util: fix usec computation on 32 bits")
which didn't fix all instances, make this consistent.

Fixes: dcbfbc4cf1 ("util: fix usec computation on 32 bits")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1453>
2026-03-24 05:24:35 +00:00
Peter Hutterer
7d15503b45 evdev: fix rel axis disabling on accelerometers
Copy/paste caused only the abs axes being disabled (REL_X == ABS_X,
etc. so the EV_REL bits had no effect).

Found-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1453>
2026-03-24 05:24:35 +00:00
Peter Hutterer
2dc491de1f Fix various typos
Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1452>
2026-03-24 05:09:07 +00:00
Marcin Jahn
bb7aa004f8 quirks: add clevetura clvx s touchpad quirk
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1454>
2026-03-22 20:59:13 +01:00
Freeman Zhang
a1c5f35a69 Add Goodix haptic touchpad 27C6:0F90 support
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1451>
2026-03-22 10:53:44 +00:00
Freeman Zhang
57c71c567f Add Elan haptic touchpad 04F3:3355 support
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1450>
2026-03-22 12:37:19 +08:00
Peter Hutterer
ef9624a16b evdev: store the SYN_REPORT value in the frame
If the SYN_REPORT has a value of nonzero we need to keep that value in
the frame - our upper layers rely on this to detect repeat frames.

Closes #1261

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1449>
2026-03-19 00:09:30 +00:00
GKraats
dcbfbc4cf1 util: fix usec computation on 32 bits
Enforce the needed 64-bit computing on 32 bits.

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1446>
2026-03-18 00:25:48 +00:00
Peter Hutterer
ad857a51a4 tools/record: fix delta times not being relative
Missing last_time assignment caused the delta time between events to be
the total time.

Fixes: a202ed6115 ("Use a newtype usec_t for timestamps for better type-safety")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1448>
2026-03-17 05:05:14 +00:00
Peter Hutterer
a521d054d4 tools: fix leak of evdev_prev in libinput-record
Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1444>
2026-03-17 00:46:46 +00:00
Peter Hutterer
f86d5ab2ab test: add missing button state assertion for eraser button release
The second 'Expect button event' block in
tablet_eraser_button_different_buttons is missing the button state
assertion that the first block has. This event should be a
BUTTON_STATE_RELEASED (the eraser left proximity), but without the
check the test passes even if the state is wrong.

Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1444>
2026-03-17 00:46:46 +00:00
Peter Hutterer
32fd9ec95f tools: Remove dead eraser_button_button initialization to BTN_STYLUS
Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1444>
2026-03-17 00:46:46 +00:00
Peter Hutterer
45150cc6ec tools: fix missing fd assignment in libinput-debug-tablet
The fd opened for the evdev device is never stored in ctx->fds[1].fd
so we never poll for it. Real impact was limited since we do poll for
the libinput fd and we process libevdev events whenever any of the fds
triggers.

Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1444>
2026-03-17 00:46:46 +00:00
Peter Hutterer
c8c1c07a2a tools: fix swapped fread arguments causing DMI modalias to always be "unknown"
fread(buf, sizeof(buf), 1, dmi) reads one block of 2048 bytes,
returning the number of complete blocks (0 or 1). Since DMI modalias
files are always shorter than 2048 bytes, fread returns 0 even when
data was successfully read into buf. The 'if (n > 0)' check then
always fails and the DMI string stays as "unknown".

Swap the size and nmemb arguments so fread returns the number of
bytes read instead.

Fixes: 0ecd08c134 ("tools: use __attribute__(cleanup)")

Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1444>
2026-03-17 00:46:46 +00:00
Peter Hutterer
b1f478b897 tools: fix pencil tablet tool type in libinput-record
Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1444>
2026-03-17 00:46:45 +00:00
Peter Hutterer
333d7131ab tools: fix swapped strstartswith arguments in find_device()
Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1444>
2026-03-17 00:46:45 +00:00
Peter Hutterer
cd9d6c66fd tablet: fix eraser button get_default_mode/get_default_button return values
Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1444>
2026-03-17 00:46:45 +00:00
Peter Hutterer
a0dc0997f5 meson.build: explicitly convert a boolean to string
Fixes:
  DEPRECATION: Variable substitution with boolean value 'MESON_ENABLED_DEBUG_GUI' is deprecated.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1445>
2026-03-13 12:15:21 +10:00
Peter Hutterer
c6813dc7d8 tools: add --compress-motion-events to the man page and zsh completion
Fixes: dc249b0ffe ("tools/debug-events: add ability to compress motion events")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1443>
2026-03-11 14:22:40 +10:00
Ilya Kamenko
8dd25ece10 Fold hold-to-scroll into existing scroll button lock mode
Instead of adding a new ENABLED_HOLD enum value, modify the existing
ENABLED lock mode so that hold+scroll+release doesn't engage the lock.

Add a 500ms grace period: if the button was held and used to scroll for
longer than 500ms, releasing the button does not engage the lock
(temporary scroll). If released within 500ms (e.g. shaky hands
triggering accidental motion), the lock still engages as before.

This fixes the unintuitive behavior where the lock engages even after
actively scrolling, without requiring new API surface.

Closes: https://gitlab.freedesktop.org/libinput/libinput/-/issues/1259

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1435>
2026-03-10 23:12:25 +00:00
Mingcong Bai
43547b461b quirks: add Goodix pressure pad quirk for 27C6:01E7
This touchpad is found on the newly released Lenovo ThinkBook G8+ IPH.

Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1442>
2026-03-10 11:37:34 +08:00
David Santamaría Rogado
2ddc734114 test: set ID_INTEGRATION into test devices
Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1429>
2026-03-10 02:27:36 +00:00
David Santamaría Rogado
819e943ab0 evdev: use udev's ID_INTEGRATION
Now we have in udev the ID_INTEGRATION propery that tells us if a device
is internal or external, use it while still allow hwdb and quirks to
override it.

In the future is possible that we could remove quirks for keyboards
integration and hwdb for touchpads and joysticks integration.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1429>
2026-03-10 02:27:36 +00:00
David Santamaría Rogado
1c82aa1659 quirks: add some more goodix haptic touchpads
Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1440>
2026-03-09 09:48:05 +01:00
David Santamaría Rogado
526130fe8d quirks: hp omnibook ultra flip 14 touch pressure
Add pressure attributes to make libinput measure touchpad-pressure
behave right.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1430>
2026-03-09 01:34:07 +00:00
David Santamaría Rogado
b95840d36e quirks: hp omnibook ultra flip 14 improve rule set
Some initial units had 14t-fh000 instead 14-fh0xxx in their product name
but they are exactly the same model.

We could match both in product version SBKPF or in board product name
8CDE. Match board as seems the way hp-wmi kernel module uses to match.

While at it rewrite the entire huge comment to a little less huge
comment but with more really interesting info.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1430>
2026-03-09 01:34:07 +00:00
Peter Hutterer
7726350420 tablet: allow for the eraser button to be any button
The previous restriction was BTN_STYLUS* or any button the pen
advertises. This is too restrictive - it works well enough for any pen
with less than 3 buttons (BTN_STYLUS3 is always available on those) but
otherwise it cannot work. A 3-button pen may not advertise any other
buttons, leaving us with the eraser button being a duplicate button. And
events cannot be distinquished between eraser button or real button.

Open up the configuration to effectively any BTN_ event code.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1436>
2026-03-09 01:14:21 +00:00
Peter Hutterer
cdcb827365 Fix the evdev_usage_is_button check for the BTN_STYLUS group
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1436>
2026-03-09 01:14:21 +00:00
Peter Hutterer
0a3ecbea24 tablet: fix missing linebreak after an error message
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1436>
2026-03-09 01:14:21 +00:00
BBaoVanC
db62bf7ab1 quirks/apple: Add AttrSizeHint to Magic Trackpad USB-C
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1437>
2026-03-04 04:53:28 +00:00
David Santamaría Rogado
9eae99d4fe quirks: microsoft surface keyboard event BTN_0
Apply AttrEventCode=-BTN_0 to all surface keyboards.

Fixes: #1251.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1431>
2026-02-22 08:40:11 +00:00
David Santamaría Rogado
a86b8a0008 doc: list-quirks should be quirks list
while at it replace also a code comment in the same line.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1432>
2026-02-20 19:56:46 +01:00
Sicelo A. Mhlongo
3428edf1ea doc/user: document keypad slide switch support
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1428>
2026-02-17 12:03:56 +02:00
Peter Hutterer
659967488e libinput 1.31.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2026-02-13 09:25:46 +10:00
Lorenzo Ianotto
b9fc550f28 Set ModelTabletModeNoSuspend only for Thinkpad S1 Yoga and X1 Yoga 1st gen
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1425>
2026-02-09 02:42:33 +00:00
Richie Roy Jayme
df8f5a3627 quirks: add quirk support for Goodix touchpad
This commit adds a specific vendor HWID for Goodix Haptic Touchpad to
improve detection and handling.

Signed-off-by: Richie Roy Jayme <rjayme.jp@gmail.com>
Signed-off-by: Richie Roy Jayme <rjayme2@lenovo.com>
Reviewed-by: Vishnu Sankar <vishnuocv@gmail.com>
Reviewed-by: Vishnu Sankar <vsankar@lenovo.com>
Reported-by: Ameer Ivan Julkarnain <ajulkarnain1@lenovo.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1426>
2026-02-07 08:27:58 +00:00
Peter Hutterer
e0ba559117 libinput 1.30.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1424>
2026-02-04 12:41:58 +10:00
Peter Hutterer
e78f4f689d util: add guards for the etrace/trace defines
This file is really useful on its own for other projects if
auto-included via export CFLAGS="$CFLAGS -include /path/to/file.h"
However, that causes compiler warnings, let's add indef checks for this
as a quick workaround.

Since these three come as a set and are only used for debugging, we can
ifndef them all in one go rather than individually.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1423>
2026-02-04 11:18:54 +10:00
Peter Hutterer
ad89a83ae6 tablet: ignore the tablet tool name if it's a generic tool
libwacom has generic pens that are used for devices that don't have tool
ids. Let's ignore the names for those pens since they're just made up
names anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1422>
2026-02-03 23:27:14 +00:00
Peter Hutterer
6d514ee6fa touchpad: add get_default_timeout for dwt and dwtp
I doubt this is really needed but our convention for all config options
is set/get/get_default so let's stick with that.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1421>
2026-02-03 13:01:59 +10:00
David Santamaría Rogado
6f79797308 test: recover external usb keyboard touchpad combo
This recovers the testing that a USB keyboard plus touchpad combo both
set as external, only its own keyboard should affect to DWT that was
removed when Acer Hawaii combo was set as internal.

This is uncommon as usb touchpads nowadays are set as internal, but,
perhaps someone that adds a quirk for a really external combo also adds
in udev's hwdb the external integration for the touchpad, or perhaps we
should set the integration to external when AttrTPKComboLayout=below is
used for the touchpad.

The issue is if the touchpad is leave as internal every keyboard affect
DWT, not only the one that belongs to its combo.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1415>
2026-02-02 09:52:08 +00:00
Michał Chojnowski
b58d5a165b tablet: fix handling of AttrPressureRange quirk
tablet_get_quirked_pressure_thresholds() is wrong:
the pressure thresholds for tip press and tip release are swapped around.
This seems to be a regression introduced in commit 4bc27543e9.

This prevents AttrPressureRange from working as intended for tablets,
and causes weird things to happen if it's set.
(For example, when pressure is in the range between
the intended release threshold and the intended press threshold,
the "pressed" status flip-flops between 0 and 1 every frame).

Fix that.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1420>
2026-02-02 08:41:24 +01:00
Peter Hutterer
fe1d44637f touchpad: add support for fast swipe when 3fg drag is enabled
This adds a movement threshold (5mm) and a timeout (80ms) to the 3fg
drag gesture. On 3fg down with 3fg drag enabled we immediately send a
GESTURE_SWIPE event. After the timeout expires we check the movement of
the fingers - if it is below the threshold cancel the swipe and hold a
button down (i.e. a 3fg drag). Otherwise, continue with this being a
swipe.

This allows for swipe gestures to be used while 3fg drag is enabled.

Above applies the same way for 4fg with 4fg drag enabled.
Thresholds selected using the "yeah, that seems about alright" method,
intentionally quite low because we assume that users that enable 3fg
drag prefer 3fg dragging over swipe.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1410>
2026-02-02 06:44:48 +00:00
Peter Hutterer
5b7b8f1bb2 gestures: remove two empty helper functions
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1410>
2026-02-02 06:44:48 +00:00
Peter Hutterer
33b1d87c08 touchpad: don't disable on external mice until we see an event
Instead of disabling the touchpad as soon as a mouse is seen by
libinput, disable it as soon as a mouse sends an actual event. This
works around the current issues with many devices (touchpads and
keyboards alike) announcing a HID Mouse Application Collection which
gets its own event node in the kernel. That event node usually just sits
there and does nothing but its mere presence disabled the touchpad.

Let's change this and instead only disable once we see an event.

Closes: #1104
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1414>
2026-01-28 00:43:37 +00:00
Peter Hutterer
89351c715a test: parametrize the external mouse test
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1414>
2026-01-28 00:43:37 +00:00
Peter Hutterer
e161abdc19 evdev: rename evdev_paired_keyboard to evdev_paired_device
We'll be using this struct for other devices than keyboards.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1414>
2026-01-28 00:43:36 +00:00
David Santamaría Rogado
47482bcd8b quirks: add more specific matches to actual quirks
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1418>
2026-01-27 00:43:51 +00:00
David Santamaría Rogado
307d2509a9 quirks: merge ibm with lenovo
ScrollPoint mouses as well IBM USB Travel Keyboard with Ultra Nav Mouse
are owned by Lenovo.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1419>
2026-01-27 00:19:16 +00:00
Peter Hutterer
86f19a0978 lua: install a timeout hook before any pcalls to prevent infinite loops
If a lua pcall takes longer than one second, kill the plugin.

How often to call the timeout handler is a trade-off but we err on the
side of "possibly too high" since the overwhelmingly vast majority of
plugins will never trigger it anyway.

Gemini suggests that Lua 5.4 can do ~500k ops per second for string
concat (the slowest listed), Claude suggests 1 to 10 million ops per
second. The test in this patch on my 4y old cheap desktop runs the
timeout hook roughly every 37ms. Any normal plugin will be well and
truly done with its work by then.

Closes: #1245
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1416>
2026-01-27 00:02:15 +00:00
Helga K
cc1499fbb3 quirks: Add quirk for Gigabyte Aorus 15BKF keyboard
This keyboard sits on the USB bus, so it's considered an external
keyboard by default. This commit changes that to internal
so that DWT detection on the laptop touchpad works.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1411>
2026-01-22 15:59:42 +04:00
Jens Peters
8854066e93 plugin: add an example for controlling a mouse with a tablet
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.

Follow up from https://gitlab.freedesktop.org/libinput/libinput/-/issues/1195

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1412>
2026-01-21 08:44:13 +00:00
Peter Hutterer
074a6f57b8 test: fix some comments for accuracy
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1413>
2026-01-20 14:59:02 +10:00
Peter Hutterer
9f096b0403 test: move two helper functions into the only caller
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1413>
2026-01-20 14:59:02 +10:00
Peter Hutterer
328b9a8a32 test: fix the gesture hold cancel test
This didn't actually check for the cancellation of the gesture, so let's
add that.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1413>
2026-01-20 14:59:02 +10:00
Peter Hutterer
7ff2326efb test: change the gesture state color to normal yellow
The current color is unreadable on my screens and since no-one else
really looks at this much, let's change it for my benefit.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1413>
2026-01-20 14:59:02 +10:00
Peter Hutterer
6bca272629 test: parametrize a gesture test
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1413>
2026-01-20 14:59:02 +10:00
Peter Hutterer
00e568f43a test: correct a copy/pasted comment
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1413>
2026-01-20 13:14:24 +10:00
Peter Hutterer
13405e4b8c test: add missing BTN_TOOL_QUINTTAP to the acer hawaii test device
This recording comes from
https://bugs.freedesktop.org/show_bug.cgi?id=99140 and it's set there so
this si presumably a copy/paste issue.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1413>
2026-01-20 11:49:58 +10:00
Peter Hutterer
bee28a7e53 test: remove a leftover etrace()
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1413>
2026-01-20 11:49:58 +10:00
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
Peter Hutterer
d5d38b2ed1 doc/user: fix two typos in ref anchors
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1374>
2025-12-09 06:07:01 +00:00
Peter Hutterer
38b5c2e0cc touchpad: add configurable timeouts to disable-while-trackpointing
Same motivation as in commit
"touchpad: add configurable timeouts to disable-while-typing"

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1372>
2025-12-02 09:24:15 +10:00
Peter Hutterer
20851b5020 touchpad: add configurable timeouts to disable-while-typing
Touchpads that don't give us useful palm detection data are getting more
common (see e.g. our ABS_MT_TOOL_TYPE quirks). On those touchpads we can
only rely on dwt and palm edge detection which means those two must be
more spot on than ever before.

DWT in particular is more prone to user-specific requirements, the
current timeouts have been insufficient for a number of users. So let's
make them more configurable.

Currently limited to >100ms and <5 seconds to avoid DWT being used in
the xkcd workflow style.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1372>
2025-12-02 09:24:15 +10:00
Peter Hutterer
2003ab3aef test: rename a dwt test for better clarity
This is the "short-timeout after a single key press" dwt test so let's
rename it that way

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1372>
2025-12-02 09:20:08 +10:00
Peter Hutterer
4bb6a31894 doc: fix a few miss-hyphenated disable-while-typing comments
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1372>
2025-12-02 09:20:08 +10:00
Peter Hutterer
db6a04665c touchpad: use INPUT_PROP_PRESSUREPAD as signal it's a pressurepad
Because, well, it says so on the box now. No more quirks, hopefully!

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1359>
2025-12-01 21:39:11 +00:00
Peter Hutterer
7621edab05 include: sync headers with kernel 6.18
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1359>
2025-12-01 21:39:11 +00:00
Peter Hutterer
39aea2a8d6 test: silence a valgrind warning
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1370>
2025-11-27 09:32:13 +10:00
Peter Hutterer
7e8298e9ec tablet: when destroying a tablet, unlink the tablet tools
If a caller holds a ref to a tablet tool when the device is
destroyed, the tool didn't get removed from the tablet->tool_list.

Later on tool unref the list_remove() would try to reset the pointers
but the list head was long since freed, causing an invalid write.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1370>
2025-11-27 09:26:54 +10:00
Peter Hutterer
49d9528bdf tablet: after three valid prox out events, unload the forced prox plugin
Once we receive three valid proximity out events for the pen, unload the
plugin that generates forced proximity in events for tablets that
don't send BTN_TOOL_PEN.

Closes #1222

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1370>
2025-11-26 10:55:03 +10:00
Peter Hutterer
1e8901d009 tablet: only apply eraser button settings if we have a device
If the device is unplugged, our tool's last_device is NULL. If a caller
then tries to the toggle the eraser button setting libinput would crash.
Fix this by simply skipping the configuration until the tool goes back
into proximity over some other device (if any).

Closes #1223

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1370>
2025-11-26 10:54:47 +10:00
Peter Hutterer
a6ad084280 tablet: return the wanted eraser button mode/button from the config
This matches our behavior for other settings - always return the
user-configured setting from the configuration API, not the current
setting (which may be delayed until the device is in a netural state).

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1370>
2025-11-26 10:32:18 +10:00
293 changed files with 6368 additions and 2653 deletions

View file

@ -49,8 +49,6 @@ 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'
@ -103,19 +101,17 @@ variables:
UBUNTU_PACKAGES: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme python3-pytest-xdist libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev lua5.4-dev'
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'
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: '2025-11-17.0'
DEBIAN_TAG: '2025-11-17.0'
UBUNTU_TAG: '2025-11-17.0'
ARCH_TAG: '2025-11-17.0'
ALPINE_TAG: '2025-11-17.0'
FREEBSD_TAG: '2025-11-17.0'
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'
FDO_UPSTREAM_REPO: libinput/libinput
@ -339,20 +335,6 @@ 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
#################################################################
@ -446,16 +428,6 @@ 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
#################################################################
# #
@ -1344,19 +1316,6 @@ 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"
#################################################################
# #

View file

@ -3,7 +3,7 @@
#
# We're happy to rebuild all containers when one changes.
.default_tag: &default_tag '2025-11-17.0'
.default_tag: &default_tag '2026-01-09.0'
distributions:
- name: fedora
@ -148,29 +148,6 @@ 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

View file

@ -45,6 +45,7 @@ __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' \

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 181 KiB

After

Width:  |  Height:  |  Size: 489 KiB

View file

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

View file

@ -87,7 +87,7 @@ suggested hwdb entry. ::
If there are discrepancies between the coordinate range the kernels
advertises and what what the touchpad sends, the hwdb entry should be added to the
advertises and 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 pipline"]
plugins [label="plugin pipeline"]
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, see
system-provided libinput with one from the git repository,
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 dilligence
correct, up-to-date and/or unmodified from the git branch. Due diligence
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 deboucing was detected.
message is printed to the log when spurious debouncing 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 are ignored.
left or right button area, those fingers 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 out of the button area it will control the
- once a finger moves 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

@ -47,7 +47,7 @@ for those devices it is expected to be implemented by the toolkit.
Three-finger drag
------------------------------------------------------------------------------
Three-finger drag allows emulates the mouse button down while three fingers
Three-finger drag 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 +165,7 @@ most touchpads.
Disable while trackpointing
------------------------------------------------------------------------------
DWTP is a form of palm detecion for devices that have a trackpoint (like
DWTP is a form of palm detection 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,8 +205,8 @@ 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 below the given
the given threshold is met, and will reach the maximum logical pressure
of this is that the tablet will not register pressure until 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.

View file

@ -144,10 +144,9 @@ 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 ninja -C builddir check
$> sudo meson test -C builddir
So it always pays to run that before submitting. This will also run the code
through valgrind and pick up any memory leaks.
So it always pays to run that before submitting.
.. _contributing_submitting_code:

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_pointer_get_axis_source()** for details.
**libinput_event_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 type, though libinput can
Only one device type should be set per device at a time, 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=serial
MatchBus=ps2
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 a sections to
``/etc/libinput/local-overrides.quirks`` file. Users may add 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.
ModelALPSTouchpad, ModelAppleTouchpad, ModelWacomTouchpad, ModelChromebook
ModelALPSSerialTouchpad, 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,6 +148,9 @@ 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.
@ -159,9 +162,9 @@ 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=N
AttrSizeHint=NxM, AttrResolutionHint=NxM
Hints at the width x height of the device in mm, or the resolution
of the x/y axis in units/mm. These may only be used where they apply to
of the x and y axes 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`.
@ -199,6 +202,9 @@ 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

@ -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
currenthold gesture is no longer active. This may also occurs when
current hold gesture is no longer active. This may also occur when
switching between hold gestures with different finger counts.
.. note:: By definition, a hold gesture does not move and thus no coordinate
@ -108,14 +108,15 @@ 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 <no event>
Finger 2 down **begin** 2
============= ============== ============
Finger 1 down **begin** 1
Finger 2 down **cancel** 1
\ **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
@ -254,7 +255,8 @@ 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, an **hold update** event is sent. Otherwise,
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,
the hold gesture terminates with a **hold cancel** event.
Notably, libinput's thumb and palm detection is not a simple boolean per
@ -359,7 +361,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, it's location cannot be
finger does not have positional information, its 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 property but other parts of the stack (if any) should continue
ignore this device 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

@ -162,7 +162,7 @@ the value can be crafted manually:
.. code-block:: lua
evdev_type = 0x3 -- EV_REL
evdev_type = 0x2 -- EV_REL
evdev_code = 0x1 -- REL_Y
evdev_usage = (evdev_type << 16) | evdev_code
@ -485,7 +485,7 @@ methods will be noops.
Version 1 of the plugin API supports the following udev properties:
- ``ID_INPUT`` and all of ``ID_INPUT_*`` that denote the device type as assigned
- 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

View file

@ -131,6 +131,7 @@ 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',

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 tying on a Lenovo T440 happened in the left-most and right-most 5% of
during typing 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. One a touch is labelled as
that it cannot be triggered by a finger movement. Once 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 interfer with the correct
interacting with the stylus, these touches would interfere 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 the tracker item, each
through so-called "trackers". Each event prepends a 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

@ -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 Plastation3 controller")
- the vendor model number of the device (e.g. "Sony PlayStation3 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 needs to be worked around in libinput
bug, not a software bug. Often these need 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 burdern on the maintainers.
unreasonable maintenance burden 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 only
support two-finger scrolling and edge scrolling
- 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,6 +124,12 @@ 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 set is interpreted as a group of devices that usually belong to a
A logical seat 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

@ -0,0 +1,245 @@
<?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>

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -4,9 +4,9 @@
Switches
==============================================================================
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.
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.
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,3 +59,20 @@ 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 while
unrelated to the tip. A button event is independent of the tip and can occur 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 application can and
pressure value while the tip is logically up. Most applications 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, Wacon Cintiq and Wacom Intuos Pro series. The tool ID can
Intuos 3, 4, 5, Wacom 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-east of
so that the origin of each axis remains the logical north-west 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 touchpad usually depends on visual feedback
The availability of modes on a tablet pad 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,7 +466,21 @@ 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.
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.
.. _tablet-area:
@ -509,7 +523,7 @@ tip of the tool - inverting the tool brings the eraser into proximity.
.. figure:: tablet-eraser-invert.svg
:align: center
An pen-like tool used as pen and as eraser by inverting it
A 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.)
@ -524,7 +538,7 @@ into proximity immediately after - as if the tool was physically inverted.
.. figure:: tablet-eraser-button.svg
:align: center
An pen-like tool used as pen and as eraser by pressing the eraser button
A 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>`_
@ -541,4 +555,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
with an invert-type eraser.
pens with an invert-type eraser.

View file

@ -59,13 +59,16 @@ 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 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()**.
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()**.
Note that drag lock only applies if tap-and-drag is enabled.
.. figure:: tap-n-drag.svg
@ -81,11 +84,13 @@ 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. To release the button immediately,
simply tap again (f).
release (e) is triggered by a timeout (if in timeout mode) or by tapping again (f).
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.
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 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 done finished.
the full suite when development is 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 filtures (see :ref:`test-filtering`)
failure it is recommended to employ test filters (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=machine # only run container-friendly tests
$ meson test --no-suite=hardware # 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
SynPS/2 Synaptics TouchPad: /dev/input/event19
/dev/input/event19: SynPS/2 Synaptics TouchPad
Hit enter to start replaying
@ -329,16 +329,13 @@ 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`` has a ``--multiple`` argument to record multiple devices at
once. Unlike the normal invocation, this one requires a number of arguments: ::
``libinput record`` can record multiple devices by specifying them on the
commandline. Recording multiple devices requires the ``--output-file``
argument: ::
$ sudo libinput record --multiple --output-file=touchpad-bug.yml /dev/input/event17 /dev/input/event3
$ sudo libinput record --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
@ -365,7 +362,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 too.
tools are available and the man page for each respective tool.
.. _libinput-quirks:

View file

@ -11,7 +11,7 @@ libinput has a mechanism called a **hysteresis** to avoid that jitter. When
active, movement within 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.c``.
read the implementation of the hysteresis in ``src/evdev.h``.
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,31 +53,38 @@ 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
+-------------------------------------------------------------------------------+
| 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 | |
┌───────────────────────────────────────────────────────────────────────────────┐
│ 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 │
...
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 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.
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.
By default, this tool uses the :ref:`device-quirks` for the pressure range. To
narrow down on the best values for your device, specify the 'logically down'
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'
and 'logically up' pressure thresholds with the ``--touch-thresholds``
argument: ::
@ -100,12 +107,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
The file name **must** be ``/etc/libinput/local-overrides.quirks``.
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
@ -117,7 +124,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 list-quirks /dev/input/event10
$ sudo libinput quirks list /dev/input/event10
AttrPressureRange=10:8
Replace the event node with the one from your device. If the
@ -199,7 +206,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
@ -211,7 +218,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 list-quirks /dev/input/event10
$ sudo libinput quirks list /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 specifcy
the ``ABS_MT_WIDTH_MAJOR/ABS_MT_WIDTH_MINOR`` axes. These axes specify
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
------------------------------------------------------------------------------
.. _touchapds_buttons_phys:
.. _touchpads_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 buttons until ca 2008. Touchpads with only two
with a single physical button 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
Forcepads/Pressurepads
..............................................................................
Forcepads are Clickpads without a physical button underneath the hardware.
@ -65,6 +65,7 @@ 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:
@ -79,7 +80,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.
.. _touchapds_touch_st:
.. _touchpads_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
interfer with middle-button dragging, if middle-button dragging is required
interfere 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 and Tablet Mode switch)
- Switches (Lid Switch, Tablet Mode switch, and Keypad Slide 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 the 0..120 range, see below. Any multiple of 120 should
normalized into multiples of 120, 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 cover than one detent per event and thus each
Fast scrolling may trigger more than one detent per event and thus each
event may contain multiples of the value, discrete or v120 value:
+-------------+------------+---------------+------+

View file

@ -1,5 +1,5 @@
project('libinput', 'c',
version : '1.30.2',
version : '1.31.0',
license : 'MIT/Expat',
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
meson_version : '>= 0.64.0')
@ -80,10 +80,11 @@ endif
config_h.set_quoted('HTTP_DOC_LINK', doc_url)
config_h.set('_GNU_SOURCE', '1')
if get_option('buildtype') == 'debug' or get_option('buildtype') == 'debugoptimized'
is_debug_build = get_option('buildtype') == 'debug' or get_option('buildtype') == 'debugoptimized'
if is_debug_build
config_h.set('IS_DEBUG_BUILD', '1')
config_h.set_quoted('MESON_BUILD_ROOT', meson.current_build_dir())
else
config_h.set_quoted('MESON_BUILD_ROOT', '')
endif
prefix = '''#define _GNU_SOURCE 1
@ -222,6 +223,10 @@ 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
@ -758,10 +763,10 @@ executable('ptraccel-debug',
# Don't run the test during a release build because we rely on the magic
# subtool lookup
if get_option('buildtype') == 'debug' or get_option('buildtype') == 'debugoptimized'
if is_debug_build
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'))
config_tool_option_test.set('MESON_ENABLED_DEBUG_GUI', get_option('debug-gui').to_string())
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',
@ -795,6 +800,13 @@ 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],
@ -880,6 +892,8 @@ 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',
@ -891,6 +905,7 @@ 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',

View file

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

View file

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

View file

@ -9,3 +9,23 @@ 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,5 +1,8 @@
# 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

@ -0,0 +1,11 @@
# 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,35 +1,43 @@
# 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,10 +1,13 @@
# 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,3 +9,11 @@ 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,3 +1,5 @@
# Do not edit this file, it will be overwritten on update
[Glorious Model O]
MatchUdevType=mouse
MatchBus=usb

View file

@ -2,9 +2,71 @@
# "GXTP5100 Touchpad": pressure touchpad mostly used in Lenovo laptops.
# Match vid and pid as it can have other names.
[Lenovo Haptic Touchpad (Goodix)]
[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
ModelPressurePad=1
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

@ -0,0 +1,22 @@
# 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,5 +3,7 @@
# 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

@ -1,47 +0,0 @@
# 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,9 +1,41 @@
# Do not edit this file, it will be overwritten on update
# Tested on PCSpecialist Recoil 17
[ITE Device(8176) Keyboard]
# ITE keyboards are usb keyboards mostly used in notebook and laptops,
# set as internal.
[ITE Device(8???) 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,3 +1,5 @@
# 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,10 +55,12 @@ 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
@ -69,10 +71,12 @@ 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

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,15 +11,10 @@ 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:*
AttrKeyboardIntegration=internal
[Microsoft Surface Cover]
MatchName=*Microsoft Surface *Cover*
MatchDMIModalias=dmi:*svnMicrosoftCorporation:*
AttrKeyboardIntegration=internal
MatchName=Microsoft Surface *Keyboard
MatchDMIModalias=dmi:*:svnMicrosoftCorporation:*
AttrEventCode=-BTN_0;
AttrKeyboardIntegration=internal
[Microsoft Surface Laptop Studio Touchpad]
MatchVendor=0x045E
@ -28,11 +23,6 @@ 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,7 +1,8 @@
# 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

View file

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

View file

@ -0,0 +1,28 @@
# 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,3 +1,5 @@
# Do not edit this file, it will be overwritten on update
[QEMU/KVM mouse integration]
MatchName=*spice vdagent tablet*
AttrIsVirtual=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.

View file

@ -7,21 +7,22 @@ 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
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
ModelPressurePad=1
# SYNA3602:00 0911:5288 touchpad, clickpad pretending it has a right button.
# Integrated into several systems, including
# Purism Librem 14v1
# Prestigio Smartbook 141 C2
# StarLite Mk II
# Iota IOTA2320
[Synaptics 0911:5288 Touchpad]
MatchUdevType=touchpad
MatchName=* 0911:5288 Touchpad
AttrEventCode=-BTN_RIGHT
AttrInputProp=+INPUT_PROP_PRESSUREPAD

View file

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

View file

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

View file

@ -1,9 +1,38 @@
[Acer Switch Alpha 12]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnAcer:pnSwitchSA5-271:*
# 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:*
ModelTabletModeNoSuspend=1
[Acer Spin 5]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnAcer:pnSpinSP513-52N:*
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

View file

@ -88,6 +88,7 @@ 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
# don't disable volume buttons in tablet mode
[Asus ROG Flow Z13 2025 volume buttons]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnASUSTeKCOMPUTERINC.:pnROGFlowZ13GZ302EA_GZ302EA:*
ModelTabletModeNoSuspend=1
# enable "disable touchpad while typing" to work with z13 keyboard
[Asus ROG FLow Z13 2025 keyboard]
MatchUdevType=keyboard

View file

@ -1,17 +0,0 @@
# 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

@ -1,9 +0,0 @@
[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,118 +2,104 @@
[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
MatchDMIModalias=dmi:*svnDell*:*XPSL322X*
# pn can be "XPS L322X" and "Dell System XPS L322X", match both :pn*XPSL322X:.
MatchDMIModalias=dmi:*:svnDellInc.:pn*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:**bvnDellInc.:*:pnLatitude5480*
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitude5480:*
AttrTrackpointMultiplier=0.5
[Latitude 5580 Trackpoint]
MatchName=*DualPoint Stick
MatchUdevType=pointingstick
MatchDMIModalias=dmi:**bvnDellInc.:*:pnLatitude5580*
MatchDMIModalias=dmi:*:svnDellInc.: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 7285]
MatchName=*AT Translated Set 2 keyboard*
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitude7285:*
ModelTabletModeNoSuspend=1
[Dell Pro Rugged Tablet]
MatchName=*AT Translated Set 2 keyboard*
MatchDMIModalias=dmi:*:svnDellInc.:pnDellProRugged*TabletRA*:*
ModelTabletModeNoSuspend=1
[Latitude 7480 Touchpad]
MatchName=DLL07A0*
MatchDMIModalias=dmi:**bvnDellInc.:*:pnLatitude7480*
MatchDMIModalias=dmi:*:svnDellInc.:pnLatitude7480:*
AttrPressureRange=35:34
[Latitude 7490 Trackpoint]
MatchName=*Mouse
MatchUdevType=pointingstick
MatchDMIModalias=dmi:**bvnDellInc.:*:pnLatitude7490*
MatchDMIModalias=dmi:*:svnDellInc.: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
@ -125,9 +111,14 @@ MatchVendor=0x2575
MatchProduct=0x0204
ModelDellCanvasTotem=1
[Dell 2-in-1 Models]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*:svnDellInc.:pn*2-in-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:*
ModelTabletModeNoSuspend=1
# This is a true pressurepad so disable pressure for contact size
@ -136,78 +127,78 @@ ModelTabletModeNoSuspend=1
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x0F60
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell Mayabay Touchpad]
MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xCFA0
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[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
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell laptop 16 Synaptics touchpad]
MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xCFF9
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell laptop 14 Goodix touchpad]
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x0F61
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell laptop 16 Goodix touchpad]
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x0F62
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell 14 Premium DA14250 touchpad]
MatchBus=i2c
MatchVendor=0x0488
MatchProduct=0x108C
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell 16 Premium DA16250 touchpad]
MatchBus=i2c
MatchVendor=0x0488
MatchProduct=0x108D
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell laptop 14_1 Synaptics touchpad]
MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xD01D
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell laptop 16_1 Synaptics touchpad]
MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xD01A
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell laptop 14 Sensel touchpad]
MatchBus=i2c
MatchVendor=0x2C2F
MatchProduct=0x0034
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD
[Dell laptop 16 Sensel touchpad]
MatchBus=i2c
MatchVendor=0x2C2F
MatchProduct=0x0033
ModelPressurePad=1
AttrInputProp=+INPUT_PROP_PRESSUREPAD

View file

@ -1,11 +1,7 @@
[Framework Laptop Touchpad]
MatchName=PIXA3854:00 093A:0274 Touchpad
MatchUdevType=touchpad
MatchDMIModalias=dmi:*svnFramework:pnLaptop*
AttrEventCode=-BTN_RIGHT
# Do not edit this file, it will be overwritten on update
[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,7 +1,9 @@
# 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]

View file

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

View file

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

View file

@ -1,29 +1,90 @@
# 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 Pavilion dmi4]
[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]
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
@ -36,86 +97,7 @@ 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
# The HP OmniBook Ultra Flip Laptop 14-fh0xxx's custom Intel ISH firmware
# filters out events from its builtin keyboard and touchpad when the hinge is
# opened little more than 180 degrees but toggles tablet-mode when it's opened
# little less than 180 degrees.
# Do not suspend the keyboard and touchpad to let use the device in flat
# position and also give consistency with some keyboard keys controlled by the
# Video Bus device (brightness down/up), the HP WMI hotkeys device (mic mute and
# hp hubs launcher key) and the backlight getting on and off by the firmware at
# the same time it enables disables the input.
# This one is for the keyboard and...
[HP OmniBook Ultra Flip Laptop 14-fh0xxx Keyboard]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnHP:pnHPOmniBookUltraFlipLaptop14-fh0xxx:*
ModelTabletModeNoSuspend=1
# ...this one is for the touchpad.
[HP OmniBook Ultra Flip Laptop 14-fh0xxx Touchpad]
MatchName=SYNA3580:00 06CB:CFD2 Touchpad
MatchDMIModalias=dmi:*svnHP:pnHPOmniBookUltraFlipLaptop14-fh0xxx:*
ModelTabletModeNoSuspend=1

View file

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

View file

@ -1,7 +1,9 @@
# 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:*svnICL:*:rvnICL:rnSi16:*
MatchDMIModalias=dmi:*:svnICL:*:rnSi16:*
AttrInputProp=-INPUT_PROP_BUTTONPAD
AttrEventCode=+BTN_RIGHT

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -27,7 +27,7 @@
#include "evdev.h"
#define MIDDLEBUTTON_TIMEOUT ms2us(50)
#define MIDDLEBUTTON_TIMEOUT usec_from_millis(50)
/*****************************************
* BEFORE YOU EDIT THIS FILE, look at the state diagram in
@ -88,9 +88,10 @@ middlebutton_state_error(struct evdev_device *device,
}
static void
middlebutton_timer_set(struct evdev_device *device, uint64_t now)
middlebutton_timer_set(struct evdev_device *device, usec_t now)
{
libinput_timer_set(&device->middlebutton.timer, now + MIDDLEBUTTON_TIMEOUT);
libinput_timer_set(&device->middlebutton.timer,
usec_add(now, MIDDLEBUTTON_TIMEOUT));
}
static void
@ -102,7 +103,7 @@ middlebutton_timer_cancel(struct evdev_device *device)
static inline void
middlebutton_set_state(struct evdev_device *device,
enum evdev_middlebutton_state state,
uint64_t now)
usec_t now)
{
switch (state) {
case MIDDLEBUTTON_LEFT_DOWN:
@ -127,7 +128,7 @@ middlebutton_set_state(struct evdev_device *device,
static void
middlebutton_post_event(struct evdev_device *device,
uint64_t now,
usec_t now,
evdev_usage_t button,
enum libinput_button_state state)
{
@ -136,7 +137,7 @@ middlebutton_post_event(struct evdev_device *device,
static int
evdev_middlebutton_idle_handle_event(struct evdev_device *device,
uint64_t time,
usec_t time,
enum evdev_middlebutton_event event)
{
switch (event) {
@ -162,7 +163,7 @@ evdev_middlebutton_idle_handle_event(struct evdev_device *device,
static int
evdev_middlebutton_ldown_handle_event(struct evdev_device *device,
uint64_t time,
usec_t time,
enum evdev_middlebutton_event event)
{
switch (event) {
@ -214,7 +215,7 @@ evdev_middlebutton_ldown_handle_event(struct evdev_device *device,
static int
evdev_middlebutton_rdown_handle_event(struct evdev_device *device,
uint64_t time,
usec_t time,
enum evdev_middlebutton_event event)
{
switch (event) {
@ -266,7 +267,7 @@ evdev_middlebutton_rdown_handle_event(struct evdev_device *device,
static int
evdev_middlebutton_middle_handle_event(struct evdev_device *device,
uint64_t time,
usec_t time,
enum evdev_middlebutton_event event)
{
switch (event) {
@ -308,7 +309,7 @@ evdev_middlebutton_middle_handle_event(struct evdev_device *device,
static int
evdev_middlebutton_lup_pending_handle_event(struct evdev_device *device,
uint64_t time,
usec_t time,
enum evdev_middlebutton_event event)
{
switch (event) {
@ -344,7 +345,7 @@ evdev_middlebutton_lup_pending_handle_event(struct evdev_device *device,
static int
evdev_middlebutton_rup_pending_handle_event(struct evdev_device *device,
uint64_t time,
usec_t time,
enum evdev_middlebutton_event event)
{
switch (event) {
@ -380,7 +381,7 @@ evdev_middlebutton_rup_pending_handle_event(struct evdev_device *device,
static int
evdev_middlebutton_passthrough_handle_event(struct evdev_device *device,
uint64_t time,
usec_t time,
enum evdev_middlebutton_event event)
{
switch (event) {
@ -403,7 +404,7 @@ evdev_middlebutton_passthrough_handle_event(struct evdev_device *device,
static int
evdev_middlebutton_ignore_lr_handle_event(struct evdev_device *device,
uint64_t time,
usec_t time,
enum evdev_middlebutton_event event)
{
switch (event) {
@ -432,7 +433,7 @@ evdev_middlebutton_ignore_lr_handle_event(struct evdev_device *device,
static int
evdev_middlebutton_ignore_l_handle_event(struct evdev_device *device,
uint64_t time,
usec_t time,
enum evdev_middlebutton_event event)
{
switch (event) {
@ -457,7 +458,7 @@ evdev_middlebutton_ignore_l_handle_event(struct evdev_device *device,
}
static int
evdev_middlebutton_ignore_r_handle_event(struct evdev_device *device,
uint64_t time,
usec_t time,
enum evdev_middlebutton_event event)
{
switch (event) {
@ -483,7 +484,7 @@ evdev_middlebutton_ignore_r_handle_event(struct evdev_device *device,
static int
evdev_middlebutton_handle_event(struct evdev_device *device,
uint64_t time,
usec_t time,
enum evdev_middlebutton_event event)
{
int rc = 0;
@ -553,7 +554,7 @@ evdev_middlebutton_apply_config(struct evdev_device *device)
bool
evdev_middlebutton_filter_button(struct evdev_device *device,
uint64_t time,
usec_t time,
evdev_usage_t button,
enum libinput_button_state state)
{
@ -616,7 +617,7 @@ evdev_middlebutton_filter_button(struct evdev_device *device,
}
static void
evdev_middlebutton_handle_timeout(uint64_t now, void *data)
evdev_middlebutton_handle_timeout(usec_t now, void *data)
{
struct evdev_device *device = evdev_device(data);

View file

@ -32,8 +32,8 @@
#include "evdev-mt-touchpad.h"
#include "linux/input.h"
#define DEFAULT_BUTTON_ENTER_TIMEOUT ms2us(100)
#define DEFAULT_BUTTON_LEAVE_TIMEOUT ms2us(300)
#define DEFAULT_BUTTON_ENTER_TIMEOUT usec_from_millis(100)
#define DEFAULT_BUTTON_LEAVE_TIMEOUT usec_from_millis(300)
/*****************************************
* BEFORE YOU EDIT THIS FILE, look at the state diagram in
@ -121,15 +121,17 @@ is_inside_top_middle_area(const struct tp_dispatch *tp, const struct tp_touch *t
}
static void
tp_button_set_enter_timer(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
tp_button_set_enter_timer(struct tp_dispatch *tp, struct tp_touch *t, usec_t time)
{
libinput_timer_set(&t->button.timer, time + DEFAULT_BUTTON_ENTER_TIMEOUT);
libinput_timer_set(&t->button.timer,
usec_add(time, DEFAULT_BUTTON_ENTER_TIMEOUT));
}
static void
tp_button_set_leave_timer(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
tp_button_set_leave_timer(struct tp_dispatch *tp, struct tp_touch *t, usec_t time)
{
libinput_timer_set(&t->button.timer, time + DEFAULT_BUTTON_LEAVE_TIMEOUT);
libinput_timer_set(&t->button.timer,
usec_add(time, DEFAULT_BUTTON_LEAVE_TIMEOUT));
}
/*
@ -141,7 +143,7 @@ tp_button_set_state(struct tp_dispatch *tp,
struct tp_touch *t,
enum button_state new_state,
enum button_event event,
uint64_t time)
usec_t time)
{
libinput_timer_cancel(&t->button.timer);
@ -176,7 +178,7 @@ static void
tp_button_none_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum button_event event,
uint64_t time)
usec_t time)
{
switch (event) {
case BUTTON_EVENT_IN_BOTTOM_R:
@ -206,7 +208,7 @@ static void
tp_button_area_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum button_event event,
uint64_t time)
usec_t time)
{
switch (event) {
case BUTTON_EVENT_IN_BOTTOM_R:
@ -233,23 +235,22 @@ tp_button_area_handle_event(struct tp_dispatch *tp,
* that triggered this call).
*/
static inline void
tp_button_release_other_bottom_touches(struct tp_dispatch *tp,
uint64_t other_start_time)
tp_button_release_other_bottom_touches(struct tp_dispatch *tp, usec_t other_start_time)
{
struct tp_touch *t;
tp_for_each_touch(tp, t) {
uint64_t tdelta;
usec_t tdelta;
if (t->button.state != BUTTON_STATE_BOTTOM || t->button.has_moved)
continue;
if (other_start_time > t->button.initial_time)
tdelta = other_start_time - t->button.initial_time;
if (usec_cmp(other_start_time, t->button.initial_time) > 0)
tdelta = usec_delta(other_start_time, t->button.initial_time);
else
tdelta = t->button.initial_time - other_start_time;
tdelta = usec_delta(t->button.initial_time, other_start_time);
if (tdelta > ms2us(80))
if (usec_cmp(tdelta, usec_from_millis(80)) > 0)
continue;
t->button.has_moved = true;
@ -260,7 +261,7 @@ static void
tp_button_bottom_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum button_event event,
uint64_t time)
usec_t time)
{
switch (event) {
case BUTTON_EVENT_IN_BOTTOM_R:
@ -296,7 +297,7 @@ static void
tp_button_top_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum button_event event,
uint64_t time)
usec_t time)
{
switch (event) {
case BUTTON_EVENT_IN_BOTTOM_R:
@ -327,7 +328,7 @@ static void
tp_button_top_new_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum button_event event,
uint64_t time)
usec_t time)
{
switch (event) {
case BUTTON_EVENT_IN_BOTTOM_R:
@ -362,7 +363,7 @@ static void
tp_button_top_to_ignore_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum button_event event,
uint64_t time)
usec_t time)
{
switch (event) {
case BUTTON_EVENT_IN_TOP_R:
@ -394,7 +395,7 @@ static void
tp_button_ignore_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum button_event event,
uint64_t time)
usec_t time)
{
switch (event) {
case BUTTON_EVENT_IN_BOTTOM_R:
@ -422,7 +423,7 @@ static void
tp_button_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum button_event event,
uint64_t time)
usec_t time)
{
enum button_state current = t->button.state;
@ -496,7 +497,7 @@ tp_button_check_for_movement(struct tp_dispatch *tp, struct tp_touch *t)
}
void
tp_button_handle_state(struct tp_dispatch *tp, uint64_t time)
tp_button_handle_state(struct tp_dispatch *tp, usec_t time)
{
struct tp_touch *t;
@ -547,7 +548,7 @@ tp_button_handle_state(struct tp_dispatch *tp, uint64_t time)
}
static void
tp_button_handle_timeout(uint64_t now, void *data)
tp_button_handle_timeout(usec_t now, void *data)
{
struct tp_touch *t = data;
@ -555,7 +556,7 @@ tp_button_handle_timeout(uint64_t now, void *data)
}
void
tp_process_button(struct tp_dispatch *tp, const struct evdev_event *e, uint64_t time)
tp_process_button(struct tp_dispatch *tp, const struct evdev_event *e, usec_t time)
{
uint32_t mask = bit(evdev_usage_enum(e->usage) - EVDEV_BTN_LEFT);
@ -577,7 +578,7 @@ tp_process_button(struct tp_dispatch *tp, const struct evdev_event *e, uint64_t
}
void
tp_release_all_buttons(struct tp_dispatch *tp, uint64_t time)
tp_release_all_buttons(struct tp_dispatch *tp, usec_t time)
{
if (tp->buttons.state) {
tp->buttons.state = 0;
@ -1032,7 +1033,7 @@ tp_remove_buttons(struct tp_dispatch *tp)
}
static int
tp_post_physical_buttons(struct tp_dispatch *tp, uint64_t time)
tp_post_physical_buttons(struct tp_dispatch *tp, usec_t time)
{
uint32_t current, old, button;
@ -1180,7 +1181,7 @@ out:
static int
tp_notify_clickpadbutton(struct tp_dispatch *tp,
uint64_t time,
usec_t time,
evdev_usage_t button,
uint32_t is_topbutton,
enum libinput_button_state state)
@ -1227,7 +1228,7 @@ tp_notify_clickpadbutton(struct tp_dispatch *tp,
}
static int
tp_post_clickpadbutton_buttons(struct tp_dispatch *tp, uint64_t time)
tp_post_clickpadbutton_buttons(struct tp_dispatch *tp, usec_t time)
{
uint32_t current, old, is_top;
evdev_usage_t button;
@ -1332,7 +1333,7 @@ tp_post_clickpadbutton_buttons(struct tp_dispatch *tp, uint64_t time)
}
int
tp_post_button_events(struct tp_dispatch *tp, uint64_t time)
tp_post_button_events(struct tp_dispatch *tp, usec_t time)
{
if (tp->buttons.is_clickpad ||
tp->device->model_flags & EVDEV_MODEL_APPLE_TOUCHPAD_ONEBUTTON)

View file

@ -87,9 +87,9 @@ tp_touch_get_edge(const struct tp_dispatch *tp, const struct tp_touch *t)
}
static inline void
tp_edge_scroll_set_timer(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
tp_edge_scroll_set_timer(struct tp_dispatch *tp, struct tp_touch *t, usec_t time)
{
const int DEFAULT_SCROLL_LOCK_TIMEOUT = ms2us(300);
const usec_t DEFAULT_SCROLL_LOCK_TIMEOUT = usec_from_millis(300);
/* if we use software buttons, we disable timeout-based
* edge scrolling. A finger resting on the button areas is
* likely there to trigger a button event.
@ -97,14 +97,15 @@ tp_edge_scroll_set_timer(struct tp_dispatch *tp, struct tp_touch *t, uint64_t ti
if (tp->buttons.click_method == LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS)
return;
libinput_timer_set(&t->scroll.timer, time + DEFAULT_SCROLL_LOCK_TIMEOUT);
libinput_timer_set(&t->scroll.timer,
usec_add(time, DEFAULT_SCROLL_LOCK_TIMEOUT));
}
static void
tp_edge_scroll_set_state(struct tp_dispatch *tp,
struct tp_touch *t,
enum tp_edge_scroll_touch_state state,
uint64_t time)
usec_t time)
{
libinput_timer_cancel(&t->scroll.timer);
@ -131,7 +132,7 @@ static void
tp_edge_scroll_handle_none(struct tp_dispatch *tp,
struct tp_touch *t,
enum scroll_event event,
uint64_t time)
usec_t time)
{
switch (event) {
case SCROLL_EVENT_TOUCH:
@ -164,7 +165,7 @@ static void
tp_edge_scroll_handle_edge_new(struct tp_dispatch *tp,
struct tp_touch *t,
enum scroll_event event,
uint64_t time)
usec_t time)
{
switch (event) {
case SCROLL_EVENT_TOUCH:
@ -196,7 +197,7 @@ static void
tp_edge_scroll_handle_edge(struct tp_dispatch *tp,
struct tp_touch *t,
enum scroll_event event,
uint64_t time)
usec_t time)
{
switch (event) {
case SCROLL_EVENT_TOUCH:
@ -230,7 +231,7 @@ static void
tp_edge_scroll_handle_area(struct tp_dispatch *tp,
struct tp_touch *t,
enum scroll_event event,
uint64_t time)
usec_t time)
{
switch (event) {
case SCROLL_EVENT_TOUCH:
@ -252,7 +253,7 @@ static void
tp_edge_scroll_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum scroll_event event,
uint64_t time)
usec_t time)
{
enum tp_edge_scroll_touch_state current = t->scroll.edge_state;
@ -281,7 +282,7 @@ tp_edge_scroll_handle_event(struct tp_dispatch *tp,
}
static void
tp_edge_scroll_handle_timeout(uint64_t now, void *data)
tp_edge_scroll_handle_timeout(usec_t now, void *data)
{
struct tp_touch *t = data;
@ -349,7 +350,7 @@ tp_remove_edge_scroll(struct tp_dispatch *tp)
}
void
tp_edge_scroll_handle_state(struct tp_dispatch *tp, uint64_t time)
tp_edge_scroll_handle_state(struct tp_dispatch *tp, usec_t time)
{
struct tp_touch *t;
@ -393,7 +394,7 @@ tp_edge_scroll_handle_state(struct tp_dispatch *tp, uint64_t time)
}
int
tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time)
tp_edge_scroll_post_events(struct tp_dispatch *tp, usec_t time)
{
struct evdev_device *device = tp->device;
struct tp_touch *t;
@ -478,7 +479,7 @@ tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time)
}
void
tp_edge_scroll_stop_events(struct tp_dispatch *tp, uint64_t time)
tp_edge_scroll_stop_events(struct tp_dispatch *tp, usec_t time)
{
struct evdev_device *device = tp->device;
struct tp_touch *t;

File diff suppressed because it is too large Load diff

View file

@ -29,10 +29,10 @@
#include "evdev-mt-touchpad.h"
#define DEFAULT_TAP_TIMEOUT_PERIOD ms2us(180)
#define DEFAULT_DRAG_TIMEOUT_PERIOD_BASE ms2us(160)
#define DEFAULT_DRAG_TIMEOUT_PERIOD_PERFINGER ms2us(20)
#define DEFAULT_DRAGLOCK_TIMEOUT_PERIOD ms2us(300)
#define DEFAULT_TAP_TIMEOUT_PERIOD usec_from_millis(180)
#define DEFAULT_DRAG_TIMEOUT_PERIOD_BASE usec_from_millis(160)
#define DEFAULT_DRAG_TIMEOUT_PERIOD_PERFINGER usec_from_millis(20)
#define DEFAULT_DRAGLOCK_TIMEOUT_PERIOD usec_from_millis(300)
#define DEFAULT_TAP_MOVE_THRESHOLD 1.3 /* mm */
enum tap_event {
@ -120,7 +120,7 @@ log_tap_bug(struct tp_dispatch *tp, struct tp_touch *t, enum tap_event event)
static void
tp_tap_notify(struct tp_dispatch *tp,
uint64_t time,
usec_t time,
int nfingers,
enum libinput_button_state state)
{
@ -151,24 +151,25 @@ tp_tap_notify(struct tp_dispatch *tp,
}
static void
tp_tap_set_timer(struct tp_dispatch *tp, uint64_t time)
tp_tap_set_timer(struct tp_dispatch *tp, usec_t time)
{
libinput_timer_set(&tp->tap.timer, time + DEFAULT_TAP_TIMEOUT_PERIOD);
libinput_timer_set(&tp->tap.timer, usec_add(time, DEFAULT_TAP_TIMEOUT_PERIOD));
}
static void
tp_tap_set_drag_timer(struct tp_dispatch *tp, uint64_t time, int nfingers_tapped)
tp_tap_set_drag_timer(struct tp_dispatch *tp, usec_t time, int nfingers_tapped)
{
libinput_timer_set(
&tp->tap.timer,
time + DEFAULT_DRAG_TIMEOUT_PERIOD_BASE +
(nfingers_tapped * DEFAULT_DRAG_TIMEOUT_PERIOD_PERFINGER));
usec_t per_finger_timeout =
usec_mul(DEFAULT_DRAG_TIMEOUT_PERIOD_PERFINGER, nfingers_tapped);
usec_t timeout = usec_add(DEFAULT_DRAG_TIMEOUT_PERIOD_BASE, per_finger_timeout);
libinput_timer_set(&tp->tap.timer, usec_add(time, timeout));
}
static void
tp_tap_set_draglock_timer(struct tp_dispatch *tp, uint64_t time)
tp_tap_set_draglock_timer(struct tp_dispatch *tp, usec_t time)
{
libinput_timer_set(&tp->tap.timer, time + DEFAULT_DRAGLOCK_TIMEOUT_PERIOD);
libinput_timer_set(&tp->tap.timer,
usec_add(time, DEFAULT_DRAGLOCK_TIMEOUT_PERIOD));
}
static void
@ -177,6 +178,13 @@ tp_tap_clear_timer(struct tp_dispatch *tp)
libinput_timer_cancel(&tp->tap.timer);
}
static bool
tp_touch_near_any_edge(struct tp_dispatch *tp, struct tp_touch *t)
{
return (t->point.x < tp->tap.edges.left || t->point.x > tp->tap.edges.right ||
t->point.y < tp->tap.edges.top || t->point.y > tp->tap.edges.bottom);
}
static void
tp_tap_move_to_dead(struct tp_dispatch *tp, struct tp_touch *t)
{
@ -189,7 +197,7 @@ static void
tp_tap_idle_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time)
usec_t time)
{
switch (event) {
case TAP_EVENT_TOUCH:
@ -222,7 +230,7 @@ static void
tp_tap_touch_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time)
usec_t time)
{
switch (event) {
@ -276,7 +284,7 @@ static void
tp_tap_hold_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time)
usec_t time)
{
switch (event) {
@ -314,7 +322,7 @@ static void
tp_tap_tapped_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time,
usec_t time,
int nfingers_tapped)
{
switch (event) {
@ -363,7 +371,7 @@ static void
tp_tap_touch2_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time)
usec_t time)
{
switch (event) {
@ -401,7 +409,7 @@ static void
tp_tap_touch2_hold_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time)
usec_t time)
{
switch (event) {
@ -436,7 +444,7 @@ static void
tp_tap_touch2_release_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time)
usec_t time)
{
switch (event) {
@ -505,7 +513,7 @@ static void
tp_tap_touch3_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time)
usec_t time)
{
switch (event) {
@ -543,7 +551,7 @@ static void
tp_tap_touch3_hold_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time)
usec_t time)
{
switch (event) {
@ -576,7 +584,7 @@ static void
tp_tap_touch3_release_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time)
usec_t time)
{
switch (event) {
@ -644,7 +652,7 @@ static void
tp_tap_touch3_release2_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time)
usec_t time)
{
switch (event) {
@ -742,7 +750,7 @@ static void
tp_tap_dragging_or_doubletap_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time,
usec_t time,
int nfingers_tapped)
{
switch (event) {
@ -808,9 +816,10 @@ static void
tp_tap_dragging_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time,
usec_t time,
int nfingers_tapped)
{
bool at_edge = false;
switch (event) {
case TAP_EVENT_TOUCH: {
@ -824,7 +833,8 @@ tp_tap_dragging_handle_event(struct tp_dispatch *tp,
break;
}
case TAP_EVENT_RELEASE:
if (tp->tap.drag_lock != LIBINPUT_CONFIG_DRAG_LOCK_DISABLED) {
if (tp->tap.drag_lock != LIBINPUT_CONFIG_DRAG_LOCK_DISABLED ||
(at_edge = tp_touch_near_any_edge(tp, t))) {
enum tp_tap_state dest[3] = {
TAP_STATE_1FGTAP_DRAGGING_WAIT,
TAP_STATE_2FGTAP_DRAGGING_WAIT,
@ -832,7 +842,8 @@ tp_tap_dragging_handle_event(struct tp_dispatch *tp,
};
assert(nfingers_tapped >= 1 && nfingers_tapped <= 3);
tp->tap.state = dest[nfingers_tapped - 1];
if (tp->tap.drag_lock ==
if (at_edge ||
tp->tap.drag_lock ==
LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_TIMEOUT)
tp_tap_set_draglock_timer(tp, time);
} else {
@ -872,7 +883,7 @@ static void
tp_tap_dragging_wait_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time,
usec_t time,
int nfingers_tapped)
{
@ -919,7 +930,7 @@ static void
tp_tap_dragging_tap_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time,
usec_t time,
int nfingers_tapped)
{
@ -979,7 +990,7 @@ static void
tp_tap_dragging2_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time,
usec_t time,
int nfingers_tapped)
{
@ -1033,7 +1044,7 @@ static void
tp_tap_dead_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time)
usec_t time)
{
switch (event) {
@ -1060,7 +1071,7 @@ static void
tp_tap_handle_event(struct tp_dispatch *tp,
struct tp_touch *t,
enum tap_event event,
uint64_t time)
usec_t time)
{
enum tp_tap_state current;
@ -1206,7 +1217,7 @@ tp_tap_enabled(struct tp_dispatch *tp)
}
int
tp_tap_handle_state(struct tp_dispatch *tp, uint64_t time)
tp_tap_handle_state(struct tp_dispatch *tp, usec_t time)
{
struct tp_touch *t;
int filter_motion = 0;
@ -1341,7 +1352,7 @@ tp_tap_post_process_state(struct tp_dispatch *tp)
}
static void
tp_tap_handle_timeout(uint64_t time, void *data)
tp_tap_handle_timeout(usec_t time, void *data)
{
struct tp_dispatch *tp = data;
struct tp_touch *t;
@ -1357,10 +1368,7 @@ tp_tap_handle_timeout(uint64_t time, void *data)
}
static void
tp_tap_enabled_update(struct tp_dispatch *tp,
bool suspended,
bool enabled,
uint64_t time)
tp_tap_enabled_update(struct tp_dispatch *tp, bool suspended, bool enabled, usec_t time)
{
bool was_enabled = tp_tap_enabled(tp);
@ -1581,6 +1589,20 @@ tp_init_tap(struct tp_dispatch *tp)
tp->tap.drag_enabled = tp_drag_default(tp->device);
tp->tap.drag_lock = tp_drag_lock_default(tp->device);
struct evdev_device *device = tp->device;
const struct input_absinfo *absx = device->abs.absinfo_x;
const struct input_absinfo *absy = device->abs.absinfo_y;
assert(absx && absy);
struct phys_coords mm = { 5.0, 5.0 };
struct device_coords edge_margin = evdev_device_mm_to_units(device, &mm);
tp->tap.edges.left = edge_margin.x;
tp->tap.edges.right = (absx->maximum - edge_margin.x + absx->minimum);
tp->tap.edges.top = edge_margin.y;
tp->tap.edges.bottom = (absy->maximum - edge_margin.y + absy->minimum);
snprintf(timer_name,
sizeof(timer_name),
"%s tap",
@ -1599,7 +1621,7 @@ tp_remove_tap(struct tp_dispatch *tp)
}
void
tp_release_all_taps(struct tp_dispatch *tp, uint64_t now)
tp_release_all_taps(struct tp_dispatch *tp, usec_t now)
{
struct tp_touch *t;
int i;
@ -1626,13 +1648,13 @@ tp_release_all_taps(struct tp_dispatch *tp, uint64_t now)
}
void
tp_tap_suspend(struct tp_dispatch *tp, uint64_t time)
tp_tap_suspend(struct tp_dispatch *tp, usec_t time)
{
tp_tap_enabled_update(tp, true, tp->tap.enabled, time);
}
void
tp_tap_resume(struct tp_dispatch *tp, uint64_t time)
tp_tap_resume(struct tp_dispatch *tp, usec_t time)
{
tp_tap_enabled_update(tp, false, tp->tap.enabled, time);
}

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