238 lines
6.3 KiB
C
238 lines
6.3 KiB
C
/* SPDX-License-Identifier: Unlicense */
|
|
#ifndef __ZINNIA_UAPI_INPUT_H
|
|
#define __ZINNIA_UAPI_INPUT_H
|
|
|
|
#include <stdint.h>
|
|
#include <uapi/ioctls.h>
|
|
#include <uapi/time.h>
|
|
|
|
struct __input_event {
|
|
struct __timeval time;
|
|
uint16_t type;
|
|
uint16_t code;
|
|
int32_t value;
|
|
};
|
|
|
|
struct __input_id {
|
|
uint16_t bustype;
|
|
uint16_t vendor;
|
|
uint16_t product;
|
|
uint16_t version;
|
|
};
|
|
|
|
struct __input_absinfo {
|
|
int32_t value;
|
|
int32_t minimum;
|
|
int32_t maximum;
|
|
int32_t fuzz;
|
|
int32_t flat;
|
|
int32_t resolution;
|
|
};
|
|
|
|
#define __EV_SYN 0x00
|
|
#define __EV_KEY 0x01
|
|
#define __EV_REL 0x02
|
|
#define __EV_ABS 0x03
|
|
#define __EV_MSC 0x04
|
|
#define __EV_CNT 0x20
|
|
|
|
#define __SYN_REPORT 0
|
|
|
|
#define __REL_X 0x00
|
|
#define __REL_Y 0x01
|
|
#define __REL_WHEEL 0x08
|
|
#define __REL_MAX 0x0f
|
|
#define __REL_CNT 0x10
|
|
|
|
#define __ABS_X 0x00
|
|
#define __ABS_Y 0x01
|
|
#define __ABS_Z 0x02
|
|
#define __ABS_RX 0x03
|
|
#define __ABS_RY 0x04
|
|
#define __ABS_RZ 0x05
|
|
#define __ABS_THROTTLE 0x06
|
|
#define __ABS_RUDDER 0x07
|
|
#define __ABS_WHEEL 0x08
|
|
#define __ABS_HAT0X 0x10
|
|
#define __ABS_HAT0Y 0x11
|
|
#define __ABS_MAX 0x3f
|
|
#define __ABS_CNT 0x40
|
|
|
|
#define __KEY_RESERVED 0
|
|
#define __KEY_ESC 1
|
|
#define __KEY_1 2
|
|
#define __KEY_2 3
|
|
#define __KEY_3 4
|
|
#define __KEY_4 5
|
|
#define __KEY_5 6
|
|
#define __KEY_6 7
|
|
#define __KEY_7 8
|
|
#define __KEY_8 9
|
|
#define __KEY_9 10
|
|
#define __KEY_0 11
|
|
#define __KEY_MINUS 12
|
|
#define __KEY_EQUAL 13
|
|
#define __KEY_BACKSPACE 14
|
|
#define __KEY_TAB 15
|
|
#define __KEY_Q 16
|
|
#define __KEY_W 17
|
|
#define __KEY_E 18
|
|
#define __KEY_R 19
|
|
#define __KEY_T 20
|
|
#define __KEY_Y 21
|
|
#define __KEY_U 22
|
|
#define __KEY_I 23
|
|
#define __KEY_O 24
|
|
#define __KEY_P 25
|
|
#define __KEY_LEFTBRACE 26
|
|
#define __KEY_RIGHTBRACE 27
|
|
#define __KEY_ENTER 28
|
|
#define __KEY_LEFTCTRL 29
|
|
#define __KEY_A 30
|
|
#define __KEY_S 31
|
|
#define __KEY_D 32
|
|
#define __KEY_F 33
|
|
#define __KEY_G 34
|
|
#define __KEY_H 35
|
|
#define __KEY_J 36
|
|
#define __KEY_K 37
|
|
#define __KEY_L 38
|
|
#define __KEY_SEMICOLON 39
|
|
#define __KEY_APOSTROPHE 40
|
|
#define __KEY_GRAVE 41
|
|
#define __KEY_LEFTSHIFT 42
|
|
#define __KEY_BACKSLASH 43
|
|
#define __KEY_Z 44
|
|
#define __KEY_X 45
|
|
#define __KEY_C 46
|
|
#define __KEY_V 47
|
|
#define __KEY_B 48
|
|
#define __KEY_N 49
|
|
#define __KEY_M 50
|
|
#define __KEY_COMMA 51
|
|
#define __KEY_DOT 52
|
|
#define __KEY_SLASH 53
|
|
#define __KEY_RIGHTSHIFT 54
|
|
#define __KEY_KPASTERISK 55
|
|
#define __KEY_LEFTALT 56
|
|
#define __KEY_SPACE 57
|
|
#define __KEY_CAPSLOCK 58
|
|
#define __KEY_F1 59
|
|
#define __KEY_F2 60
|
|
#define __KEY_F3 61
|
|
#define __KEY_F4 62
|
|
#define __KEY_F5 63
|
|
#define __KEY_F6 64
|
|
#define __KEY_F7 65
|
|
#define __KEY_F8 66
|
|
#define __KEY_F9 67
|
|
#define __KEY_F10 68
|
|
#define __KEY_NUMLOCK 69
|
|
#define __KEY_SCROLLLOCK 70
|
|
#define __KEY_KP7 71
|
|
#define __KEY_KP8 72
|
|
#define __KEY_KP9 73
|
|
#define __KEY_KPMINUS 74
|
|
#define __KEY_KP4 75
|
|
#define __KEY_KP5 76
|
|
#define __KEY_KP6 77
|
|
#define __KEY_KPPLUS 78
|
|
#define __KEY_KP1 79
|
|
#define __KEY_KP2 80
|
|
#define __KEY_KP3 81
|
|
#define __KEY_KP0 82
|
|
#define __KEY_KPDOT 83
|
|
#define __KEY_F11 87
|
|
#define __KEY_F12 88
|
|
#define __KEY_KPENTER 96
|
|
#define __KEY_RIGHTCTRL 97
|
|
#define __KEY_KPSLASH 98
|
|
#define __KEY_SYSRQ 99
|
|
#define __KEY_RIGHTALT 100
|
|
#define __KEY_HOME 102
|
|
#define __KEY_UP 103
|
|
#define __KEY_PAGEUP 104
|
|
#define __KEY_LEFT 105
|
|
#define __KEY_RIGHT 106
|
|
#define __KEY_END 107
|
|
#define __KEY_DOWN 108
|
|
#define __KEY_PAGEDOWN 109
|
|
#define __KEY_INSERT 110
|
|
#define __KEY_DELETE 111
|
|
#define __KEY_LEFTMETA 125
|
|
#define __KEY_RIGHTMETA 126
|
|
#define __KEY_F13 183
|
|
#define __KEY_F14 184
|
|
#define __KEY_F15 185
|
|
#define __KEY_F16 186
|
|
#define __KEY_F17 187
|
|
#define __KEY_F18 188
|
|
#define __KEY_F19 189
|
|
#define __KEY_F20 190
|
|
#define __KEY_F21 191
|
|
#define __KEY_F22 192
|
|
#define __KEY_F23 193
|
|
#define __KEY_F24 194
|
|
#define __KEY_CNT 0x300
|
|
|
|
#define __BTN_MISC 0x100
|
|
#define __BTN_LEFT 0x110
|
|
#define __BTN_RIGHT 0x111
|
|
#define __BTN_MIDDLE 0x112
|
|
#define __BTN_SIDE 0x113
|
|
#define __BTN_EXTRA 0x114
|
|
#define __BTN_FORWARD 0x115
|
|
#define __BTN_BACK 0x116
|
|
|
|
#define __BTN_TRIGGER 0x120
|
|
#define __BTN_THUMB 0x121
|
|
#define __BTN_THUMB2 0x122
|
|
#define __BTN_TOP 0x123
|
|
#define __BTN_TOP2 0x124
|
|
#define __BTN_PINKIE 0x125
|
|
#define __BTN_BASE 0x126
|
|
#define __BTN_BASE2 0x127
|
|
#define __BTN_BASE3 0x128
|
|
#define __BTN_BASE4 0x129
|
|
#define __BTN_BASE5 0x12a
|
|
#define __BTN_BASE6 0x12b
|
|
|
|
#define __BTN_SOUTH 0x130
|
|
#define __BTN_EAST 0x131
|
|
#define __BTN_C 0x132
|
|
#define __BTN_NORTH 0x133
|
|
#define __BTN_WEST 0x134
|
|
#define __BTN_Z 0x135
|
|
#define __BTN_TL 0x136
|
|
#define __BTN_TR 0x137
|
|
#define __BTN_TL2 0x138
|
|
#define __BTN_TR2 0x139
|
|
#define __BTN_SELECT 0x13a
|
|
#define __BTN_START 0x13b
|
|
#define __BTN_MODE 0x13c
|
|
#define __BTN_THUMBL 0x13d
|
|
#define __BTN_THUMBR 0x13e
|
|
|
|
#define __BUS_USB 0x03
|
|
#define __BUS_I8042 0x11
|
|
|
|
#define __EV_VERSION 0x010001
|
|
|
|
#define __EVIOCGVERSION __IOR('E', 0x01, int)
|
|
#define __EVIOCGID __IOR('E', 0x02, struct __input_id)
|
|
#define __EVIOCGNAME(len) __IOC(__IOC_OUT, 'E', 0x06, len)
|
|
#define __EVIOCGPHYS(len) __IOC(__IOC_OUT, 'E', 0x07, len)
|
|
#define __EVIOCGUNIQ(len) __IOC(__IOC_OUT, 'E', 0x08, len)
|
|
#define __EVIOCGPROP(len) __IOC(__IOC_OUT, 'E', 0x09, len)
|
|
#define __EVIOCGKEY(len) __IOC(__IOC_OUT, 'E', 0x18, len)
|
|
#define __EVIOCGLED(len) __IOC(__IOC_OUT, 'E', 0x19, len)
|
|
#define __EVIOCGSND(len) __IOC(__IOC_OUT, 'E', 0x1A, len)
|
|
#define __EVIOCGSW(len) __IOC(__IOC_OUT, 'E', 0x1B, len)
|
|
#define __EVIOCGBIT(ev, len) __IOC(__IOC_OUT, 'E', 0x20 + (ev), len)
|
|
#define __EVIOCGABS(abs) __IOR('E', 0x40 + (abs), struct __input_absinfo)
|
|
#define __EVIOCGRAB __IOW('E', 0x90, int)
|
|
#define __EVIOCREVOKE __IOW('E', 0x91, int)
|
|
#define __EVIOCSCLOCKID __IOW('E', 0xA0, int)
|
|
|
|
#endif
|