path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2018-06-18quirks: explicitly cast the log priorityPeter Hutterer1-1/+1
The values are the same and this is ABI so they will never change. Make the cast explicit for coverity's benefit. Signed-off-by: Peter Hutterer <>
2018-06-18tools: measure touchpad-pressure: prevent division by zeroPeter Hutterer2-1/+4
And make sure the equivalent entry in the measure touch-size is long enough to overwrite the current status line Signed-off-by: Peter Hutterer <>
2018-06-14tools: fix grab argument passing for libinput debug-eventsPeter Hutterer4-8/+8
The &grab pointer we used to pass as userdata was the address of the function argument which goes out of scope at the end of the function. This works fine for devices immediately opened but when a device connects later, the address may have been re-used since and it's content is undefined. If not NULL, we end up grabbing the device. Instead pass the grab option in which is guaranteed to live until the end of main. Signed-off-by: Peter Hutterer <>
2018-06-11Merge branch 'wip/config-files'Peter Hutterer2-0/+297
2018-06-11tools: libinput-record: put extra guard in to protect from OOB accessPeter Hutterer1-1/+4
Signed-off-by: Peter Hutterer <>
2018-06-08Hook up list-quirks --validate for the test suitePeter Hutterer2-5/+29
All the tests fill fail anyway if the validation fails but this is a quick way to fail everything early. Signed-off-by: Peter Hutterer <>
2018-06-08Implement a quirks system to replace the udev property parsingPeter Hutterer2-0/+273
Previously, we had all extra device information ("This is an Apple Touchpad", "This touchpad causes pointer jumps", etc.) in the udev hwdb. The problem with the hwdb is that updating it is nontrivial for the average user and debugging when things go wrong is even harder. Plus, the hwdb has a matching scheme that is unpredictable unless one is familiar with the implementation. This patch set moves the hwdb entries into .ini style text files, with a simple line-based parser. A new libinput list-quirks tool can list the quirks applied to any given device, in --verbose mode it prints all matches as they apply or not apply. The data files are currently unused by libinput, that comes in a later patch. They're installed though, the defaults point to the /usr/share/libinput directory and for *temporary* local overrides the single file /etc/libinput/local-overrides.quirks. Failure to parse any file is a hard failure for the quirks system, but if the local override file doesn't exist that's fine. THIS IS NOT A CONFIGURATION INTERFACE! None of these settings are exposed via the libinput_device_config_* calls. There is no API guarantee for these files, think of them as source code. Signed-off-by: Peter Hutterer <>
2018-06-06tools: drop the publish-doc toolPeter Hutterer1-22/+0
libinput docs must be pushed to wayland's web git repository now Signed-off-by: Peter Hutterer <>
2018-05-25libinput-measure-trackpoint-range: minimum delta measurementMartin Wilck1-17/+49
libinput-measure-trackpoint-range doesn't work well for ALPS touchsticks that have minimum delta amplitude of ~8. Fix that by analyzing min and max amplitude (radius) of the measured deltas, and suggesting a high trackpoint range value if ALPS-typical behavior is encountered. Also, suggest a different calibration procedure to the user; rather then just calibrating quick movements, slow, gentle movements should also be covered. Signed-off-by: Martin Wilck <> Signed-off-by: Peter Hutterer <>
2018-05-25libinput-measure-trackpoint-range: fix typoMartin Wilck1-1/+1
Signed-off-by: Martin Wilck <> Signed-off-by: Peter Hutterer <>
2018-05-21Merge branch 'wip/custom-pointer-accel-revert'Peter Hutterer5-66/+7
2018-05-21Merge branch 'wip/touchpad-pointer-accel-v7'Peter Hutterer1-0/+15
2018-05-21tools: debug-gui: add some extra targets for pointer acceleration testingPeter Hutterer1-0/+15
Signed-off-by: Peter Hutterer <>
2018-05-21Revert "Expose a custom acceleration profile"Peter Hutterer5-66/+7
This looked good on paper but clearly no-one (including myself) ever tested this in a real-life situation or they would've noticed that the constant factor is missing, causing a segfault on the first two-finger scroll event, touchpad gesture or button scrolling. Adding the constant factor makes the API much worse and the benefit is unclear, so out of the window it goes. We can revisit this for libinput 1.12 but this isn't going to make the next release. This reverts commit d8bd650540e68e8b648e76180c5eee0f19a3b893. Signed-off-by: Peter Hutterer <>
2018-05-16tools: ptraccel-debug: fail for a sequence without eventsPeter Hutterer1-0/+3
Found by scan-build, running ptraccel-debug --mode=sequence --nevents=5 would use garbage custom_deltas. Signed-off-by: Peter Hutterer <>
2018-05-16tools: libinput-record: fix leaking memory in the error casesPeter Hutterer1-3/+7
Signed-off-by: Peter Hutterer <>
2018-05-16tools: ptraccel-debug: switch to a mode enumPeter Hutterer1-16/+24
Fixes the dead code issue introduced in 822c97a1c209b92fd6c7fbe6cfa02896941a5143, print_accel was always true so the rest of the code never got triggered. Signed-off-by: Peter Hutterer <>
2018-05-15tools: ptraccel-debug: match the help with the actual trackpoint range valuePeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <>
2018-05-15touchpad: add a tool to measure the touchpad fuzzPeter Hutterer3-0/+497
Well, I say "measure" but really at this point it just reads the properties/axes and then does it's best to auto-generate a hwdb entry that matches the user's hardware and sets a fuzz value on the device. Ideally this reduces the number of hand-holding required in bugzillas. There are plenty of things that can go wrong, so our fallback is still to throw up our hands and point to the documentation. Signed-off-by: Peter Hutterer <>
2018-05-11tools: fix an argument name for ptraccel-debugPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <>
2018-05-11tools: fix pointer acceleration graphs generation scriptPeter Hutterer1-33/+35
We're printing most of those those as mm/s now, improve to use gnuplot for loops, and a few other fixes. The low-dpi graph is still out of whack (or the implementation is?), need to fix that separately. Signed-off-by: Peter Hutterer <>
2018-05-10tools: switch the ptraccel-debug tool to report profile curves by defaultPeter Hutterer1-5/+5
This is virtually the only one that matters at this point, the others may help but they're usually more confusing than helpful. Signed-off-by: Peter Hutterer <>
2018-05-03tools: libinput-record: print switch events in --with-libinputPeter Hutterer2-1/+54
Signed-off-by: Peter Hutterer <>
2018-05-03tools: libinput-record: print tablet events in --with-libinputPeter Hutterer2-1/+582
Signed-off-by: Peter Hutterer <>
2018-05-03tools: libinput-record: move the event time offset to the first place we get itPeter Hutterer1-2/+3
Leftover from a previous version where printing and handling an event was identical. Now we may handle events but not actually print them until a bit later, so other events may have a (wrong) zero timestamp. Signed-off-by: Peter Hutterer <>
2018-05-02tools: print the number of touches for touch devicesPeter Hutterer1-0/+4
Signed-off-by: Peter Hutterer <>
2018-04-26Expose a custom acceleration profilePeter Hutterer5-7/+66
This adds a third profile to the available profiles to map device-specific speed to an acceleration factor, fully defined by the caller. There has been a consistent call for different acceleration profiles in libinput, but very little specifics in what actually needs to be changed. "faster horses" and whatnot (some notable exceptions in e.g. bug 101139). Attempts to change the actual acceleration function will likely break things for others. This approach opens up the profile itself to a user-specific acceleration curve. A caller can set an acceleration curve by defining a number of points on that curve to map input speed to an output factor. That factor is applied to the input delta. libinput does relatively little besides mapping the deltas to the device-specific speed, querying the curve for that speed and applying that factor. The curve is device-specific, the input speed is in device units/ms. Signed-off-by: Peter Hutterer <>
2018-04-26tools: fix the script to make ptraccel graphs for meson's builddirPeter Hutterer1-1/+6
Partial fix only because we can't guess the build dir, but at least it doesn't complain about the missing script now. And no-one really needs to run this anyway. Signed-off-by: Peter Hutterer <>
2018-04-19tools: yaml verifier: fix some flake8 warningsPeter Hutterer1-3/+4
Signed-off-by: Peter Hutterer <>
2018-04-19tools: libinput-replay: handle a nonzero offset for the first eventPeter Hutterer1-0/+7
Signed-off-by: Peter Hutterer <>
2018-04-19tools: libinput-record: add gesture supportPeter Hutterer2-2/+143
Signed-off-by: Peter Hutterer <>
2018-04-19tools: yaml verifier: allow for SYN_REPORT value 1Peter Hutterer1-1/+2
This is generated by the kernel's autorepeat code, see input_repeat_key() in drivers/input/input.c Signed-off-by: Peter Hutterer <>
2018-04-19tools: yaml verifier: add POINTER_AXIS to allowed events typesPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <>
2018-04-16Remove some duplicate empty linesPeter Hutterer1-4/+0
Signed-off-by: Peter Hutterer <>
2018-04-13Drop the libinput-list-devices and libinput-debug-events compat scriptsPeter Hutterer3-15/+0
Added in 1.8, let's drop them for 1.11 Signed-off-by: Peter Hutterer <>
2018-04-12tools: fix switch case-statement indentationPeter Hutterer1-130/+130
We don't indent the 'case FOO:' lines in libinput Signed-off-by: Peter Hutterer <>
2018-04-06tools: fix man page for debug-eventsPeter Hutterer1-1/+1
click method is 'buttonareas', not just 'buttons' Signed-off-by: Peter Hutterer <>
2018-03-20tools: touchpad-pressure: init the lo/hi values correctlyPeter Hutterer1-3/+3
From Signed-off-by: Peter Hutterer <>
2018-03-20tools: libinput-record: print the mouse and pointingstick udev propertiesPeter Hutterer1-1/+3
Signed-off-by: Peter Hutterer <>
2018-03-19tools: libinput-record: print a progress bar when recording to a filePeter Hutterer1-1/+17
To let users know something is happening. Signed-off-by: Peter Hutterer <>
2018-03-19tools: libinput-record: print a comment when the device is in a neutral statePeter Hutterer1-1/+48
Common problem: some touch sequence does something to confuse libinput but it cannot easily be captureed. The result is a long sequence of touche that need to be picked apart and isolated. Print an easy-to-search for message in the evdev output that signals that the device touch state is now neutral (i.e. no finger down). Same can be achieved by searching for BTN_TOOL_FINGER but that provides false positives for switching between one and two fingers. Signed-off-by: Peter Hutterer <>
2018-03-19tools: libinput-record: add support for printing libinput eventsPeter Hutterer4-56/+912
Collect libinput events together with the evdev events and print them to the log. This makes it possible to debug the full behavior of a user's machine rather than having to replay it with potential different race conditions/side effects. Example event output: - evdev: - [ 2, 314443, 4, 4, 57] # EV_MSC / MSC_SCAN 57 - [ 2, 314443, 1, 57, 1] # EV_KEY / KEY_SPACE 1 - [ 2, 314443, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +87ms libinput: - {time: 2.314443, type: KEYBOARD_KEY, key: 57, state: pressed} - evdev: - [ 2, 377203, 4, 4, 57] # EV_MSC / MSC_SCAN 57 - [ 2, 377203, 1, 57, 0] # EV_KEY / KEY_SPACE 0 - [ 2, 377203, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +63ms libinput: - {time: 2.377203, type: KEYBOARD_KEY, key: 57, state: released} Note that the only way to know that events are within the same frame is to check the timestamp. libinput keeps those intact which means we can tell that if we just had an evdev frame with timestamp T and get a pointer motion with timestamp T, that frame caused the motion event. So far, only key, pointer and touch events are printed. We also hardcode-enable tapping where available until we have options to enable this on the commandline just because that's useful to have. Signed-off-by: Peter Hutterer <>
2018-03-15tools: libinput-debug-events stop variable needs volatilePeter Seiderer1-1/+1
The stop variable set in the signal handler needs volatile (and use the defined sig_atomic_t instead of unsigned int). Signed-off-by: Peter Seiderer <> Signed-off-by: Peter Hutterer <>
2018-03-13tools: libinput-replay: only print the events in verbose modePeter Hutterer1-1/+2
Signed-off-by: Peter Hutterer <>
2018-03-09tools: libinput-record: add separate variable for the first devicePeter Hutterer1-2/+5
Signed-off-by: Peter Hutterer <>
2018-03-09tools: libinput-record: drop unused 'print' argumentPeter Hutterer1-2/+2
And rename the function for more clarity Signed-off-by: Peter Hutterer <>
2018-03-09tools: libinput-record: fix frame printing for multiple devicesPeter Hutterer1-4/+14
The evdev events were just dumped into one big list instead of being split up by frame. Signed-off-by: Peter Hutterer <>
2018-03-09tools: add a tool to verify the yaml output from libinput-recordPeter Hutterer1-0/+194
Signed-off-by: Peter Hutterer <>
2018-03-08tools: record udev properties in libinput-recordPeter Hutterer2-0/+66
Only the ones we care about in libinput but for those it's handy to know which ones are set (especially the LIBINPUT_MODEL ones). Signed-off-by: Peter Hutterer <>
2018-03-06tools: add the git version in the libinput-record outputPeter Hutterer1-0/+2
Signed-off-by: Peter Hutterer <>