Commit graph

321 commits

Author SHA1 Message Date
Peter Hutterer
fca003d305 tools: replace the tap time measuring tool with a python one
A lot easier to process data in python than in C.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-By: Dima Ryazanov <dima@gmail.com>
Tested-By: Dima Ryazanov <dima@gmail.com>
2017-11-17 09:22:37 +10:00
Peter Hutterer
b170993b74 tools: fix typo in man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-16 13:13:28 +10:00
Peter Hutterer
13c9ef07a2 man: add --enable-middlebutton to debug-events man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-15 13:33:11 +10:00
Peter Hutterer
5561108ac4 tools: fix two flake8-3 warnings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-14 12:04:27 +10:00
Peter Hutterer
67bfb5cf2e tools: handle missing evdev/pyudev modules with a better error message
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-14 12:04:27 +10:00
Peter Hutterer
92aa1d1418 tools: when the command isn't installed, print that
Makes it more user-friendly to be able to split the tools into multiple
packages

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-09 15:17:37 +10:00
Peter Hutterer
be344a3afb tools: fix missing words in man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-09 13:51:35 +10:00
Peter Hutterer
5acd5147a1 tools: add an extra linebreak before closing
Just puts the ^C from the Ctrl+C on a separate line to make it easier to spot

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-09 10:36:03 +10:00
Stefan Brüns
48fd22def7 tools: Handle LIBINPUT_SWITCH_TABLET_MODE
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-06 08:45:18 +10:00
Stefan Brüns
5ea84fa7da tools: Show gesture/switch capabilities in list-devices output
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-06 08:44:52 +10:00
Peter Hutterer
b9914ec279 tools: restore default permissions for a source file
This was accidentally made 755 as part of e9fc59efc8

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-10 08:05:40 +10:00
Peter Hutterer
5252fa5d88 tools: add --disable-sendevents option to the debug-events/debug-gui tools
Makes it possible to debug issues with sendevents.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-18 17:00:57 +10:00
Peter Hutterer
e242ad219a tools: remove a leftover debug printf statement
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-06 09:24:29 +10:00
Peter Hutterer
f7cfc2bbbb tools: restore option handling for the debug gui
window_init zeroes out the struct and loses any option parsing done before.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-05 10:41:27 +10:00
Hans de Goede
c4857f01d8 touchpad: Enable timestamp smoothing support for bluetooth touchpads
Bluetooth wreaks havoc with the timestamp of the input events coming
from the touchpad, enable timestamp smoothing support to counter this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-01 16:42:19 +01:00
Peter Hutterer
87b5682824 filter: add a custom trackpoint accelerator
Switch to a pure factor with a max scaled after a function. The offset is just
0 now (will be removed eventually). Both are determined with a function based
on a linear/exponential regression of a sample set of data pairs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-20 11:53:01 +10:00
Peter Hutterer
71dd7b51ae tools: add a command to analyze trackpoints
Trackpoints can send very different ranges between the various pressures.
Collect the data and print it out to get an idea of what ranges are realistic.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-20 11:53:01 +10:00
Peter Hutterer
688142c8a2 Merge branch 'wip/touchpad-apple-touch-major-v2' 2017-07-14 13:47:29 +10:00
Peter Hutterer
36739e8b6a tools: add an extra linebreak in the tap measuring tool
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-12 15:39:31 +10:00
Peter Hutterer
2e4895b888 Add safe_strdup()
Return value is either NULL or a strdup'd string, depending on the input
value.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-12 15:39:31 +10:00
Peter Hutterer
d5d6d4cd53 Abort if zalloc ever fails
There's no guarantee that libinput does the right thing if memory allocation
fails and it's such a niche case on the systems we're targeting that it just
doesn't matter. Simply abort if zalloc ever fails.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-12 10:18:07 +10:00
Peter Hutterer
e3eda9db6a tools: add a tool to measure touch size and orientation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-11 13:59:30 +10:00
Peter Hutterer
7b5ca6204b Fix a few things scan-build complains about
Uninitialized variables, potential NULL dereferences, dead assignments and an
unused return value.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-10 10:37:58 +10:00
Peter Hutterer
c196a160c9 tools: fix flake8 Python style warnings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-10 10:27:19 +10:00
Peter Hutterer
6b42fdd3c5 tools: change python sources to use space indentation
Let's switch to PEP8-compatible format to have a consistent style that matches
other python sources. This will be checked by flake8 which shows a few other
warnings, this patch only changes tabs to 4 spaces.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-10 10:26:25 +10:00
Peter Hutterer
57a384dfcf tools: remove unnecessary full stop in man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-10 09:34:31 +10:00
Peter Hutterer
ca9d6a88d7 Merge branch 'wip/touchpad-palm-pressure' 2017-07-04 13:57:32 +10:00
Peter Hutterer
302aaa548e Drop autotools
This also makes the gitignore files shorter and/or obsolete.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-04 13:44:07 +10:00
Peter Hutterer
cf0d442ad3 tools: add a tool to measure touch pressure
And update the documentation for how to use the new tool. It's much more
interactive than evemu and easier to grasp, so let's advertise that.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-03 15:58:58 +10:00
Peter Hutterer
945122c691 tools: tidy up the libinput man pages again
Make the libinput page more generic but suitable for short attention spans and
most importantly, point to the xf86-input-libinput man page in a more obvious
manner since we're now shadowing that.

The rest of the man pages have punctuation and formatting cleanups only.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-03 15:04:11 +10:00
Peter Hutterer
5bba2dbb3f tools: add the libinput version to the man pages
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-07-03 11:09:03 +10:00
Peter Hutterer
1d52f2f567 tools: fix invocation of subtools
One dash too many. Oops.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-26 18:44:00 +10:00
Peter Hutterer
d1b7b6267c tools: split the configuration option parsing out
We had one shared parsing function for all config options so tools parse
options that don't actually make sense (e.g. --quiet or --show-keycodes for
libinput-list-devices).

This patch splits the actual libinput device configuration out and reshuffles
everything to make use of that. One large patch, because splitting this up is
more confusing than dumping it all.

This means the actual option parsing is partially duplicated between debug-gui
and debug-events but hey, not everything in life is perfect.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-26 18:43:59 +10:00
Peter Hutterer
8728b5b38f tools: shorten the --help output for the commands
The full information is now in the man page, the usage() now just tells you
how to use it. This way there's only one place to maintain it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-22 17:48:12 +10:00
Peter Hutterer
ca1edce2e1 tools: add the compat scripts installer script to the tarball
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-06-20 16:43:49 +10:00
Peter Hutterer
2887bb4783 tools: assert on malloc failure
No need for proper recovery here in this debugging tool.
Also sneak in a whitespace fix while we're here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-19 12:16:23 +10:00
Peter Hutterer
7e57123069 tools: grab the pointer in the debug gui
Because it's too annoying to trigger the hot corner every few seconds while
pointer debugging.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-15 17:46:51 +10:00
Peter Hutterer
69d0bacee9 Remove vestiges of the event-gui
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-15 17:46:51 +10:00
Peter Hutterer
2d2e523549 tools: note that the touchpad-tap measuring tool picks a touchpad
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-13 13:56:28 +10:00
Peter Hutterer
44b9dca9d5 tools: update the publish-doc tool to use ninja
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-13 12:28:37 +10:00
Peter Hutterer
c837cf8d78 tools: free the tap data on error
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-13 08:33:12 +10:00
Peter Hutterer
5ba30f7b42 tools: add missing toffset copy from src to dest while duplicating
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-13 08:31:15 +10:00
Peter Hutterer
50991bd0d0 tools: point out that measuring taps may be different to what libinput sees
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-09 15:00:36 +10:00
Peter Hutterer
ce12ea6f9a tools: fix linker error with the debug-gui
Make sure we link libudev into everything that requires it

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-06 17:55:14 +10:00
Peter Hutterer
56ceac34d0 tools: link libinput.la for libshared.la
Hopefully fixes the Semaphore CI build failures, apparently things are a bit
more restrictive there than in Fedora 26.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-06 15:23:22 +10:00
Peter Hutterer
5d2959aef9 tools: escape all dashes in man pages (for commands and options)
Apparently the rule is that if a dash may end up being copy/pasted, it needs
to be escaped.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 12:21:35 +10:00
Peter Hutterer
6511154705 tools: man page cleanup - lowercase all command names
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 12:21:35 +10:00
Peter Hutterer
328bc99d3b tools: add "libinput measure touchpad-tap"
This is the first tool of many more to come to enable users to gather
information aobut their devices and/or usage of these devices. Previously,
these required the users to record events, submit them to a bugzilla, have me
run various scripts over it and then decree that the scripts have spoken.
Push some of this into the hands of the users so they can query the numbers
locally and start investigating (or at least get an idea of what's happening).

This tool measures the time deltas between touch up and touch down and prints
a basic summary, together with the ability to print a dat file with the data
for visualization by e.g. gnuplot. Eventually, more of the current analysis
scripts will be moved into this or other helpers.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 12:21:35 +10:00
Peter Hutterer
758ffa9c8a tools: link to the online documentation from the libinput(1) man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 12:21:35 +10:00
Peter Hutterer
4508e29a47 tools: make the libinput tool usage static
This now makes the header obsolete too

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 12:21:35 +10:00