What is the \"format\" of the character devices located in /dev/input/event*?
In other words, how can I decode the character stream? A Python example w
The format is described in the Documentation/input/input.txt file in the Linux source. Basically, you read structs of the following form from the file:
struct input_event {
struct timeval time;
unsigned short type;
unsigned short code;
unsigned int value;
};
type and code are values defined in linux/input.h. For example,
type might be EV_REL for relative moment of a mouse, or EV_KEY for
a keypress, and code is the keycode, or REL_X or ABS_X for a
mouse.