summaryrefslogtreecommitdiff
path: root/tools/libinput-record.man
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-03-01 10:04:11 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-03-19 14:24:15 +1000
commit6e4c83636a99acc6dedb413878bf535ca4f14f4a (patch)
treea59a67fb3d3960d14354cd4e0a5a9af0985ffab3 /tools/libinput-record.man
parentfd1cb049daf924de127de6039cb30e2b2a9d364a (diff)
downloadlibinput-6e4c83636a99acc6dedb413878bf535ca4f14f4a.tar.gz
tools: libinput-record: add support for printing libinput events
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 <peter.hutterer@who-t.net>
Diffstat (limited to 'tools/libinput-record.man')
-rw-r--r--tools/libinput-record.man26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/libinput-record.man b/tools/libinput-record.man
index 5ff263ad..dbe581a1 100644
--- a/tools/libinput-record.man
+++ b/tools/libinput-record.man
@@ -52,6 +52,13 @@ Record multiple devices at once, see section
This option requires that a
\fB\-\-output-file\fR is specified and that all devices to be recorded are
given on the commandline.
+.TP 8
+.B \-\-with-libinput
+Record libinput events alongside device events.
+.B THIS FEATURE IS EXPERIMENTAL.
+See section
+.B RECORDING LIBINPUT EVENTS
+for more details.
.SH RECORDING MULTIPLE DEVICES
Sometimes it is necessary to record the events from multiple devices
@@ -70,6 +77,25 @@ invocation is:
Note that when recording multiple devices, only the first device is printed
immediately, all other devices and their events are printed on exit.
+.SH RECORDING LIBINPUT EVENTS
+When the \fB\-\-with-libinput\fR switch is provided, \fBlibinput\-record\fR
+initializes a libinput context for the devices being recorded. Events from
+these contexts are printed alongside the evdev events.
+.B THIS FEATURE IS EXPERIMENTAL.
+.PP
+The primary purpose of this feature is debugging and event analysis, no
+caller may rely on any specific format of the events.
+.PP
+Note that while libinput and \fBlibinput\-record\fR see the same events from
+the device nodes, no guarantee can be given about the correct order of
+events. libinput events may come in earlier or later than the events from
+the device nodes and for some devices, libinput may internally alter the
+event stream before processing.
+.PP
+Note that the libinput context created by \fBlibinput\-record\fR does not
+affect the running desktop session and does not (can not!) copy any
+configuration options from that session.
+
.SH FILE FORMAT
The output file format is in YAML and intended to be both human-readable and
machine-parseable. Below is a short example YAML file, all keys are detailed