1EVTEST(1)                                                            EVTEST(1)
2
3
4

NAME

6       evtest - Input device event monitor and query tool
7

SYNOPSIS

9       evtest [--grab] /dev/input/eventX
10
11       evtest --query /dev/input/eventX <type> <value>
12

DESCRIPTION

14       The first invocation type displayed above ("capture mode") causes
15       evtest to display information about the specified input device,
16       including all the events supported by the device. It then monitors the
17       device and displays all the events layer events generated.
18
19       If the --grab flag is given in capture mode, evtest keeps an EVIOCGRAB
20       on the device. While this grab is active, other processes will not
21       receive events from the kernel devices. The grab is released again when
22       evtest quits.
23
24       In the second invocation type ("query mode"), evtest performs a
25       one-shot query of the state of a specific key value of an event type.
26
27       type is one of: EV_KEY, EV_SW, EV_SND, EV_LED (or the numerical value)
28
29       value can be either a decimal representation (e.g. 44), hex (e.g.
30       0x2c), or the constant name (e.g. KEY_Z) of the key/switch/sound/LED
31       being queried.
32
33       If the state bit is set (key pressed, switch on, ...), evtest exits
34       with code 10. If the state bit is unset (key depressed, switch off,
35       ...), evtest exits with code 0. No other output is generated.
36
37       evtest needs to be able to read from the device; in most cases this
38       means it must be run as root.
39
40       evtest is commonly used to debug issues with input devices in X.Org.
41       The output of evtest shows the information presented by the kernel;
42       based on this information it can be determined whether a bug may be a
43       kernel or an X.Org issue.
44

DIAGNOSTICS

46       If evtest does not show any events even though the device is being
47       used, the device may be grabbed by a process (EVIOCGRAB). This is
48       usually the case when debugging a synaptics device from within X. VT
49       switching to a TTY or shutting down the X server terminates this grab
50       and synaptics devices can be debugged.
51
52       The following command shows the processes with an open file descriptor
53       on the device:
54
55           fuser -v /dev/input/eventX
56

EXIT CODE

58       evtest returns 1 on error.
59
60       When used to query state, evtest returns 0 if the state bit is unset
61       and 10 if the state bit is set.
62

SEE ALSO

64       inputattach(1)
65

AUTHOR

67       evtest was written by Vojtech Pavlik <vojtech@suse.cz[1]>.
68
69       This manual page was written by Stephen Kitt <steve@sk2.org[2]>, based
70       on that present in the lineakd package, for the Debian GNU/Linux system
71       (but may be used by others).
72

NOTES

74        1. vojtech@suse.cz
75           mailto:vojtech@suse.cz
76
77        2. steve@sk2.org
78           mailto:steve@sk2.org
79
80
81
82                                  07/19/2023                         EVTEST(1)
Impressum