summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2025-08-12replay: use the runtime quirks for our replay quirksPeter Hutterer1-22/+18
Closes #1166 Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1297>
2025-08-06tools: move a clang-tidy silence back to where it needs to bePeter Hutterer1-2/+2
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1292>
2025-08-01Add a public plugin system to libinputPeter Hutterer7-13/+123
This patch adds a new API for enabling public "plugins" in libinput, in addition to the exisitng internal ones. The API is currently limited to specifying which paths should be loaded and whether to load them. Public plugins are static, they are loaded before the context is initialized and do not update after that. If plugins are to be loaded, libinput will then run through those paths, look up files and pass them to (future) plugins to load the actual files. Our debugging tools have an --enable-plugins and --disable-plugins option that load from the default data paths (/etc/libinput/plugins and /usr/lib{64}/libinput/plugins) and from the $builddir/plugins directory. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1192>
2025-08-01tools/replay: improve the verbose output a bitPeter Hutterer1-11/+14
Make sure our SYN_REPORT line is indented correctly for multi-device replay and match the output a bit closer to the one from libinput record. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1286>
2025-07-30tools: add missing AttrIsVirtual handling for listing quirksPeter Hutterer1-0/+1
If a device has AttrIsVirtual set in the quirks we'd abort() when trying to list those quirks. Fixes: efb4b6a3be0a ("evdev: detect virtual devices") Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1281>
2025-07-28tools: add a debug-tablet-pad toolPeter Hutterer2-0/+578
A simple tool to check the evdev and libinput events from a tablet pad. This is near-identical to the existing debug-tablet tool but adjusted for tablet pad events. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1280>
2025-07-28util: add two macros for clearing a linePeter Hutterer1-9/+5
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1280>
2025-07-28meson.build: change from config.set10() and #if to config.set() and #ifdefPeter Hutterer3-23/+23
config.set10 is much more convenient and nicer to read but can provide false positive if the value is 0 and #ifdef is used instead of #if. So let's switch everything to use #ifdef instead, that way we cannot get false positives if the value is unset. Closes #1162 Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1277>
2025-07-15tools: fix ruff format for libinput-replayPeter Hutterer1-1/+3
Fixes: 89c2f29d2c76 ("tools/libinput-replay: Warn if writing to local-overrides fails") Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1272>
2025-07-09tools/libinput-replay: Warn if writing to local-overrides failsJosé Expósito1-4/+8
Closes: https://gitlab.freedesktop.org/libinput/libinput/-/issues/1153 Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1264>
2025-07-09pre-commit: bump to latest ruff-formatPeter Hutterer2-3/+2
And update our python files according to latest ruff format output. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1259>
2025-07-01Run clang-format over the codePeter Hutterer13-743/+808
This uses the .clang-format file in the follow-up commit, but committed prior to that to ease review of said file and various integrations. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
2025-07-01Add trailing commas to prevent clang-format odditiesPeter Hutterer1-1/+1
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
2025-07-01test: add clang-format directives to prevent formattingPeter Hutterer3-3/+7
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
2025-06-24tools: handle an empty quirks list in the libinput recordingPeter Hutterer1-1/+1
Fixes: 548279abeef5 ("tools: store virtual property in recordings") Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1243>
2025-06-24tools: per-slot-delta initialize the pressure thresholds to zeroPeter Hutterer1-2/+2
Python is unhappy about comparing None to > 0 Fixes: 9c042e962010 ("tools: add pressure threshold support to analyze per-slot-delta") Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1243>
2025-06-23util: fix the ANSI escape codes for bright colors, add some morePeter Hutterer1-1/+1
The previous incarnations of BRIGHT_FOO were actually bold foo. Change the colors over to use the actual bright colors and make bold a separate set of defines. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1240>
2025-06-20zsh: add shell completion for the eraser buttonPeter Hutterer1-0/+2
Plus a note in tools/shared.h so we don't keep forgetting about this. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1234>
2025-06-19tools: disable GTK's deprecated warningsPeter Hutterer1-0/+13
I'd be surprised if those get removed before the whole X11 support is removed - and in that case we can remove the x11 support as well. So let's disable the warnings and deal with it when it truly breaks - there are no replacements for what we want to do here after all. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1233>
2025-06-19tools: add pressure threshold support to analyze per-slot-deltaPeter Hutterer1-2/+41
Color touches above the minimum threshold and above the down threshold so it's easier to analyze a recording. Sometimes touches move unexpectedly but if it's low-enough pressure this may not affect libinput. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1225>
2025-06-18tablet: implement eraser button disablingPeter Hutterer1-0/+6
This adds a new (internal) plugin that is responsible for eraser button disabling. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1218>
2025-06-18Add an API for configurable eraser button behaviorPeter Hutterer3-1/+42
This adds the public API to configure an eraser button on a tablet tool to emulate a normal button. In DEFAULT mode the eraser button will simply do whatever it does by default (i.e. toggle to eraser). In BUTTON mode the eraser button will be converted to a regular tool button event, with libinput handling the underlying proximity event madness. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1218>
2025-06-08tools: store virtual property in recordingsRyan Hendrickson2-11/+13
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1213>
2025-05-16Fix links to point to the current doc pagesPeter Hutterer1-2/+2
The underscored page names date back to doxygen and have been obsolete for many years now. Closes #1123 Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1202>
2025-04-16tools: use __attribute__(cleanup)Peter Hutterer5-250/+140
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1184>
2025-04-16Remove empty lines between closing bracesPeter Hutterer4-8/+0
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1190>
2025-04-04Add a few missing includes for config.hPeter Hutterer1-0/+2
This caused the headers to not haved _GNU_SOURCE set which in turn caused clang-tidy to complain because util-strings.h didn't have strtod_l. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1175>
2025-04-04tools: disable clang-tidy warning about using floats for loop countersPeter Hutterer1-2/+2
Really doesn't matter here. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1175>
2025-04-04util: change the builddir_lookup() to return a booleanPeter Hutterer3-11/+5
All but one callers of this function only care about yes/no, so let's change it to only return the build dir in the one case it's needed. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1175>
2025-04-04tools: add missing includePeter Hutterer1-0/+1
struct option is used in one of the static inlines here, so let's include getopt. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1175>
2025-04-04tools/record: correct the --help output for autorestartPeter Hutterer1-2/+2
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1173>
2025-03-26tools/debug-events: print all available optionsPeter Hutterer3-11/+37
They're still without explanation but better than just printing "[options]" without even pointing to the man page. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1162>
2025-03-13Move the event printing out into a utilityPeter Hutterer1-975/+13
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1156>
2025-03-13tools/debug-events: separate event handling from event printingPeter Hutterer1-110/+128
Move the big switch statement into a helper function and reduce it to a statement that only does that bits that weren't related to printing. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1156>
2025-03-13tools/debug-events: make the print_ functions return the printed stringPeter Hutterer1-301/+345
Two advantages here: fewer actual printf() calls making the output slightly more coherent if there are other things writing to stdout but also better re-usability since we can now move the print functions to shared code. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1156>
2025-03-13tools/list-devices: print vid/pid as wellPeter Hutterer1-0/+15
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1153>
2025-03-13tools: support sendevents mode in debug-eventsPeter Hutterer3-0/+23
Disabling sendevents was already supported via an fnmatch() and --disable-sendevents but to test things like disabling on an external mouse, let's expose this option too. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1152>
2025-02-18touchpad: implement support for three-finger dragPeter Hutterer2-0/+21
Exposed via new configuration option this enables 3 and 4 finger dragging on touchpads. When enabled a 3/4 finger swipe gesture is actually a button down + motion + button up sequence. If tapping is disabled the drag starts immediately, if tapping is enabled the drag starts after the tap timeout/motion so we can distinguish between a tap and a drag. When fingers are released: - if two fingers remain -> keep dragging - if one finger remains -> release drag, switch to pointer motion When 3/4 fingers are set down immediately after releasing all fingers the drag continues, similar to the tap drag lock feature. This drag lock is not currently configurable. This matches the macos behavior for the same feature. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1042>
2025-02-17tools/list-devices: add missing config options to the outputPeter Hutterer1-0/+84
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1140>
2025-02-17tools/list-devices: add helper to print aligned valuesPeter Hutterer1-47/+35
This makes it easier to re-align all columns. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1140>
2025-02-17tools/list-devices: reword the man page a bitPeter Hutterer1-2/+5
Hopefully a slightly better explanation that what we had before. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1140>
2025-02-17tools/list-devices: allow listing some devices onlyPeter Hutterer2-16/+50
$ libinput list-devices /dev/input/envent0 Now does what one would expect. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1140>
2025-01-20tools/record: record HID_BPF properties tooPeter Hutterer1-0/+1
If this property is set we likely have a udev-hid-bpf property loaded into the device. Knowing this is going to be important for debugging why a device may or may not work so let's record this. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1121>
2025-01-20Replace strneq() with hardcoded lengths with strstartswith()Peter Hutterer3-11/+11
Slightly less efficient but easier to read and it's not possible to accidentally provide the wrong length. Plus it handles null pointers correctly so get to skip the checks (which weren't needed for strneq() either, but still). Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1121>
2025-01-20util: add truefalse and yesno macros for easy string conversionPeter Hutterer1-1/+2
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1118>
2025-01-09tools/per-slot-delta: optionally show the distance to the original pointPeter Hutterer2-5/+45
This makes it easier to quickly gather how far a touch has moved since it started, compared to the initial starting position. This again makes it easier to determine if a threshold required for e.g. scrolling has been met. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1101>
2025-01-09tools/per-slot-delta: refactor the printing of a slotPeter Hutterer1-6/+11
This makes it easier to optionally print extra components of that slot. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1101>
2025-01-09tools/per-slot-delta: use a Point class for slot position/deltaPeter Hutterer1-27/+32
Better abstraction, especially when we introduce more than just those two. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1101>
2025-01-09tools/per-slot-delta: remove some duplication for axis handlingPeter Hutterer1-32/+29
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1101>
2025-01-09tools/per-slot-delta: use dataclasses and enumsPeter Hutterer1-11/+13
Slight modernization of the code Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1101>