October 2017
Intermediate to advanced
586 pages
14h 8m
English
Every registered input device is represented by a /dev/input/event<X> char device, from which we can read the event from the user space. An application reading this file will receive event packets in the struct input_event format:
struct input_event {
struct timeval time;
__u16 type;
__u16 code;
__s32 value;
}
Let's look at the meaning of each element in the structure: