Commit graph

16 commits

Author SHA1 Message Date
Peter Hutterer
4b1bae3f8c tools/replay: rmdir, not unlink for directories
And if the directory happens to be nonempty, well, maybe anyother
libinput reply is running so let's ignore that.

Fixes: cdfe34f62a ("replay: use the runtime quirks for our replay quirks")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1330>
2025-10-20 02:01:23 +00:00
Peter Hutterer
f9977dba9c tools/replay: set the multiprocessing start method to fork
Python 3.14 has changed from fork to forkserver[1] which causes
libinput replay to fail with the following error when starting the
subprocesses:
   ValueError: ctypes objects containing pointers cannot be pickled

This is caused by the libevdev device being passed to the sub process.
A more proper fix may be to only initialize the device in the subprocess
and then signal the process to start replaying. But meanwhile, switching
back to fork will do.

[1] https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods

Closes #1204

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1330>
2025-10-20 02:01:23 +00:00
Peter Hutterer
cdfe34f62a replay: use the runtime quirks for our replay quirks
Closes #1166

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1297>
2025-08-12 07:58:07 +00:00
Peter Hutterer
59f0d8f647 tools/replay: improve the verbose output a bit
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-08-01 11:24:06 +10:00
Peter Hutterer
79ea713aa3 tools: fix ruff format for libinput-replay
Fixes: 89c2f29d2c ("tools/libinput-replay: Warn if writing to local-overrides fails")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1272>
2025-07-15 16:26:59 +10:00
José Expósito
89c2f29d2c tools/libinput-replay: Warn if writing to local-overrides fails
Closes: https://gitlab.freedesktop.org/libinput/libinput/-/issues/1153
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1264>
2025-07-09 21:34:54 +00:00
Peter Hutterer
65e7cd5953 tools: handle an empty quirks list in the libinput recording
Fixes: 548279abee ("tools: store virtual property in recordings")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1243>
2025-06-24 02:57:31 +00:00
Ryan Hendrickson
548279abee tools: store virtual property in recordings
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1213>
2025-06-08 23:55:10 +00:00
Peter Hutterer
117d91b93f tools/libinput-replay: use list comprehension instead of append
And remove the unnecessary del processes, we're in a block so processes
ceases to exist there anyway.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1102>
2024-12-22 23:59:22 +00:00
Peter Hutterer
193aacf61a tools/libinput-replay: interrupt only the ongoing event sequence with ctrl+c
If libinput replay is currently replaying events, stop that sequence and
go back to the start if the user presses Ctrl+C. Only on the second
Ctrl+C do we fully exit.

This helps debugging long recordings where we don't want to keep
producing events after some initial event sequence.

Closes #1064

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1102>
2024-12-22 23:59:22 +00:00
Peter Hutterer
52679e1296 tools/libinput-replay: print a separator line for EV_SYN events
If running with --verbose having that line makes it a lot easier to
look at the event sequence.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1094>
2024-12-18 08:07:18 +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
301895685e tools: fix two black warnings
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/985>
2024-03-18 12:29:57 +10:00
Peter Hutterer
41e7caac48 tools: add --replay-after and --once to libinput replay
For the cases where it's not possible to hit enter to start the replay
because e.g. we cannot change focus, etc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-02-06 18:02:58 +00:00
Peter Hutterer
4c82cbd4d0 tools/replay: do not replay key repeat events
The kernel emulates key events on its own anyway, replaying key events with
libinput replay as well just duplicates the events. Turning kernel
repeat off is not an option, it  makes the device look different (EV_REP
changes). So let's just not replay those events.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-05-18 23:14:44 +00:00
Peter Hutterer
9323cdfc11 meson.build: build libinput replay as well
Just like the other python-based tools it's just a basename copy, so let's be
consistent here and have all tools perform that way.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-23 13:30:42 +10:00
Renamed from tools/libinput-replay (Browse further)