The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
input_event.h File Reference

the events of /dev/input (ABI). More...

#include "common/stdint.h"

Go to the source code of this file.

Data Structures

struct  input_event_t

Macros

#define EV_SYN   0x00
#define EV_KEY   0x01
#define EV_REL   0x02
#define EV_ABS   0x03
#define SYN_REPORT   0
#define SYN_DROPPED   3
#define REL_X   0x00
#define REL_Y   0x01
#define REL_WHEEL   0x08
#define ABS_X   0x00
#define ABS_Y   0x01
#define INPUT_ABS_MAX   32767
#define BTN_LEFT   0x110
#define BTN_RIGHT   0x111
#define BTN_MIDDLE   0x112
#define INPUT_IOC_GRAB   0x40044901u

Detailed Description

the events of /dev/input (ABI).

one event is 12 bytes: a time, a type, a code and a value. the types and codes are the ones of Linux (linux/input-event-codes.h), so ported programs know them. a group of events that belong together (a mouse moving in x and y, and a button) ends with EV_SYN / SYN_REPORT.

libc has a copy in <sys/input.h>; the two must stay the same.

Macro Definition Documentation

◆ EV_SYN

#define EV_SYN   0x00

◆ EV_KEY

#define EV_KEY   0x01

◆ EV_REL

#define EV_REL   0x02

◆ EV_ABS

#define EV_ABS   0x03

◆ SYN_REPORT

#define SYN_REPORT   0

◆ SYN_DROPPED

#define SYN_DROPPED   3

◆ REL_X

#define REL_X   0x00

◆ REL_Y

#define REL_Y   0x01

◆ REL_WHEEL

#define REL_WHEEL   0x08

◆ ABS_X

#define ABS_X   0x00

◆ ABS_Y

#define ABS_Y   0x01

◆ INPUT_ABS_MAX

#define INPUT_ABS_MAX   32767

◆ BTN_LEFT

#define BTN_LEFT   0x110

◆ BTN_RIGHT

#define BTN_RIGHT   0x111

◆ BTN_MIDDLE

#define BTN_MIDDLE   0x112

◆ INPUT_IOC_GRAB

#define INPUT_IOC_GRAB   0x40044901u