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 example EV_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 example REL_X or KEY_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 for EV_ABS (joysticks …), or 0 for EV_KEY for
    release, 1 for keypress and 2 for autorepeat.

For guides and example code, do a web search for "linux kernel" "input subsystem".

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)