Commit graph

5031 commits

Author SHA1 Message Date
Peter Hutterer
dc249b0ffe tools/debug-events: add ability to compress motion events
If --compress-motion-events is given (and stdout is a tty) reduce
the output printed to one line per repeated motion/axis/scroll sequence
(with a count). Example output:
 event6   POINTER_MOTION          108 +1.912s	 1.00/ -1.00 ( +1.00/ -1.00))
 event6   POINTER_BUTTON              +2.008s	BTN_LEFT (272) pressed, seat count: 1
 event6   POINTER_BUTTON              +2.074s	BTN_LEFT (272) released, seat count: 0
 event6   POINTER_MOTION           39 +5.249s	 0.00/  0.99 ( +0.00/ +1.00)
 event6   POINTER_BUTTON              +5.385s	BTN_LEFT (272) pressed, seat count: 1
 event6   POINTER_MOTION           66 +6.031s	-1.00/  0.00 ( -1.00/ +0.00)
 event6   POINTER_BUTTON              +6.401s	BTN_LEFT (272) released, seat count: 0

The event count (108, 39 and 66) is only printed for more than one event
in sequence so the output is otherwise identical (but 4 spaces wider
now)

If stdout is not a tty the event count is printed but no compression
happens since we rely on a ansi escape sequence for that. Could be fixed
by changing the current print statements to print a \n before the
current event instead of at the end of the current line.

This makes debugging events easier as button events and similar are no
longer obscured by pages of motion events in between.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1041>
2024-09-11 12:49:28 +10:00
Peter Hutterer
09fd1cdd98 tools/debug-events: ignore old-style pointer axis events completely
Since they're interleaved with the more modern finger/wheel/continuous
events they mess up our repeate count, preventing compression for those
events.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1041>
2024-09-09 15:41:45 +10:00
Peter Hutterer
41b3f5cc29 doc/api: fix wrong references to the tap drag config
It's _tap_get_drag_, not _tap_drag_get_ (and same for set/get_default)

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1039>
2024-09-06 04:23:19 +00:00
Peter Hutterer
f159abdc57 quirks: allow for parsing multiple products
This allows for a slight optimization of the quirks parser: where
multiple devices from the same vendor require the same quirk, allow
for multiple product matches in the form:

MatchProduct=0x0001;0x0002;

This is stored as a fixed-sized zero-terminated array - a product ID of
zero isn't something we need to worry about in real situations.

Closes #879

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1038>
2024-09-05 13:54:07 +00:00
Peter Hutterer
ea7ad8d25c util: add a strv_for_each helper function
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1038>
2024-09-05 13:54:07 +00:00
satrmb
910d59e836 touchpad: add sticky mode to drag-lock
Sticky mode removes the timeout from drag-lock, only a tap ends a drag.
Timeout mode remains available without changes.

Sticky mode is exposed as a new value for the existing drag-lock setting.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1037>
2024-09-05 00:47:47 +00:00
José Expósito
ee9043d6b4 CI: Run pre-commit hooks
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1036>
2024-09-03 09:51:41 +02:00
José Expósito
7d849623d5 Fix pre-commit errors
Some files had pre-commit style issues. Fix them.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1036>
2024-09-03 09:51:41 +02:00
Tim Hanson
60e569941c Update quirks for HP Dragonfly Chromebook
Closes: https://gitlab.freedesktop.org/libinput/libinput/-/issues/1034
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1033>
2024-08-31 12:18:12 +02:00
Peter Hutterer
86095429cd quirks: add quirk for Razer Blade 142024 Keyboard
Generated by tools/razer-quirks-lister.py

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1031>
2024-08-26 07:42:00 +00:00
Peter Hutterer
15697685c6 triage-policies: add an entry for pointing users to 60-evdev.hwdb
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1032>
2024-08-26 14:43:09 +10:00
Peter Hutterer
3402f38001 libinput 1.26.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2024-08-19 09:26:22 +10:00
Jason Gerecke
66106b9746 tablet: Remove unnecessary scale factor on REL_HWHEEL_HI_RES
The two high-res axes should already be scaled appropriately by the
kernel. This unnecessary scale factor causes 1 click of the dial to
produce an event delta of +-14400 rather than the expected +-120.

Fixes: beca998122 ("tablet: add API for relative dials")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1029>
2024-07-29 22:46:57 +00:00
Jami Kettunen
2135b4a6af quirks: add quirk for Minisforum V3 touchpad dwt
Disable while typing didn't work since the detachable (USB)
keyboard/touchpad case weren't being considered as one unit; mark the
keyboard as internal to correct this.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1028>
2024-07-20 20:43:43 +03:00
Peter Hutterer
6f19267c1e doc/user: fix a typo
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1027>
2024-07-19 10:07:49 +10:00
Jami Kettunen
c4f57bbc62 quirks: add quirk for the Minisforum V3 volume keys
They didn't work without the keyboard case also being attached to the
tablet PC.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1026>
2024-07-07 22:16:50 +03:00
Andre Kuehne
269875aa0e quirks: add quirk for the LG gram 14 2023 Touchpad
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1025>
2024-07-04 20:04:03 +02:00
José Expósito
c201be9b1b doc/user: document ModelTouchpadPhantomClicks quirk
Related https://gitlab.freedesktop.org/libinput/libinput/-/issues/1013

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1023>
2024-07-04 10:11:36 +00:00
Nicolas Fella
951ab12afe Fix typo in documentation comment
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1024>
2024-07-03 15:13:58 +02:00
Peter Hutterer
124431a5d3 libinput 1.26.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2024-06-27 12:48:55 +10:00
Peter Hutterer
6fee92c959 pad: switch the REL_WHEEL direction to match dials with scroll wheels
REL_WHEEL sends -1 for "down" and +1 for "up", so let's make sure we
keep that correct here too.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1021>
2024-06-21 10:02:07 +10:00
Peter Hutterer
436bb5cc56 test: fix the pad dial test, values need to be equal, not >=
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1021>
2024-06-21 10:00:42 +10:00
Peter Hutterer
989140489b gitlab-triage: add a needinfo reminder blurb
Goes together with the recently added
be78ce12a3 ("gitlab-triage: add bugbot hook for closing stale needinfo bugs")
so we can ping people before closing the bug.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1020>
2024-06-20 07:31:17 +00:00
Peter Hutterer
1b7992c31a tools: add support for setting the calibration matrix
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1018>
2024-06-20 09:32:19 +10:00
Peter Hutterer
978676be1e tablet: allow calibration if libwacom says our tablet is a display tablet
Not all display tablets have INPUT_PROP_DIRECT SET (looking at you,
Huion Kamvas 12) so our calibration went nowhere. Let libwacom override
whatever the kernel says.

This also makes testing without matching hardware a bit easier now since
we only need to override the libwacom file, not the whole device.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1019>
2024-06-19 12:37:44 +10:00
Peter Hutterer
41a4b128e9 tablet: rework a helper function to be more reusable
This allows us to look more things up from libwacom in one go.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1019>
2024-06-19 12:37:44 +10:00
Peter Hutterer
1f8b48dff5 quirks: add quirk for the RazerBlade142023 Keyboard
Generated by tools/razer-quirks-lister.py

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1017>
2024-06-18 08:14:32 +00:00
Peter Hutterer
99647b71d3 tools: add libinput analyze buttons for button state analysis
This tool helps with tracking button states and time deltas
between button events. Example output for a mouse with LMR buttons
recorded (the mouse also has BTN_SIDE and BTN_EXTRA):

  Timestamp   │  Delta   │ L │ R │ M │ S │ E
     0.596112 │      0ms │ ┬ │   │   │   │
     0.689096 │     92ms │ ┴ │   │   │   │
     1.129056 │    439ms │ ┬ │   │   │   │
     1.308178 │    179ms │ ┴ │   │   │   │
     1.469149 │      0ms │ ┬ │   │   │   │
     1.598096 │    128ms │ ┴ │   │   │   │
     1.862125 │    264ms │ ┬ │   │   │   │
     2.084234 │    222ms │ │ │ ┬ │   │   │
     2.415224 │    330ms │ │ │ ┴ │   │   │
     2.831227 │    416ms │ │ │ ┬ │   │   │
     3.215067 │    383ms │ ┴ │ │ │   │   │
     3.525230 │    310ms │ ┬ │ │ │   │   │
     3.629006 │    103ms │ ┴ │ │ │   │   │
     3.813078 │    184ms │ ┬ │ │ │   │   │
     3.909170 │     96ms │ ┴ │ │ │   │   │
     4.093180 │    184ms │ ┬ │ │ │   │   │
     4.317036 │    223ms │ ┴ │ │ │   │   │
     4.507175 │    190ms │ ┬ │ │ │   │   │
     4.587105 │     79ms │ │ │ ┴ │   │   │
     4.779211 │    192ms │ ┴ │   │   │   │
     5.075239 │    296ms │   │   │ ┬ │   │
     5.259097 │    183ms │   │   │ ┴ │   │
     5.379082 │    119ms │   │   │ ┬ │   │
     5.483044 │    103ms │   │   │ ┴ │   │

The default behavior is to highlight time deltas below 25ms
in red. 25ms is our higher debounce timeout.

Note that the delta time is the one between button events, ignoring any
e.g. motion events in between.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1010>
2024-06-18 07:43:02 +00:00
Peter Hutterer
8326f71df5 touchpad: special-case shift as modifier for dwt
We ignore modifiers for disable-while-typing because we don't want to
disable the touchpad for things like shift-click or ctrl-click.

We also do remember the modifier state so that we don't disable the
touchpad for once-offs like ctrl+s.

Shift is however a special case - shift + something else is means the
user is typing and we should disable the touchpad for that.

Closes #1005

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1015>
2024-06-17 08:31:25 +00:00
Peter Hutterer
82322a4c57 doc/user: document the device quirk MatchFoo statements
Closes #1001

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1016>
2024-06-17 07:58:43 +00:00
Peter Hutterer
be78ce12a3 gitlab-triage: add bugbot hook for closing stale needinfo bugs
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1014>
2024-06-17 14:29:24 +10:00
Peter Hutterer
4333845e4c tools/debug-gui: draw the evdev x/y axis with the right color
We were drawing an arc but apparently in white which made it a tad hard
to see on a white background. Draw this with the same color as the
touchpoints so we can debug single-touch and tablet devices too.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1011>
2024-06-13 05:45:19 +00:00
Peter Hutterer
78cb25c2f7 Whitespace fix
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1012>
2024-06-13 04:21:26 +00:00
Peter Hutterer
97284211d4 doc/api: link to a few tablet configuration settings
We have a rough grouping of config options per device type, let's add
the tablet ones there too.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1012>
2024-06-13 04:21:26 +00:00
Peter Hutterer
4548a37511 tools: actually parse options in libinput-debug-tablets
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1009>
2024-06-10 15:09:19 +00:00
Peter Hutterer
1725b7d606 Add support for --set-pressure-range to the debugging tools
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1009>
2024-06-10 15:09:19 +00:00
Peter Hutterer
9267147ebd Fix @since tags for the pressure range configuration
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1008>
2024-06-07 10:49:13 +10:00
Peter Hutterer
98ba56fb31 libinput 1.26.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2024-06-06 14:09:40 +10:00
Peter Hutterer
a2f0cc35c5 quirks: add support for Uniq matching
Same as MatchName but matches on the UNIQ udev property instead. This
is needed for some Huion, Gaomon and other tablet devices that only
differentiate each other through the Uniq string which contains the
firmware version.

Closes #997

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1006>
2024-06-05 11:35:59 +00:00
Peter Hutterer
e72ee0b1c8 pre-commit: ignore subprojects for ruff and black
We don't have any subprojects yet but let's not fail badly for something
that's not our fault.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1005>
2024-06-05 10:38:08 +00:00
Peter Hutterer
fdb693a6ee tools/record: record the DRIVER property in the recording
So we know which kernel driver is handling the device. Quite useful,
sometimes, without having to ask for extra logs.

This of course requires that we ignore said property in libinput replay
since no uinput device will have that driver property set.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1007>
2024-06-04 16:54:28 +10:00
Peter Hutterer
f1792dec46 quirks: add a default resolution for Huion devices
The Inspiroy 2S H641P in default mode (without hid-uclogic support) says
the pen interface has a Logical Maximum of 32767. Over the 160x100mm
active surface this is ca 205x328 units/mm. This isn't correct across all
devices but let's use it as fallback value so the tablets work out of
the box.
It's hard to set these tablets via 60-evdev.hwdb otherwise because most
Huion tablets share a few PIDs only.

Note: this doesn't overwrite the kernel resolution it merely provides a
fallback where no kernel resolution is set.

The firmware report descriptor does set a physical range (2048) but it
sets it in cubic inch which is ignored by the kernel:

  # 0x65, 0x33,      //     Unit (EnglishLinear: in³)             48

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1004>
2024-05-27 14:51:25 +10:00
Peter Hutterer
fe3175748a evdev: don't return a size for 0-1 axes
Tablet pads historically need to have ABS_X/Y to be detected as tablets
but their min/max values are 0 and 1. Let's not return a size for those.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1004>
2024-05-27 14:51:23 +10:00
Yaraslau Furman
e802715785 quirks: lenovo: mark Lenovo 16ARX8 keyboard as internal
Fixes "Disable touchpad while typing" setting not working.
This quirk should work for all other keyboards with the same issue
listed above, as well as those that might come up in the future.

Signed-off-by: Yaraslau Furman <yaro330@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1001>
2024-05-22 12:00:31 +03:00
Putu Wiramaswara Widya
e7499aeb49 added quirks for Thinkpad X390 Yoga's trackpoint
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1003>
2024-05-21 09:17:00 +08:00
José Expósito
a2515fc3f6 evdev: log the right mouse wheel angle
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1002>
2024-05-18 18:55:29 +02:00
José Expósito
5f1b46370b quirks: fix end-of-file in 50-system-huawei.quirks
Picked up by the pre-commit hook.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1002>
2024-05-18 18:55:29 +02:00
Peter Hutterer
430c1b89c6 CI: bump to Fedora 40
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1000>
2024-05-13 11:19:21 +10:00
PLTorrent
7c87d3e671 Add support for Matebook X Pro 2024 Touchpad
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/998>
2024-05-05 21:23:45 +00:00
Marge Yang
0c347a9728 quirks: add quirk for HP Haptics Touchpad.
This Touchpad is a pressure pad and needs the pressure
handling disable.

Signed-off-by: Marge Yang <marge.yang@synaptics.corp-partner.google.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/995>
2024-04-30 06:59:42 +00:00