1libinput-record(1)          General Commands Manual         libinput-record(1)
2
3
4

NAME

6       libinput-record - record kernel events
7

SYNOPSIS

9       libinput record [options] [/dev/input/event0 [/dev/input/event1 ...]]
10

DESCRIPTION

12       The libinput record tool records kernel events from a device and prints
13       them in a format that can later be replayed with the libinput replay(1)
14       tool.  This tool needs to run as root to read from the device.
15
16       The  output of this tool is YAML, see FILE FORMAT for more details.  By
17       default it prints to stdout unless the -o option is given.
18
19       The events recorded are independent of  libinput  itself,  updating  or
20       removing libinput will not change the event stream.
21

OPTIONS

23       If  one  or  more  device nodes are given, this tool opens those device
24       nodes.  Otherwise, a list of devices is  presented  and  the  user  can
25       select the device to record. If unsure, run without any arguments.
26
27       --help  Print help
28
29       --all   Record  all  /dev/input/event* devices available on the system.
30               This option should be used in exceptional cases only, the  out‐
31               put file is almost always too noisy and replaying the recording
32               may not be possible.  This option requires --output-file and no
33               device nodes may be provided on the commandline.
34
35       --autorestart=s
36               Terminate the current recording after s seconds of device inac‐
37               tivity. This option requires that a --output-file is specified.
38               The  output  filename is used as prefix, suffixed with the date
39               and time of the recording. The timeout must be greater than 0.
40
41       -o filename.yml
42       --output-file=filename.yml
43               Specifies the output file to use. If  --autorestart  is  given,
44               the filename is used as prefix only.
45
46       --show-keycodes
47               Show  keycodes  as-is in the recording. By default, common keys
48               are obfuscated and printed as KEY_A to avoid information leaks.
49
50       --with-libinput
51               Record libinput events alongside device events.   THIS  FEATURE
52               IS  EXPERIMENTAL.   See  section  RECORDING LIBINPUT EVENTS for
53               more details.
54
55

RECORDING MULTIPLE DEVICES

57       Sometimes it is necessary to record the events  from  multiple  devices
58       simultaneously, e.g.  when an interaction between a touchpad and a key‐
59       board causes a bug. libinput record records multiple  devices  with  an
60       identical time offset, allowing for correct replay of the interaction.
61
62       If multiple devices are recorded, an output filename must be provided.
63
64       All  devices  to  be  recorded  must be provided on the commandline, an
65       example invocation is:
66
67       libinput record -o tap-bug /dev/input/event3 /dev/input/event7
68
69       Note that when recording multiple devices, only  the  first  device  is
70       printed  immediately, all other devices and their events are printed on
71       exit.
72
73

RECORDING LIBINPUT EVENTS

75       When the --with-libinput switch is provided,  libinput-record  initial‐
76       izes  a  libinput  context  for the devices being recorded. Events from
77       these contexts are printed alongside the evdev events.  THIS FEATURE IS
78       EXPERIMENTAL.
79
80       The primary purpose of this feature is debugging and event analysis, no
81       caller may rely on any specific format of the events.
82
83       Note that while libinput and libinput-record see the same  events  from
84       the  device nodes, no guarantee can be given about the correct order of
85       events. libinput events may come in earlier or later  than  the  events
86       from  the  device  nodes  and for some devices, libinput may internally
87       alter the event stream before processing.
88
89       Note that the libinput context  created  by  libinput-record  does  not
90       affect  the  running  desktop  session and does not (can not!) copy any
91       configuration options from that session.
92
93

FILE FORMAT

95       The output file format is in YAML and intended to be  both  human-read‐
96       able  and  machine-parseable.  Below  is a short example YAML file, all
97       keys are detailed further below.
98
99       Any parsers must ignore keys not specified in the file format  descrip‐
100       tion.  The version number field is only used for backwards-incompatible
101       changes.
102
103       version: 1
104       ndevices: 2
105       libinput:
106         version: 1.10.0
107       system:
108         os: "fedora:26"
109         kernel: "4.13.9-200.fc26.x86_64"
110         dmi: "dmi:bvnLENOVO:bvrGJET72WW(2.22):bd02/21/2014:svnLENOVO:..."
111       devices:
112         - node: /dev/input/event9
113           evdev:
114             # Name: Synaptics TM2668-002
115             # ID: bus 0x1d vendor 0x6cb product 00 version 00
116             # Size in mm: 97x68
117             # Supported Events:
118             # Event type 0 (EV_SYN)
119
120             #.. abbreviated for man page ...
121
122             #
123             name: Synaptics TM2668-002
124             id: [29, 1739, 0, 0]
125             codes:
126               0: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] # EV_SYN
127               1: [272, 325, 328, 330, 333, 334, 335] # EV_KEY
128               3: [0, 1, 24, 47, 48, 49, 52, 53, 54, 55, 57, 58] # EV_ABS
129             absinfo:
130               0: [0, 4089, 0, 0, 42]
131               1: [0, 2811, 0, 0, 41]
132               24: [0, 255, 0, 0, 0]
133               47: [0, 4, 0, 0, 0]
134               48: [0, 15, 0, 0, 0]
135               49: [0, 15, 0, 0, 0]
136               52: [0, 1, 0, 0, 0]
137               53: [0, 4089, 0, 0, 42]
138               54: [0, 2811, 0, 0, 41]
139               55: [0, 2, 0, 0, 0]
140               57: [0, 65535, 0, 0, 0]
141               58: [0, 255, 0, 0, 0]
142             properties: [0, 2, 4]
143           hid: [12, 23, 34, 45, ...]
144           udev:
145             properties:
146             - ID_INPUT_MOUSE=1
147             - ID_INPUT=1
148           quirks:
149             - ModelAppleTouchpad=1
150             - AttrSizeHint=32x32
151           events:
152             - evdev:
153               - [  0,      0,   3,  57,  1420] # EV_ABS / ABS_MT_TRACKING_ID   1420
154               - [  0,      0,   3,  53,  1218] # EV_ABS / ABS_MT_POSITION_X    1218
155               - [  0,      0,   3,  54,  1922] # EV_ABS / ABS_MT_POSITION_Y    1922
156               - [  0,      0,   3,  52,     0] # EV_ABS / ABS_MT_ORIENTATION      0
157               - [  0,      0,   3,  58,    47] # EV_ABS / ABS_MT_PRESSURE        47
158               - [  0,      0,   1, 330,     1] # EV_KEY / BTN_TOUCH               1
159               - [  0,      0,   1, 325,     1] # EV_KEY / BTN_TOOL_FINGER         1
160               - [  0,      0,   3,   0,  1218] # EV_ABS / ABS_X                1218
161               - [  0,      0,   3,   1,  1922] # EV_ABS / ABS_Y                1922
162               - [  0,      0,   3,  24,    47] # EV_ABS / ABS_PRESSURE           47
163               - [  0,      0,   0,   0,     0] # ------------ SYN_REPORT (0) ------- +0ms
164             - evdev:
165               - [  0,  11879,   3,  53,  1330] # EV_ABS / ABS_MT_POSITION_X    1330
166               - [  0,  11879,   3,  54,  1928] # EV_ABS / ABS_MT_POSITION_Y    1928
167               - [  0,  11879,   3,  58,    46] # EV_ABS / ABS_MT_PRESSURE        46
168               - [  0,  11879,   3,   0,  1330] # EV_ABS / ABS_X                1330
169               - [  0,  11879,   3,   1,  1928] # EV_ABS / ABS_Y                1928
170               - [  0,  11879,   3,  24,    46] # EV_ABS / ABS_PRESSURE           46
171               - [  0,  11879,   0,   0,     0] # ------------ SYN_REPORT (0) ------- +0ms
172         # second device (if any)
173         - node: /dev/input/event9
174           evdev: ...
175
176       Top-level keys are listed below,  see  the  respective  subsection  for
177       details on each key.
178
179       version: int
180               The  file  format  version.  This version is only increased for
181               backwards-incompatible changes. A parser  must  ignore  unknown
182               keys to be forwards-compatible.
183
184       ndevices: int
185               The  number  of device recordings in this file. Always 1 unless
186               recorded with --multiple
187
188       libinput: {...}
189               A dictionary with libinput-specific information.
190
191       system: {...}
192               A dictionary with system information.
193
194       devices: {...}
195               A list of devices containing the description and and events  of
196               each device.
197
198
199   libinput
200       version: string
201               libinput version
202
203
204   system
205       Information about the system
206
207       os: string
208               Distribution ID and version, see os-release(5)
209
210       kernel: string
211               Kernel version, see uname(1)
212
213       dmi: string
214               DMI modalias, see /sys/class/dmi/id/modalias
215
216
217   devices
218       Information about and events from the recorded device nodes
219
220       node: string
221               the device node recorded
222
223       evdev   A dictionary with the evdev device information.
224
225       hid     A  list  of  integers  representing  the  HID report descriptor
226               bytes.
227
228       udev    A dictionary with the udev device information.
229
230       events  A list of dictionaries with the recorded events
231
232   evdev
233       name: string
234               The device name
235
236       id: [bustype, vendor, product, version]
237               The data from the struct input_id,  bustype,  vendor,  product,
238               version.
239
240       codes: {type: [a, b, c ], ...}
241               All  evdev types and codes as nested dictionary. The evdev type
242               is the key, the codes are a list.
243
244       absinfo: {code: [min, max, fuzz, flat, resolution], ...}
245               An array of arrays with 6 decimal elements each,  denoting  the
246               contents  of  a  struct input_absinfo. The first element is the
247               code (e.g. ABS_X) in decimal format.
248
249       properties: [0, 1, ...]
250               Array with all INPUT_PROP_FOO constants. May be an empty array.
251
252   udev
253       properties: list of strings
254               A list of udev properties in the key=value format. This is  not
255               the  complete  list  of properties assigned to the device but a
256               subset that is  relevant  to  libinput.  These  properties  may
257               include properties set on a parent device.
258
259       quirks: list of strings
260               A list of device quirks the key=value format.
261
262
263   events
264       A  list of the recorded events. The list contains dictionaries Informa‐
265       tion about the events. The content is a list of dictionaries, with  the
266       string identifying the type of event sequence.
267
268       { evdev: [ {"data": [sec, usec, type, code, value]}, ...] }
269               Each  input_event  dictionary contains the contents of a struct
270               input_event in decimal format. The last item  in  the  list  is
271               always the SYN_REPORT of this event frame. The next event frame
272               starts a new evdev dictionary entry in the parent events list.
273
274

NOTES

276       This tool records events from the kernel and is independent  of  libin‐
277       put.  In  other words, updating or otherwise changing libinput will not
278       alter the output from this tool. libinput itself does not need to be in
279       use to record events.
280

LIBINPUT

282       Part of the libinput(1) suite
283
284
285
286                                                            libinput-record(1)
Impressum