The struct input_event
is, among others, defined in include/linux/input.h.
From 5. Event interface in Linux kernel Documentation/input/input.txt (and modified to provide the correct header file names):
-
time
is the timestamp, it returns the time at which the event happened. -
type
is for exampleEV_REL
for relative moment,EV_KEY
for a keypress or
release. More types are defined in include/linux/input-event-codes.h. -
code
is event code, for exampleREL_X
orKEY_BACKSPACE
, again a complete
list is in include/linux/input-event-codes.h. -
value
is the value the event carries. Either a relative change for
EV_REL
, absolute new value forEV_ABS
(joysticks …), or0
forEV_KEY
for
release,1
for keypress and2
for autorepeat.
For guides and example code, do a web search for "linux kernel" "input subsystem"
.