Documentation/input/input.rst

Source file repositories/reference/linux-study-clean/Documentation/input/input.rst

File Facts

System
Linux kernel
Corpus path
Documentation/input/input.rst
Extension
.rst
Size
9141 bytes
Lines
282
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

struct input_event {
	    struct timeval time;
	    unsigned short type;
	    unsigned short code;
	    int value;
    };

``time`` is the timestamp, it returns the time at which the event happened.
Type is for example EV_REL for relative movement, EV_KEY for a keypress or
release. More types are defined in include/uapi/linux/input-event-codes.h.

``code`` is event code, for example REL_X or KEY_BACKSPACE, again a complete
list is in include/uapi/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.

See :ref:`input-event-codes` for more information about various event codes.

Annotation

Implementation Notes