7 evtest - Input device event monitor and query tool
11 evtest [--grab] /dev/input/eventX
13 evtest --query /dev/input/eventX <type> <value>
17 The first invocation type displayed above ("capture mode") causes evtest to
18 display information about the specified input device, including all the events
19 supported by the device. It then monitors the device and displays all the
20 events layer events generated.
22 If the --grab flag is given in capture mode, evtest keeps an EVIOCGRAB on the
23 device. While this grab is active, other processes will not receive events
24 from the kernel devices. The grab is released again when evtest quits.
26 In the second invocation type ("query mode"), evtest performs a one-shot query
27 of the state of a specific key *value* of an event *type*.
29 *type* is one of: *EV_KEY*, *EV_SW*, *EV_SND*, *EV_LED* (or the numerical value)
31 *value* can be either a decimal representation (e.g. 44), hex
32 (e.g. 0x2c), or the constant name (e.g. KEY_Z) of the key/switch/sound/LED
35 If the state bit is set (key pressed, switch on, ...), evtest exits with
36 code 10. If the state bit is unset (key depressed, switch off, ...), evtest
37 exits with code 0. No other output is generated.
39 evtest needs to be able to read from the device; in most cases this means it
42 evtest is commonly used to debug issues with input devices in X.Org. The
43 output of evtest shows the information presented by the kernel; based on
44 this information it can be determined whether a bug may be a kernel or an
49 If evtest does not show any events even though the device is being used, the
50 device may be grabbed by a process (EVIOCGRAB). This is usually the case
51 when debugging a synaptics device from within X. VT switching to a TTY or
52 shutting down the X server terminates this grab and synaptics devices can be
55 The following command shows the processes with an open file descriptor on
58 fuser -v /dev/input/eventX
62 evtest returns 1 on error.
64 When used to query state, evtest returns 0 if the state bit is unset and
65 10 if the state bit is set.
73 evtest was written by Vojtech Pavlik <vojtech@suse.cz>.
75 This manual page was written by Stephen Kitt <steve@sk2.org>, based on that
76 present in the lineakd package, for the Debian GNU/Linux system (but may be