input_event structure description (from linux/input.h)
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 orrelease. More types are defined in include/linux/input-event-codes.h.code
is event code, for exampleREL_X
orKEY_BACKSPACE
, again a completelist is in include/linux/input-event-codes.h.value
is the value the event carries. Either a relative change forEV_REL
, absolute new value forEV_ABS
(joysticks ...), or0
forEV_KEY
forrelease,1
for keypress and2
for autorepeat.
For guides and example code, do a web search for "linux kernel" "input subsystem"
.