summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2023-05-07tools/publish-doc: enable pushing docs for specific tagsPeter Hutterer1-3/+29
Historically, I copied the docs on the server directly after pushing latest, but (especially with meson) it's a lot easier to just build that specific tag locally and rsync it to the correct target directory. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-05-07tools/publish-doc: build the docs with meson before synchingPeter Hutterer1-2/+6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-11-15Add a manpage for mouse-dpi-toolStephen Kitt2-0/+19
Signed-off-by: Stephen Kitt <steve@sk2.org>
2021-11-09tools: add a helper tool to list all currently known codesPeter Hutterer2-1/+51
A non-installed tool to make it easy to check if newly added codes are indeed supported correctly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-01-25Change to the (always intended) MIT licensePeter Hutterer4-74/+4
Due to what must've been a copy/paste error many years ago, the license text for libevdev wasn't actually the MIT license. Let's rectify this, it was always MIT intended anyway. To make this more obvious and reduce the chance of copy/paste mistakes, use the SPDX license identifier in the various source files. The two installed public header files have the full license text. All contributors with copyrightable contributions have ACKed the license change to MIT, either in the MR directly [1] or privately in reply to an email. [1] https://gitlab.freedesktop.org/libevdev/libevdev/-/merge_requests/69 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Alexander Dahl <ada@thorsis.com> Acked-by: Andreas Pokorny <andreas.pokorny@canonical.com> Acked-by: Armin K <krejzi@email.com> Acked-by: Benjamin Tissoires <btissoir@redhat.com> Acked-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Deepa Dinamani <deepa.kernel@gmail.com> Acked-by: Emmanuele Bassi <ebassi@gnome.org> Acked-by: Gaetan Nadon <memsize@videotron.ca> Acked-by: George Thomas <georgefsthomas@gmail.com> Acked-by: Michael Forney <mforney@mforney.org> Acked-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Acked-by: Niclas Zeising <zeising@daemonic.se> Acked-by: Owen W. Taylor <otaylor@fishsoup.net> Acked-by: Peter Seiderer <ps.report@gmx.net> Acked-by: Ran Benita <ran234@gmail.com> Acked-by: Rosen Penev <rosenp@gmail.com> Acked-by: Scott Jann <sjann@knight-rider.org> Acked-by: Thilo Schulz <thilo@tjps.eu> Acked-by: polyphemus <rolfmorel@gmail.com>
2020-10-06tools: add a man page for the touchpad-edge-detector toolPeter Hutterer2-1/+49
Requires some .gitignore pattern removal too and an autotools fix to actually dist the man pages. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-19tools: Remove signalfd.h include againNiclas Zeising2-2/+0
Remove the includsion of sys/signalfd.h again, it hasn't been needed since cca90938 and was accidentally re-added, probably as a mismerge, in a40e014e. Signed-off-by: Niclas Zeising <zeising@daemonic.se>
2020-09-11include: sync event codes with kernel 5.8Peter Hutterer1-4/+5
And fix the script to sync the headers up so it syncs event codes for both bsd and linux, but only syncs input.h for linux. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-27[clang-tidy] do not use else after returnRosen Penev2-9/+19
Found with readability-else-after-return Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-08-27libevdev: sort includes alphabeticallyRosen Penev4-13/+15
Found with clang-tidy's llvm-include-order Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-08-27libevdev: remove pointless return in void functionRosen Penev1-2/+0
Found with clang-tidy's readability-redundant-control-flow Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-08-14tools: use basename(argv[0]) for program nameNiclas Zeising3-15/+18
Use baename(argv[0]) to get the program name (for usage), instead of using program_invocation_short_name, which only exists on Linux, not FreeBSD. Signed-off-by: Niclas Zeising <zeising@daemonic.se>
2020-08-14tools: Remove signalfd() useNiclas Zeising2-26/+28
Remove signalfd() use from the mouse-dpi-tool and touchpad-edge-detector tools, in favor of using plain old signals. FreeBSD does not have signalfd() without pulling in external libraries, and with this change these tools can be compiled on FreeBSD. Instead of providing two implementations, one using signalfd() and one using signal(), just use the signal() implementation everywhere as it is more portable. Signed-off-by: Niclas Zeising <zeising@daemonic.se>
2020-08-13Don't hardcode /bin/bashNiclas Zeising1-1/+1
Don't hardcode /bin/bash, use /usr/bin/env bash instead, since not all platforms install bash as /bin/bash. FreeBSD, as an example, installs bash in /usr/local/bin/bash by default. Signed-off-by: Niclas Zeising <zeising@daemonic.se>
2020-05-07tools: specify width by height in the edge-detector helpPeter Hutterer1-1/+1
Fixes #13 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-04-28tools: rename the example device in the touchpad-edge-detectorPeter Hutterer1-1/+1
In the hope that people don't blindly type event0 from now on. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-17tools: fix the include path for local includesPeter Hutterer4-4/+6
Make sure we use the local include files, and correct the path accordingly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-14tools: drop explicit GNU_SOURCE definePeter Hutterer1-1/+0
It's defined globally through AC_USE_SYSTEM_EXTENSIONS Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-14config.h is a local include pathPeter Hutterer2-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-14tools: drop use of HAVE_CONFIG_HPeter Hutterer2-4/+0
There's no case where we don't have a config.h Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-12Update struct input_eventDeepa Dinamani2-11/+5
The struct input_event is not y2038 safe. Update the struct according to the kernel patch: https://lkml.org/lkml/2018/1/6/324 Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-03tools: add a script to sync the kernel header filesPeter Hutterer1-0/+30
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-17tools: print an error if we don't have any matching events in the dpi toolPeter Hutterer1-2/+9
Beats crashing by dereferencing a null-pointer (when we access m->frequencies[idx]) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2017-01-17tools: move udev printf into the print_summary() helperPeter Hutterer1-29/+29
No functional changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-09-21tools: print the mean frequency together with the max frequencyPeter Hutterer1-4/+39
And if they're 30% out, print a warning. On the ThinkPad X1 Wireless Touch Mouse (when connected via bluetooth) we get a bunch of events at the start of the movement, all less than 1ms apart. Best guess is that the device goes to low-power, then notices the movement and buffers the event until the BT connection is back up. Then it sends all events at once. Usually they're less than 1ms apart, but at one recording showed a 37ms delay before we go back to the normal 70ms (~15Hz) the mouse has otherwise. This is unpredictable enough that we can't just work around it so instead print a warning to the user so they can go investigate. https://bugs.freedesktop.org/show_bug.cgi?id=97812 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-09-19tools: rename frequency to max_frequency in the dpi toolPeter Hutterer1-6/+7
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-09-16tools: use uint64_t, not doubles for the µs parametersPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-09-15tools: fix kernel-announced width/heightPeter Hutterer1-1/+3
Side-effect of 240ba34ebd483 was that "touchpad size as listed by the kernel" was now dependent on the values we got. This one is a static one based on the axis info. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-26tools: fix the touchpad resolution calculationPeter Hutterer1-2/+2
Previous ones used the absinfo from the kernel but since we never updated that from within the tool, the output was always the same. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-01tools: require a minimum size for touchpadsPeter Hutterer1-0/+8
This mostly aims to catch users trying to specify the size in inches. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-01tools: change touchpad-edge-detector to require physical sizePeter Hutterer1-17/+32
Almost no-one does the calculations for me to update the udev rules (and some rules were submitted with the <x resolution> placeholders left in). Require the user to specify the physical size so we just copy/paste the actual udev rule. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-04-22tools: allow numeric axis values in tweak-devicePeter Hutterer1-4/+37
Not all axes a device may have are assigned a semantic name. https://bugs.freedesktop.org/show_bug.cgi?id=95029 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-22tools: fix tweak-device option parsingPeter Hutterer1-7/+14
https://bugs.freedesktop.org/show_bug.cgi?id=92880 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-01-04tools: shut up coverity about a potential close(-1)Peter Hutterer1-1/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-01-04tools: fix coverty "may be used uninitialized" warningsPeter Hutterer1-4/+5
tools/libevdev-tweak-device.c:390: uninit_use_in_call: Using uninitialized value "changes" when calling "parse_options_abs". tools/libevdev-tweak-device.c:376: warning: 'led' may be used uninitialized in this function tools/libevdev-tweak-device.c:375: warning: 'axis' may be used uninitialized in this function Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-11-10tools: fix touchpad-edge-detector udev rule outputPeter Hutterer1-2/+2
off-by-one error on the ABS_ axes printed. ABS_X/Y are 0 and 1. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-24tools: print out evdev override udev rule from touchpad edge detectorPeter Hutterer1-1/+81
We're starting to collect overrides for custom devices, making this easier for users and saves us time. Once we measured everything, print out a guesstimated udev rule and instructions on how to calculate the resolution. Extra output now is: Touchpad size as listed by the kernel: 132x111mm Calculate resolution as: x axis: 6076/<width in mm> y axis: 5021/<height in mm> Suggested udev rule: # <Laptop model description goes here> evdev:input:b0005v05ACp030E* EVDEV_ABS_01=-2694:2862:<x resolution> EVDEV_ABS_02=-20:121:<y resolution> EVDEV_ABS_35=-2694:2862:<x resolution> EVDEV_ABS_36=-20:121:<y resolution> The ABS_MT_ axes are only printed if the device have them, if the device isn't bluetooth/usb we print the dmi modalias instead. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-01tools - tweak-device: add a --resolution commandPeter Hutterer2-2/+105
So far, 100% of the usages for tweak-tool was to set the x/y resolution of a device. Make --resolution a shortcut for this. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2015-07-01tools - tweak-device: revamp to reduce use of globalsPeter Hutterer1-61/+152
Make the code base a bit more modular so it's easier to add new commands. Main change here is: options are parsed twice now, first time for the mode (abs/led) and the device path, then again for the mode-specific options. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2015-06-29tools - tweak-device: fix wrong error message if the LED doesn't existPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-29tools - tweak-device: close the fd on exitPeter Hutterer1-1/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-10tools: complain about devices that don't have abs x/y axes in the edge detectorPeter Hutterer1-0/+8
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-05-21tools: widen frequency resolution to µs in the DPI toolPeter Hutterer1-10/+10
The Microsoft Arc Touch Mouse claims 8000fps which is higher than we can measure in the current milliseconds resolution. http://www.cnet.com/products/microsoft-arc-touch-mouse-black-series/specs/ https://bugs.freedesktop.org/show_bug.cgi?id=90540 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-04-23tools: fix help string for manual DPI calculationPeter Hutterer1-1/+1
https://bugs.freedesktop.org/show_bug.cgi?id=90143 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-04cosmetic: fix a couple of duplicate/missing empty linesPeter Hutterer2-2/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-02-04tools: add a tool to change kernel devicesPeter Hutterer4-1/+321
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-07tools: note that the mouse frequency measured is the highest frequencyPeter Hutterer1-2/+4
Some devices scale the frequency based on the input and will provide recordings with different frequencies each time. Recommend to measure multiple times since we can only know what the highest frequency is. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-07tools: fix clang compiler warningPeter Hutterer1-1/+1
mouse-dpi-tool.c:213:39: warning: missing field 'frequency' initializer [-Wmissing-field-initializers] struct measurements measurements = {0}; Annoying, but a low-cost fix. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-12tools: print the formula to calculate resolutionsPeter Hutterer1-1/+4
And encourage users to move at least 25cm, makes it a lot easier to pick the resolution. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-05tools: zero-pad PID/VID in the dpi toolPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>