Pre-populate constants with linux event types and codes

This commit is contained in:
Vftdan 2024-08-16 13:03:06 +02:00
parent 85282bed0e
commit cbadc3d85d
5 changed files with 823 additions and 1 deletions

View File

@ -12,7 +12,7 @@ CPPFLAGS += $(shell pkg-config --cflags $(DEPS))
LDLIBS += $(shell pkg-config --libs $(DEPS)) LDLIBS += $(shell pkg-config --libs $(DEPS))
INTERP ?= INTERP ?=
MAIN = main MAIN = main
OBJS = main.o events.o processing.o graph.o config.o hash_table.o module_registry.o nodes/getchar.o nodes/print.o nodes/evdev.o nodes/tee.o OBJS = main.o events.o processing.o graph.o config.o event_code_names.o hash_table.o module_registry.o nodes/getchar.o nodes/print.o nodes/evdev.o nodes/tee.o
all: $(MAIN) all: $(MAIN)

View File

@ -1,5 +1,6 @@
#include <string.h> #include <string.h>
#include "config.h" #include "config.h"
#include "event_code_names.h"
static GraphNodeConfig static GraphNodeConfig
load_single_node_config(const config_setting_t *config_member) load_single_node_config(const config_setting_t *config_member)
@ -255,6 +256,7 @@ load_config(const config_setting_t *config_root, FullConfig *config)
const config_setting_t *constants_config = config_setting_get_member(config_root, "constants"); const config_setting_t *constants_config = config_setting_get_member(config_root, "constants");
const config_setting_t *enums_config = config_setting_get_member(config_root, "enums"); const config_setting_t *enums_config = config_setting_get_member(config_root, "enums");
hash_table_init(&config->constants, NULL); hash_table_init(&config->constants, NULL);
populate_event_codes(&config->constants);
load_constants_section(constants_config, &config->constants); load_constants_section(constants_config, &config->constants);
load_enums_section(enums_config, &config->constants); load_enums_section(enums_config, &config->constants);
config->nodes = load_nodes_section(node_config); config->nodes = load_nodes_section(node_config);

20
event_code_names.c Normal file
View File

@ -0,0 +1,20 @@
#include <linux/input.h>
#include <linux/input-event-codes.h>
#include "event_code_names.h"
void
populate_event_codes(ConstantRegistry * registry)
{
if (!registry) {
return;
}
#define DECLARE_EVENT_CODE(enum_name, prefix_name, unqualified_name) { \
const long long value = prefix_name##_##unqualified_name; \
hash_table_insert(registry, hash_table_key_from_cstr(#prefix_name "_" #unqualified_name), &value); \
hash_table_insert(registry, hash_table_key_from_cstr(#enum_name "." #unqualified_name), &value); \
}
#include "event_code_names.cc"
}

792
event_code_names.cc Normal file
View File

@ -0,0 +1,792 @@
#ifdef DECLARE_EVENT_CODE
DECLARE_EVENT_CODE(input_property, INPUT_PROP, POINTER)
DECLARE_EVENT_CODE(input_property, INPUT_PROP, DIRECT)
DECLARE_EVENT_CODE(input_property, INPUT_PROP, BUTTONPAD)
DECLARE_EVENT_CODE(input_property, INPUT_PROP, SEMI_MT)
DECLARE_EVENT_CODE(input_property, INPUT_PROP, TOPBUTTONPAD)
DECLARE_EVENT_CODE(input_property, INPUT_PROP, POINTING_STICK)
DECLARE_EVENT_CODE(input_property, INPUT_PROP, ACCELEROMETER)
DECLARE_EVENT_CODE(input_property, INPUT_PROP, MAX)
DECLARE_EVENT_CODE(input_property, INPUT_PROP, CNT)
DECLARE_EVENT_CODE(event_type, EV, SYN)
DECLARE_EVENT_CODE(event_type, EV, KEY)
DECLARE_EVENT_CODE(event_type, EV, REL)
DECLARE_EVENT_CODE(event_type, EV, ABS)
DECLARE_EVENT_CODE(event_type, EV, MSC)
DECLARE_EVENT_CODE(event_type, EV, SW)
DECLARE_EVENT_CODE(event_type, EV, LED)
DECLARE_EVENT_CODE(event_type, EV, SND)
DECLARE_EVENT_CODE(event_type, EV, REP)
DECLARE_EVENT_CODE(event_type, EV, FF)
DECLARE_EVENT_CODE(event_type, EV, PWR)
DECLARE_EVENT_CODE(event_type, EV, FF_STATUS)
DECLARE_EVENT_CODE(event_type, EV, MAX)
DECLARE_EVENT_CODE(event_type, EV, CNT)
DECLARE_EVENT_CODE(synchronization_event, SYN, REPORT)
DECLARE_EVENT_CODE(synchronization_event, SYN, CONFIG)
DECLARE_EVENT_CODE(synchronization_event, SYN, MT_REPORT)
DECLARE_EVENT_CODE(synchronization_event, SYN, DROPPED)
DECLARE_EVENT_CODE(synchronization_event, SYN, MAX)
DECLARE_EVENT_CODE(synchronization_event, SYN, CNT)
DECLARE_EVENT_CODE(key_event, KEY, RESERVED)
DECLARE_EVENT_CODE(key_event, KEY, ESC)
DECLARE_EVENT_CODE(key_event, KEY, 1)
DECLARE_EVENT_CODE(key_event, KEY, 2)
DECLARE_EVENT_CODE(key_event, KEY, 3)
DECLARE_EVENT_CODE(key_event, KEY, 4)
DECLARE_EVENT_CODE(key_event, KEY, 5)
DECLARE_EVENT_CODE(key_event, KEY, 6)
DECLARE_EVENT_CODE(key_event, KEY, 7)
DECLARE_EVENT_CODE(key_event, KEY, 8)
DECLARE_EVENT_CODE(key_event, KEY, 9)
DECLARE_EVENT_CODE(key_event, KEY, 0)
DECLARE_EVENT_CODE(key_event, KEY, MINUS)
DECLARE_EVENT_CODE(key_event, KEY, EQUAL)
DECLARE_EVENT_CODE(key_event, KEY, BACKSPACE)
DECLARE_EVENT_CODE(key_event, KEY, TAB)
DECLARE_EVENT_CODE(key_event, KEY, Q)
DECLARE_EVENT_CODE(key_event, KEY, W)
DECLARE_EVENT_CODE(key_event, KEY, E)
DECLARE_EVENT_CODE(key_event, KEY, R)
DECLARE_EVENT_CODE(key_event, KEY, T)
DECLARE_EVENT_CODE(key_event, KEY, Y)
DECLARE_EVENT_CODE(key_event, KEY, U)
DECLARE_EVENT_CODE(key_event, KEY, I)
DECLARE_EVENT_CODE(key_event, KEY, O)
DECLARE_EVENT_CODE(key_event, KEY, P)
DECLARE_EVENT_CODE(key_event, KEY, LEFTBRACE)
DECLARE_EVENT_CODE(key_event, KEY, RIGHTBRACE)
DECLARE_EVENT_CODE(key_event, KEY, ENTER)
DECLARE_EVENT_CODE(key_event, KEY, LEFTCTRL)
DECLARE_EVENT_CODE(key_event, KEY, A)
DECLARE_EVENT_CODE(key_event, KEY, S)
DECLARE_EVENT_CODE(key_event, KEY, D)
DECLARE_EVENT_CODE(key_event, KEY, F)
DECLARE_EVENT_CODE(key_event, KEY, G)
DECLARE_EVENT_CODE(key_event, KEY, H)
DECLARE_EVENT_CODE(key_event, KEY, J)
DECLARE_EVENT_CODE(key_event, KEY, K)
DECLARE_EVENT_CODE(key_event, KEY, L)
DECLARE_EVENT_CODE(key_event, KEY, SEMICOLON)
DECLARE_EVENT_CODE(key_event, KEY, APOSTROPHE)
DECLARE_EVENT_CODE(key_event, KEY, GRAVE)
DECLARE_EVENT_CODE(key_event, KEY, LEFTSHIFT)
DECLARE_EVENT_CODE(key_event, KEY, BACKSLASH)
DECLARE_EVENT_CODE(key_event, KEY, Z)
DECLARE_EVENT_CODE(key_event, KEY, X)
DECLARE_EVENT_CODE(key_event, KEY, C)
DECLARE_EVENT_CODE(key_event, KEY, V)
DECLARE_EVENT_CODE(key_event, KEY, B)
DECLARE_EVENT_CODE(key_event, KEY, N)
DECLARE_EVENT_CODE(key_event, KEY, M)
DECLARE_EVENT_CODE(key_event, KEY, COMMA)
DECLARE_EVENT_CODE(key_event, KEY, DOT)
DECLARE_EVENT_CODE(key_event, KEY, SLASH)
DECLARE_EVENT_CODE(key_event, KEY, RIGHTSHIFT)
DECLARE_EVENT_CODE(key_event, KEY, KPASTERISK)
DECLARE_EVENT_CODE(key_event, KEY, LEFTALT)
DECLARE_EVENT_CODE(key_event, KEY, SPACE)
DECLARE_EVENT_CODE(key_event, KEY, CAPSLOCK)
DECLARE_EVENT_CODE(key_event, KEY, F1)
DECLARE_EVENT_CODE(key_event, KEY, F2)
DECLARE_EVENT_CODE(key_event, KEY, F3)
DECLARE_EVENT_CODE(key_event, KEY, F4)
DECLARE_EVENT_CODE(key_event, KEY, F5)
DECLARE_EVENT_CODE(key_event, KEY, F6)
DECLARE_EVENT_CODE(key_event, KEY, F7)
DECLARE_EVENT_CODE(key_event, KEY, F8)
DECLARE_EVENT_CODE(key_event, KEY, F9)
DECLARE_EVENT_CODE(key_event, KEY, F10)
DECLARE_EVENT_CODE(key_event, KEY, NUMLOCK)
DECLARE_EVENT_CODE(key_event, KEY, SCROLLLOCK)
DECLARE_EVENT_CODE(key_event, KEY, KP7)
DECLARE_EVENT_CODE(key_event, KEY, KP8)
DECLARE_EVENT_CODE(key_event, KEY, KP9)
DECLARE_EVENT_CODE(key_event, KEY, KPMINUS)
DECLARE_EVENT_CODE(key_event, KEY, KP4)
DECLARE_EVENT_CODE(key_event, KEY, KP5)
DECLARE_EVENT_CODE(key_event, KEY, KP6)
DECLARE_EVENT_CODE(key_event, KEY, KPPLUS)
DECLARE_EVENT_CODE(key_event, KEY, KP1)
DECLARE_EVENT_CODE(key_event, KEY, KP2)
DECLARE_EVENT_CODE(key_event, KEY, KP3)
DECLARE_EVENT_CODE(key_event, KEY, KP0)
DECLARE_EVENT_CODE(key_event, KEY, KPDOT)
DECLARE_EVENT_CODE(key_event, KEY, ZENKAKUHANKAKU)
DECLARE_EVENT_CODE(key_event, KEY, 102ND)
DECLARE_EVENT_CODE(key_event, KEY, F11)
DECLARE_EVENT_CODE(key_event, KEY, F12)
DECLARE_EVENT_CODE(key_event, KEY, RO)
DECLARE_EVENT_CODE(key_event, KEY, KATAKANA)
DECLARE_EVENT_CODE(key_event, KEY, HIRAGANA)
DECLARE_EVENT_CODE(key_event, KEY, HENKAN)
DECLARE_EVENT_CODE(key_event, KEY, KATAKANAHIRAGANA)
DECLARE_EVENT_CODE(key_event, KEY, MUHENKAN)
DECLARE_EVENT_CODE(key_event, KEY, KPJPCOMMA)
DECLARE_EVENT_CODE(key_event, KEY, KPENTER)
DECLARE_EVENT_CODE(key_event, KEY, RIGHTCTRL)
DECLARE_EVENT_CODE(key_event, KEY, KPSLASH)
DECLARE_EVENT_CODE(key_event, KEY, SYSRQ)
DECLARE_EVENT_CODE(key_event, KEY, RIGHTALT)
DECLARE_EVENT_CODE(key_event, KEY, LINEFEED)
DECLARE_EVENT_CODE(key_event, KEY, HOME)
DECLARE_EVENT_CODE(key_event, KEY, UP)
DECLARE_EVENT_CODE(key_event, KEY, PAGEUP)
DECLARE_EVENT_CODE(key_event, KEY, LEFT)
DECLARE_EVENT_CODE(key_event, KEY, RIGHT)
DECLARE_EVENT_CODE(key_event, KEY, END)
DECLARE_EVENT_CODE(key_event, KEY, DOWN)
DECLARE_EVENT_CODE(key_event, KEY, PAGEDOWN)
DECLARE_EVENT_CODE(key_event, KEY, INSERT)
DECLARE_EVENT_CODE(key_event, KEY, DELETE)
DECLARE_EVENT_CODE(key_event, KEY, MACRO)
DECLARE_EVENT_CODE(key_event, KEY, MUTE)
DECLARE_EVENT_CODE(key_event, KEY, VOLUMEDOWN)
DECLARE_EVENT_CODE(key_event, KEY, VOLUMEUP)
DECLARE_EVENT_CODE(key_event, KEY, POWER)
DECLARE_EVENT_CODE(key_event, KEY, KPEQUAL)
DECLARE_EVENT_CODE(key_event, KEY, KPPLUSMINUS)
DECLARE_EVENT_CODE(key_event, KEY, PAUSE)
DECLARE_EVENT_CODE(key_event, KEY, SCALE)
DECLARE_EVENT_CODE(key_event, KEY, KPCOMMA)
DECLARE_EVENT_CODE(key_event, KEY, HANGEUL)
DECLARE_EVENT_CODE(key_event, KEY, HANGUEL)
DECLARE_EVENT_CODE(key_event, KEY, HANJA)
DECLARE_EVENT_CODE(key_event, KEY, YEN)
DECLARE_EVENT_CODE(key_event, KEY, LEFTMETA)
DECLARE_EVENT_CODE(key_event, KEY, RIGHTMETA)
DECLARE_EVENT_CODE(key_event, KEY, COMPOSE)
DECLARE_EVENT_CODE(key_event, KEY, STOP)
DECLARE_EVENT_CODE(key_event, KEY, AGAIN)
DECLARE_EVENT_CODE(key_event, KEY, PROPS)
DECLARE_EVENT_CODE(key_event, KEY, UNDO)
DECLARE_EVENT_CODE(key_event, KEY, FRONT)
DECLARE_EVENT_CODE(key_event, KEY, COPY)
DECLARE_EVENT_CODE(key_event, KEY, OPEN)
DECLARE_EVENT_CODE(key_event, KEY, PASTE)
DECLARE_EVENT_CODE(key_event, KEY, FIND)
DECLARE_EVENT_CODE(key_event, KEY, CUT)
DECLARE_EVENT_CODE(key_event, KEY, HELP)
DECLARE_EVENT_CODE(key_event, KEY, MENU)
DECLARE_EVENT_CODE(key_event, KEY, CALC)
DECLARE_EVENT_CODE(key_event, KEY, SETUP)
DECLARE_EVENT_CODE(key_event, KEY, SLEEP)
DECLARE_EVENT_CODE(key_event, KEY, WAKEUP)
DECLARE_EVENT_CODE(key_event, KEY, FILE)
DECLARE_EVENT_CODE(key_event, KEY, SENDFILE)
DECLARE_EVENT_CODE(key_event, KEY, DELETEFILE)
DECLARE_EVENT_CODE(key_event, KEY, XFER)
DECLARE_EVENT_CODE(key_event, KEY, PROG1)
DECLARE_EVENT_CODE(key_event, KEY, PROG2)
DECLARE_EVENT_CODE(key_event, KEY, WWW)
DECLARE_EVENT_CODE(key_event, KEY, MSDOS)
DECLARE_EVENT_CODE(key_event, KEY, COFFEE)
DECLARE_EVENT_CODE(key_event, KEY, SCREENLOCK)
DECLARE_EVENT_CODE(key_event, KEY, ROTATE_DISPLAY)
DECLARE_EVENT_CODE(key_event, KEY, DIRECTION)
DECLARE_EVENT_CODE(key_event, KEY, CYCLEWINDOWS)
DECLARE_EVENT_CODE(key_event, KEY, MAIL)
DECLARE_EVENT_CODE(key_event, KEY, BOOKMARKS)
DECLARE_EVENT_CODE(key_event, KEY, COMPUTER)
DECLARE_EVENT_CODE(key_event, KEY, BACK)
DECLARE_EVENT_CODE(key_event, KEY, FORWARD)
DECLARE_EVENT_CODE(key_event, KEY, CLOSECD)
DECLARE_EVENT_CODE(key_event, KEY, EJECTCD)
DECLARE_EVENT_CODE(key_event, KEY, EJECTCLOSECD)
DECLARE_EVENT_CODE(key_event, KEY, NEXTSONG)
DECLARE_EVENT_CODE(key_event, KEY, PLAYPAUSE)
DECLARE_EVENT_CODE(key_event, KEY, PREVIOUSSONG)
DECLARE_EVENT_CODE(key_event, KEY, STOPCD)
DECLARE_EVENT_CODE(key_event, KEY, RECORD)
DECLARE_EVENT_CODE(key_event, KEY, REWIND)
DECLARE_EVENT_CODE(key_event, KEY, PHONE)
DECLARE_EVENT_CODE(key_event, KEY, ISO)
DECLARE_EVENT_CODE(key_event, KEY, CONFIG)
DECLARE_EVENT_CODE(key_event, KEY, HOMEPAGE)
DECLARE_EVENT_CODE(key_event, KEY, REFRESH)
DECLARE_EVENT_CODE(key_event, KEY, EXIT)
DECLARE_EVENT_CODE(key_event, KEY, MOVE)
DECLARE_EVENT_CODE(key_event, KEY, EDIT)
DECLARE_EVENT_CODE(key_event, KEY, SCROLLUP)
DECLARE_EVENT_CODE(key_event, KEY, SCROLLDOWN)
DECLARE_EVENT_CODE(key_event, KEY, KPLEFTPAREN)
DECLARE_EVENT_CODE(key_event, KEY, KPRIGHTPAREN)
DECLARE_EVENT_CODE(key_event, KEY, NEW)
DECLARE_EVENT_CODE(key_event, KEY, REDO)
DECLARE_EVENT_CODE(key_event, KEY, F13)
DECLARE_EVENT_CODE(key_event, KEY, F14)
DECLARE_EVENT_CODE(key_event, KEY, F15)
DECLARE_EVENT_CODE(key_event, KEY, F16)
DECLARE_EVENT_CODE(key_event, KEY, F17)
DECLARE_EVENT_CODE(key_event, KEY, F18)
DECLARE_EVENT_CODE(key_event, KEY, F19)
DECLARE_EVENT_CODE(key_event, KEY, F20)
DECLARE_EVENT_CODE(key_event, KEY, F21)
DECLARE_EVENT_CODE(key_event, KEY, F22)
DECLARE_EVENT_CODE(key_event, KEY, F23)
DECLARE_EVENT_CODE(key_event, KEY, F24)
DECLARE_EVENT_CODE(key_event, KEY, PLAYCD)
DECLARE_EVENT_CODE(key_event, KEY, PAUSECD)
DECLARE_EVENT_CODE(key_event, KEY, PROG3)
DECLARE_EVENT_CODE(key_event, KEY, PROG4)
DECLARE_EVENT_CODE(key_event, KEY, DASHBOARD)
DECLARE_EVENT_CODE(key_event, KEY, SUSPEND)
DECLARE_EVENT_CODE(key_event, KEY, CLOSE)
DECLARE_EVENT_CODE(key_event, KEY, PLAY)
DECLARE_EVENT_CODE(key_event, KEY, FASTFORWARD)
DECLARE_EVENT_CODE(key_event, KEY, BASSBOOST)
DECLARE_EVENT_CODE(key_event, KEY, PRINT)
DECLARE_EVENT_CODE(key_event, KEY, HP)
DECLARE_EVENT_CODE(key_event, KEY, CAMERA)
DECLARE_EVENT_CODE(key_event, KEY, SOUND)
DECLARE_EVENT_CODE(key_event, KEY, QUESTION)
DECLARE_EVENT_CODE(key_event, KEY, EMAIL)
DECLARE_EVENT_CODE(key_event, KEY, CHAT)
DECLARE_EVENT_CODE(key_event, KEY, SEARCH)
DECLARE_EVENT_CODE(key_event, KEY, CONNECT)
DECLARE_EVENT_CODE(key_event, KEY, FINANCE)
DECLARE_EVENT_CODE(key_event, KEY, SPORT)
DECLARE_EVENT_CODE(key_event, KEY, SHOP)
DECLARE_EVENT_CODE(key_event, KEY, ALTERASE)
DECLARE_EVENT_CODE(key_event, KEY, CANCEL)
DECLARE_EVENT_CODE(key_event, KEY, BRIGHTNESSDOWN)
DECLARE_EVENT_CODE(key_event, KEY, BRIGHTNESSUP)
DECLARE_EVENT_CODE(key_event, KEY, MEDIA)
DECLARE_EVENT_CODE(key_event, KEY, SWITCHVIDEOMODE)
DECLARE_EVENT_CODE(key_event, KEY, KBDILLUMTOGGLE)
DECLARE_EVENT_CODE(key_event, KEY, KBDILLUMDOWN)
DECLARE_EVENT_CODE(key_event, KEY, KBDILLUMUP)
DECLARE_EVENT_CODE(key_event, KEY, SEND)
DECLARE_EVENT_CODE(key_event, KEY, REPLY)
DECLARE_EVENT_CODE(key_event, KEY, FORWARDMAIL)
DECLARE_EVENT_CODE(key_event, KEY, SAVE)
DECLARE_EVENT_CODE(key_event, KEY, DOCUMENTS)
DECLARE_EVENT_CODE(key_event, KEY, BATTERY)
DECLARE_EVENT_CODE(key_event, KEY, BLUETOOTH)
DECLARE_EVENT_CODE(key_event, KEY, WLAN)
DECLARE_EVENT_CODE(key_event, KEY, UWB)
DECLARE_EVENT_CODE(key_event, KEY, UNKNOWN)
DECLARE_EVENT_CODE(key_event, KEY, VIDEO_NEXT)
DECLARE_EVENT_CODE(key_event, KEY, VIDEO_PREV)
DECLARE_EVENT_CODE(key_event, KEY, BRIGHTNESS_CYCLE)
DECLARE_EVENT_CODE(key_event, KEY, BRIGHTNESS_AUTO)
DECLARE_EVENT_CODE(key_event, KEY, BRIGHTNESS_ZERO)
DECLARE_EVENT_CODE(key_event, KEY, DISPLAY_OFF)
DECLARE_EVENT_CODE(key_event, KEY, WWAN)
DECLARE_EVENT_CODE(key_event, KEY, WIMAX)
DECLARE_EVENT_CODE(key_event, KEY, RFKILL)
DECLARE_EVENT_CODE(key_event, KEY, MICMUTE)
DECLARE_EVENT_CODE(button_event, BTN, MISC)
DECLARE_EVENT_CODE(button_event, BTN, 0)
DECLARE_EVENT_CODE(button_event, BTN, 1)
DECLARE_EVENT_CODE(button_event, BTN, 2)
DECLARE_EVENT_CODE(button_event, BTN, 3)
DECLARE_EVENT_CODE(button_event, BTN, 4)
DECLARE_EVENT_CODE(button_event, BTN, 5)
DECLARE_EVENT_CODE(button_event, BTN, 6)
DECLARE_EVENT_CODE(button_event, BTN, 7)
DECLARE_EVENT_CODE(button_event, BTN, 8)
DECLARE_EVENT_CODE(button_event, BTN, 9)
DECLARE_EVENT_CODE(button_event, BTN, MOUSE)
DECLARE_EVENT_CODE(button_event, BTN, LEFT)
DECLARE_EVENT_CODE(button_event, BTN, RIGHT)
DECLARE_EVENT_CODE(button_event, BTN, MIDDLE)
DECLARE_EVENT_CODE(button_event, BTN, SIDE)
DECLARE_EVENT_CODE(button_event, BTN, EXTRA)
DECLARE_EVENT_CODE(button_event, BTN, FORWARD)
DECLARE_EVENT_CODE(button_event, BTN, BACK)
DECLARE_EVENT_CODE(button_event, BTN, TASK)
DECLARE_EVENT_CODE(button_event, BTN, JOYSTICK)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER)
DECLARE_EVENT_CODE(button_event, BTN, THUMB)
DECLARE_EVENT_CODE(button_event, BTN, THUMB2)
DECLARE_EVENT_CODE(button_event, BTN, TOP)
DECLARE_EVENT_CODE(button_event, BTN, TOP2)
DECLARE_EVENT_CODE(button_event, BTN, PINKIE)
DECLARE_EVENT_CODE(button_event, BTN, BASE)
DECLARE_EVENT_CODE(button_event, BTN, BASE2)
DECLARE_EVENT_CODE(button_event, BTN, BASE3)
DECLARE_EVENT_CODE(button_event, BTN, BASE4)
DECLARE_EVENT_CODE(button_event, BTN, BASE5)
DECLARE_EVENT_CODE(button_event, BTN, BASE6)
DECLARE_EVENT_CODE(button_event, BTN, DEAD)
DECLARE_EVENT_CODE(button_event, BTN, GAMEPAD)
DECLARE_EVENT_CODE(button_event, BTN, SOUTH)
DECLARE_EVENT_CODE(button_event, BTN, A)
DECLARE_EVENT_CODE(button_event, BTN, EAST)
DECLARE_EVENT_CODE(button_event, BTN, B)
DECLARE_EVENT_CODE(button_event, BTN, C)
DECLARE_EVENT_CODE(button_event, BTN, NORTH)
DECLARE_EVENT_CODE(button_event, BTN, X)
DECLARE_EVENT_CODE(button_event, BTN, WEST)
DECLARE_EVENT_CODE(button_event, BTN, Y)
DECLARE_EVENT_CODE(button_event, BTN, Z)
DECLARE_EVENT_CODE(button_event, BTN, TL)
DECLARE_EVENT_CODE(button_event, BTN, TR)
DECLARE_EVENT_CODE(button_event, BTN, TL2)
DECLARE_EVENT_CODE(button_event, BTN, TR2)
DECLARE_EVENT_CODE(button_event, BTN, SELECT)
DECLARE_EVENT_CODE(button_event, BTN, START)
DECLARE_EVENT_CODE(button_event, BTN, MODE)
DECLARE_EVENT_CODE(button_event, BTN, THUMBL)
DECLARE_EVENT_CODE(button_event, BTN, THUMBR)
DECLARE_EVENT_CODE(button_event, BTN, DIGI)
DECLARE_EVENT_CODE(button_event, BTN, TOOL_PEN)
DECLARE_EVENT_CODE(button_event, BTN, TOOL_RUBBER)
DECLARE_EVENT_CODE(button_event, BTN, TOOL_BRUSH)
DECLARE_EVENT_CODE(button_event, BTN, TOOL_PENCIL)
DECLARE_EVENT_CODE(button_event, BTN, TOOL_AIRBRUSH)
DECLARE_EVENT_CODE(button_event, BTN, TOOL_FINGER)
DECLARE_EVENT_CODE(button_event, BTN, TOOL_MOUSE)
DECLARE_EVENT_CODE(button_event, BTN, TOOL_LENS)
DECLARE_EVENT_CODE(button_event, BTN, TOOL_QUINTTAP)
DECLARE_EVENT_CODE(button_event, BTN, STYLUS3)
DECLARE_EVENT_CODE(button_event, BTN, TOUCH)
DECLARE_EVENT_CODE(button_event, BTN, STYLUS)
DECLARE_EVENT_CODE(button_event, BTN, STYLUS2)
DECLARE_EVENT_CODE(button_event, BTN, TOOL_DOUBLETAP)
DECLARE_EVENT_CODE(button_event, BTN, TOOL_TRIPLETAP)
DECLARE_EVENT_CODE(button_event, BTN, TOOL_QUADTAP)
DECLARE_EVENT_CODE(button_event, BTN, WHEEL)
DECLARE_EVENT_CODE(button_event, BTN, GEAR_DOWN)
DECLARE_EVENT_CODE(button_event, BTN, GEAR_UP)
DECLARE_EVENT_CODE(key_event, KEY, OK)
DECLARE_EVENT_CODE(key_event, KEY, SELECT)
DECLARE_EVENT_CODE(key_event, KEY, GOTO)
DECLARE_EVENT_CODE(key_event, KEY, CLEAR)
DECLARE_EVENT_CODE(key_event, KEY, POWER2)
DECLARE_EVENT_CODE(key_event, KEY, OPTION)
DECLARE_EVENT_CODE(key_event, KEY, INFO)
DECLARE_EVENT_CODE(key_event, KEY, TIME)
DECLARE_EVENT_CODE(key_event, KEY, VENDOR)
DECLARE_EVENT_CODE(key_event, KEY, ARCHIVE)
DECLARE_EVENT_CODE(key_event, KEY, PROGRAM)
DECLARE_EVENT_CODE(key_event, KEY, CHANNEL)
DECLARE_EVENT_CODE(key_event, KEY, FAVORITES)
DECLARE_EVENT_CODE(key_event, KEY, EPG)
DECLARE_EVENT_CODE(key_event, KEY, PVR)
DECLARE_EVENT_CODE(key_event, KEY, MHP)
DECLARE_EVENT_CODE(key_event, KEY, LANGUAGE)
DECLARE_EVENT_CODE(key_event, KEY, TITLE)
DECLARE_EVENT_CODE(key_event, KEY, SUBTITLE)
DECLARE_EVENT_CODE(key_event, KEY, ANGLE)
DECLARE_EVENT_CODE(key_event, KEY, FULL_SCREEN)
DECLARE_EVENT_CODE(key_event, KEY, ZOOM)
DECLARE_EVENT_CODE(key_event, KEY, MODE)
DECLARE_EVENT_CODE(key_event, KEY, KEYBOARD)
DECLARE_EVENT_CODE(key_event, KEY, ASPECT_RATIO)
DECLARE_EVENT_CODE(key_event, KEY, SCREEN)
DECLARE_EVENT_CODE(key_event, KEY, PC)
DECLARE_EVENT_CODE(key_event, KEY, TV)
DECLARE_EVENT_CODE(key_event, KEY, TV2)
DECLARE_EVENT_CODE(key_event, KEY, VCR)
DECLARE_EVENT_CODE(key_event, KEY, VCR2)
DECLARE_EVENT_CODE(key_event, KEY, SAT)
DECLARE_EVENT_CODE(key_event, KEY, SAT2)
DECLARE_EVENT_CODE(key_event, KEY, CD)
DECLARE_EVENT_CODE(key_event, KEY, TAPE)
DECLARE_EVENT_CODE(key_event, KEY, RADIO)
DECLARE_EVENT_CODE(key_event, KEY, TUNER)
DECLARE_EVENT_CODE(key_event, KEY, PLAYER)
DECLARE_EVENT_CODE(key_event, KEY, TEXT)
DECLARE_EVENT_CODE(key_event, KEY, DVD)
DECLARE_EVENT_CODE(key_event, KEY, AUX)
DECLARE_EVENT_CODE(key_event, KEY, MP3)
DECLARE_EVENT_CODE(key_event, KEY, AUDIO)
DECLARE_EVENT_CODE(key_event, KEY, VIDEO)
DECLARE_EVENT_CODE(key_event, KEY, DIRECTORY)
DECLARE_EVENT_CODE(key_event, KEY, LIST)
DECLARE_EVENT_CODE(key_event, KEY, MEMO)
DECLARE_EVENT_CODE(key_event, KEY, CALENDAR)
DECLARE_EVENT_CODE(key_event, KEY, RED)
DECLARE_EVENT_CODE(key_event, KEY, GREEN)
DECLARE_EVENT_CODE(key_event, KEY, YELLOW)
DECLARE_EVENT_CODE(key_event, KEY, BLUE)
DECLARE_EVENT_CODE(key_event, KEY, CHANNELUP)
DECLARE_EVENT_CODE(key_event, KEY, CHANNELDOWN)
DECLARE_EVENT_CODE(key_event, KEY, FIRST)
DECLARE_EVENT_CODE(key_event, KEY, LAST)
DECLARE_EVENT_CODE(key_event, KEY, AB)
DECLARE_EVENT_CODE(key_event, KEY, NEXT)
DECLARE_EVENT_CODE(key_event, KEY, RESTART)
DECLARE_EVENT_CODE(key_event, KEY, SLOW)
DECLARE_EVENT_CODE(key_event, KEY, SHUFFLE)
DECLARE_EVENT_CODE(key_event, KEY, BREAK)
DECLARE_EVENT_CODE(key_event, KEY, PREVIOUS)
DECLARE_EVENT_CODE(key_event, KEY, DIGITS)
DECLARE_EVENT_CODE(key_event, KEY, TEEN)
DECLARE_EVENT_CODE(key_event, KEY, TWEN)
DECLARE_EVENT_CODE(key_event, KEY, VIDEOPHONE)
DECLARE_EVENT_CODE(key_event, KEY, GAMES)
DECLARE_EVENT_CODE(key_event, KEY, ZOOMIN)
DECLARE_EVENT_CODE(key_event, KEY, ZOOMOUT)
DECLARE_EVENT_CODE(key_event, KEY, ZOOMRESET)
DECLARE_EVENT_CODE(key_event, KEY, WORDPROCESSOR)
DECLARE_EVENT_CODE(key_event, KEY, EDITOR)
DECLARE_EVENT_CODE(key_event, KEY, SPREADSHEET)
DECLARE_EVENT_CODE(key_event, KEY, GRAPHICSEDITOR)
DECLARE_EVENT_CODE(key_event, KEY, PRESENTATION)
DECLARE_EVENT_CODE(key_event, KEY, DATABASE)
DECLARE_EVENT_CODE(key_event, KEY, NEWS)
DECLARE_EVENT_CODE(key_event, KEY, VOICEMAIL)
DECLARE_EVENT_CODE(key_event, KEY, ADDRESSBOOK)
DECLARE_EVENT_CODE(key_event, KEY, MESSENGER)
DECLARE_EVENT_CODE(key_event, KEY, DISPLAYTOGGLE)
DECLARE_EVENT_CODE(key_event, KEY, BRIGHTNESS_TOGGLE)
DECLARE_EVENT_CODE(key_event, KEY, SPELLCHECK)
DECLARE_EVENT_CODE(key_event, KEY, LOGOFF)
DECLARE_EVENT_CODE(key_event, KEY, DOLLAR)
DECLARE_EVENT_CODE(key_event, KEY, EURO)
DECLARE_EVENT_CODE(key_event, KEY, FRAMEBACK)
DECLARE_EVENT_CODE(key_event, KEY, FRAMEFORWARD)
DECLARE_EVENT_CODE(key_event, KEY, CONTEXT_MENU)
DECLARE_EVENT_CODE(key_event, KEY, MEDIA_REPEAT)
DECLARE_EVENT_CODE(key_event, KEY, 10CHANNELSUP)
DECLARE_EVENT_CODE(key_event, KEY, 10CHANNELSDOWN)
DECLARE_EVENT_CODE(key_event, KEY, IMAGES)
DECLARE_EVENT_CODE(key_event, KEY, DEL_EOL)
DECLARE_EVENT_CODE(key_event, KEY, DEL_EOS)
DECLARE_EVENT_CODE(key_event, KEY, INS_LINE)
DECLARE_EVENT_CODE(key_event, KEY, DEL_LINE)
DECLARE_EVENT_CODE(key_event, KEY, FN)
DECLARE_EVENT_CODE(key_event, KEY, FN_ESC)
DECLARE_EVENT_CODE(key_event, KEY, FN_F1)
DECLARE_EVENT_CODE(key_event, KEY, FN_F2)
DECLARE_EVENT_CODE(key_event, KEY, FN_F3)
DECLARE_EVENT_CODE(key_event, KEY, FN_F4)
DECLARE_EVENT_CODE(key_event, KEY, FN_F5)
DECLARE_EVENT_CODE(key_event, KEY, FN_F6)
DECLARE_EVENT_CODE(key_event, KEY, FN_F7)
DECLARE_EVENT_CODE(key_event, KEY, FN_F8)
DECLARE_EVENT_CODE(key_event, KEY, FN_F9)
DECLARE_EVENT_CODE(key_event, KEY, FN_F10)
DECLARE_EVENT_CODE(key_event, KEY, FN_F11)
DECLARE_EVENT_CODE(key_event, KEY, FN_F12)
DECLARE_EVENT_CODE(key_event, KEY, FN_1)
DECLARE_EVENT_CODE(key_event, KEY, FN_2)
DECLARE_EVENT_CODE(key_event, KEY, FN_D)
DECLARE_EVENT_CODE(key_event, KEY, FN_E)
DECLARE_EVENT_CODE(key_event, KEY, FN_F)
DECLARE_EVENT_CODE(key_event, KEY, FN_S)
DECLARE_EVENT_CODE(key_event, KEY, FN_B)
DECLARE_EVENT_CODE(key_event, KEY, BRL_DOT1)
DECLARE_EVENT_CODE(key_event, KEY, BRL_DOT2)
DECLARE_EVENT_CODE(key_event, KEY, BRL_DOT3)
DECLARE_EVENT_CODE(key_event, KEY, BRL_DOT4)
DECLARE_EVENT_CODE(key_event, KEY, BRL_DOT5)
DECLARE_EVENT_CODE(key_event, KEY, BRL_DOT6)
DECLARE_EVENT_CODE(key_event, KEY, BRL_DOT7)
DECLARE_EVENT_CODE(key_event, KEY, BRL_DOT8)
DECLARE_EVENT_CODE(key_event, KEY, BRL_DOT9)
DECLARE_EVENT_CODE(key_event, KEY, BRL_DOT10)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_0)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_1)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_2)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_3)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_4)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_5)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_6)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_7)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_8)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_9)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_STAR)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_POUND)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_A)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_B)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_C)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_D)
DECLARE_EVENT_CODE(key_event, KEY, CAMERA_FOCUS)
DECLARE_EVENT_CODE(key_event, KEY, WPS_BUTTON)
DECLARE_EVENT_CODE(key_event, KEY, TOUCHPAD_TOGGLE)
DECLARE_EVENT_CODE(key_event, KEY, TOUCHPAD_ON)
DECLARE_EVENT_CODE(key_event, KEY, TOUCHPAD_OFF)
DECLARE_EVENT_CODE(key_event, KEY, CAMERA_ZOOMIN)
DECLARE_EVENT_CODE(key_event, KEY, CAMERA_ZOOMOUT)
DECLARE_EVENT_CODE(key_event, KEY, CAMERA_UP)
DECLARE_EVENT_CODE(key_event, KEY, CAMERA_DOWN)
DECLARE_EVENT_CODE(key_event, KEY, CAMERA_LEFT)
DECLARE_EVENT_CODE(key_event, KEY, CAMERA_RIGHT)
DECLARE_EVENT_CODE(key_event, KEY, ATTENDANT_ON)
DECLARE_EVENT_CODE(key_event, KEY, ATTENDANT_OFF)
DECLARE_EVENT_CODE(key_event, KEY, ATTENDANT_TOGGLE)
DECLARE_EVENT_CODE(key_event, KEY, LIGHTS_TOGGLE)
DECLARE_EVENT_CODE(button_event, BTN, DPAD_UP)
DECLARE_EVENT_CODE(button_event, BTN, DPAD_DOWN)
DECLARE_EVENT_CODE(button_event, BTN, DPAD_LEFT)
DECLARE_EVENT_CODE(button_event, BTN, DPAD_RIGHT)
DECLARE_EVENT_CODE(key_event, KEY, ALS_TOGGLE)
DECLARE_EVENT_CODE(key_event, KEY, ROTATE_LOCK_TOGGLE)
DECLARE_EVENT_CODE(key_event, KEY, BUTTONCONFIG)
DECLARE_EVENT_CODE(key_event, KEY, TASKMANAGER)
DECLARE_EVENT_CODE(key_event, KEY, JOURNAL)
DECLARE_EVENT_CODE(key_event, KEY, CONTROLPANEL)
DECLARE_EVENT_CODE(key_event, KEY, APPSELECT)
DECLARE_EVENT_CODE(key_event, KEY, SCREENSAVER)
DECLARE_EVENT_CODE(key_event, KEY, VOICECOMMAND)
DECLARE_EVENT_CODE(key_event, KEY, ASSISTANT)
DECLARE_EVENT_CODE(key_event, KEY, KBD_LAYOUT_NEXT)
DECLARE_EVENT_CODE(key_event, KEY, BRIGHTNESS_MIN)
DECLARE_EVENT_CODE(key_event, KEY, BRIGHTNESS_MAX)
DECLARE_EVENT_CODE(key_event, KEY, KBDINPUTASSIST_PREV)
DECLARE_EVENT_CODE(key_event, KEY, KBDINPUTASSIST_NEXT)
DECLARE_EVENT_CODE(key_event, KEY, KBDINPUTASSIST_PREVGROUP)
DECLARE_EVENT_CODE(key_event, KEY, KBDINPUTASSIST_NEXTGROUP)
DECLARE_EVENT_CODE(key_event, KEY, KBDINPUTASSIST_ACCEPT)
DECLARE_EVENT_CODE(key_event, KEY, KBDINPUTASSIST_CANCEL)
DECLARE_EVENT_CODE(key_event, KEY, RIGHT_UP)
DECLARE_EVENT_CODE(key_event, KEY, RIGHT_DOWN)
DECLARE_EVENT_CODE(key_event, KEY, LEFT_UP)
DECLARE_EVENT_CODE(key_event, KEY, LEFT_DOWN)
DECLARE_EVENT_CODE(key_event, KEY, ROOT_MENU)
DECLARE_EVENT_CODE(key_event, KEY, MEDIA_TOP_MENU)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_11)
DECLARE_EVENT_CODE(key_event, KEY, NUMERIC_12)
DECLARE_EVENT_CODE(key_event, KEY, AUDIO_DESC)
DECLARE_EVENT_CODE(key_event, KEY, 3D_MODE)
DECLARE_EVENT_CODE(key_event, KEY, NEXT_FAVORITE)
DECLARE_EVENT_CODE(key_event, KEY, STOP_RECORD)
DECLARE_EVENT_CODE(key_event, KEY, PAUSE_RECORD)
DECLARE_EVENT_CODE(key_event, KEY, VOD)
DECLARE_EVENT_CODE(key_event, KEY, UNMUTE)
DECLARE_EVENT_CODE(key_event, KEY, FASTREVERSE)
DECLARE_EVENT_CODE(key_event, KEY, SLOWREVERSE)
DECLARE_EVENT_CODE(key_event, KEY, DATA)
DECLARE_EVENT_CODE(key_event, KEY, ONSCREEN_KEYBOARD)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY1)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY2)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY3)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY4)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY5)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY6)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY7)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY8)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY9)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY10)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY11)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY12)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY13)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY14)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY15)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY16)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY17)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY18)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY19)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY20)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY21)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY22)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY23)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY24)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY25)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY26)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY27)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY28)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY29)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY30)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY31)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY32)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY33)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY34)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY35)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY36)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY37)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY38)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY39)
DECLARE_EVENT_CODE(button_event, BTN, TRIGGER_HAPPY40)
DECLARE_EVENT_CODE(key_event, KEY, MIN_INTERESTING)
DECLARE_EVENT_CODE(key_event, KEY, MAX)
DECLARE_EVENT_CODE(key_event, KEY, CNT)
DECLARE_EVENT_CODE(relative_axis, REL, X)
DECLARE_EVENT_CODE(relative_axis, REL, Y)
DECLARE_EVENT_CODE(relative_axis, REL, Z)
DECLARE_EVENT_CODE(relative_axis, REL, RX)
DECLARE_EVENT_CODE(relative_axis, REL, RY)
DECLARE_EVENT_CODE(relative_axis, REL, RZ)
DECLARE_EVENT_CODE(relative_axis, REL, HWHEEL)
DECLARE_EVENT_CODE(relative_axis, REL, DIAL)
DECLARE_EVENT_CODE(relative_axis, REL, WHEEL)
DECLARE_EVENT_CODE(relative_axis, REL, MISC)
DECLARE_EVENT_CODE(relative_axis, REL, RESERVED)
DECLARE_EVENT_CODE(relative_axis, REL, WHEEL_HI_RES)
DECLARE_EVENT_CODE(relative_axis, REL, HWHEEL_HI_RES)
DECLARE_EVENT_CODE(relative_axis, REL, MAX)
DECLARE_EVENT_CODE(relative_axis, REL, CNT)
DECLARE_EVENT_CODE(absolute_axis, ABS, X)
DECLARE_EVENT_CODE(absolute_axis, ABS, Y)
DECLARE_EVENT_CODE(absolute_axis, ABS, Z)
DECLARE_EVENT_CODE(absolute_axis, ABS, RX)
DECLARE_EVENT_CODE(absolute_axis, ABS, RY)
DECLARE_EVENT_CODE(absolute_axis, ABS, RZ)
DECLARE_EVENT_CODE(absolute_axis, ABS, THROTTLE)
DECLARE_EVENT_CODE(absolute_axis, ABS, RUDDER)
DECLARE_EVENT_CODE(absolute_axis, ABS, WHEEL)
DECLARE_EVENT_CODE(absolute_axis, ABS, GAS)
DECLARE_EVENT_CODE(absolute_axis, ABS, BRAKE)
DECLARE_EVENT_CODE(absolute_axis, ABS, HAT0X)
DECLARE_EVENT_CODE(absolute_axis, ABS, HAT0Y)
DECLARE_EVENT_CODE(absolute_axis, ABS, HAT1X)
DECLARE_EVENT_CODE(absolute_axis, ABS, HAT1Y)
DECLARE_EVENT_CODE(absolute_axis, ABS, HAT2X)
DECLARE_EVENT_CODE(absolute_axis, ABS, HAT2Y)
DECLARE_EVENT_CODE(absolute_axis, ABS, HAT3X)
DECLARE_EVENT_CODE(absolute_axis, ABS, HAT3Y)
DECLARE_EVENT_CODE(absolute_axis, ABS, PRESSURE)
DECLARE_EVENT_CODE(absolute_axis, ABS, DISTANCE)
DECLARE_EVENT_CODE(absolute_axis, ABS, TILT_X)
DECLARE_EVENT_CODE(absolute_axis, ABS, TILT_Y)
DECLARE_EVENT_CODE(absolute_axis, ABS, TOOL_WIDTH)
DECLARE_EVENT_CODE(absolute_axis, ABS, VOLUME)
DECLARE_EVENT_CODE(absolute_axis, ABS, MISC)
DECLARE_EVENT_CODE(absolute_axis, ABS, RESERVED)
DECLARE_EVENT_CODE(absolute_axis, ABS, MT_SLOT)
DECLARE_EVENT_CODE(absolute_axis, ABS, MT_TOUCH_MAJOR)
DECLARE_EVENT_CODE(absolute_axis, ABS, MT_TOUCH_MINOR)
DECLARE_EVENT_CODE(absolute_axis, ABS, MT_WIDTH_MAJOR)
DECLARE_EVENT_CODE(absolute_axis, ABS, MT_WIDTH_MINOR)
DECLARE_EVENT_CODE(absolute_axis, ABS, MT_ORIENTATION)
DECLARE_EVENT_CODE(absolute_axis, ABS, MT_POSITION_X)
DECLARE_EVENT_CODE(absolute_axis, ABS, MT_POSITION_Y)
DECLARE_EVENT_CODE(absolute_axis, ABS, MT_TOOL_TYPE)
DECLARE_EVENT_CODE(absolute_axis, ABS, MT_BLOB_ID)
DECLARE_EVENT_CODE(absolute_axis, ABS, MT_TRACKING_ID)
DECLARE_EVENT_CODE(absolute_axis, ABS, MT_PRESSURE)
DECLARE_EVENT_CODE(absolute_axis, ABS, MT_DISTANCE)
DECLARE_EVENT_CODE(absolute_axis, ABS, MT_TOOL_X)
DECLARE_EVENT_CODE(absolute_axis, ABS, MT_TOOL_Y)
DECLARE_EVENT_CODE(absolute_axis, ABS, MAX)
DECLARE_EVENT_CODE(absolute_axis, ABS, CNT)
DECLARE_EVENT_CODE(switch_event, SW, LID)
DECLARE_EVENT_CODE(switch_event, SW, TABLET_MODE)
DECLARE_EVENT_CODE(switch_event, SW, HEADPHONE_INSERT)
DECLARE_EVENT_CODE(switch_event, SW, RFKILL_ALL)
DECLARE_EVENT_CODE(switch_event, SW, RADIO)
DECLARE_EVENT_CODE(switch_event, SW, MICROPHONE_INSERT)
DECLARE_EVENT_CODE(switch_event, SW, DOCK)
DECLARE_EVENT_CODE(switch_event, SW, LINEOUT_INSERT)
DECLARE_EVENT_CODE(switch_event, SW, JACK_PHYSICAL_INSERT)
DECLARE_EVENT_CODE(switch_event, SW, VIDEOOUT_INSERT)
DECLARE_EVENT_CODE(switch_event, SW, CAMERA_LENS_COVER)
DECLARE_EVENT_CODE(switch_event, SW, KEYPAD_SLIDE)
DECLARE_EVENT_CODE(switch_event, SW, FRONT_PROXIMITY)
DECLARE_EVENT_CODE(switch_event, SW, ROTATE_LOCK)
DECLARE_EVENT_CODE(switch_event, SW, LINEIN_INSERT)
DECLARE_EVENT_CODE(switch_event, SW, MUTE_DEVICE)
DECLARE_EVENT_CODE(switch_event, SW, PEN_INSERTED)
DECLARE_EVENT_CODE(switch_event, SW, MACHINE_COVER)
DECLARE_EVENT_CODE(switch_event, SW, MAX)
DECLARE_EVENT_CODE(switch_event, SW, CNT)
DECLARE_EVENT_CODE(misc_event, MSC, SERIAL)
DECLARE_EVENT_CODE(misc_event, MSC, PULSELED)
DECLARE_EVENT_CODE(misc_event, MSC, GESTURE)
DECLARE_EVENT_CODE(misc_event, MSC, RAW)
DECLARE_EVENT_CODE(misc_event, MSC, SCAN)
DECLARE_EVENT_CODE(misc_event, MSC, TIMESTAMP)
DECLARE_EVENT_CODE(misc_event, MSC, MAX)
DECLARE_EVENT_CODE(misc_event, MSC, CNT)
DECLARE_EVENT_CODE(led_event, LED, NUML)
DECLARE_EVENT_CODE(led_event, LED, CAPSL)
DECLARE_EVENT_CODE(led_event, LED, SCROLLL)
DECLARE_EVENT_CODE(led_event, LED, COMPOSE)
DECLARE_EVENT_CODE(led_event, LED, KANA)
DECLARE_EVENT_CODE(led_event, LED, SLEEP)
DECLARE_EVENT_CODE(led_event, LED, SUSPEND)
DECLARE_EVENT_CODE(led_event, LED, MUTE)
DECLARE_EVENT_CODE(led_event, LED, MISC)
DECLARE_EVENT_CODE(led_event, LED, MAIL)
DECLARE_EVENT_CODE(led_event, LED, CHARGING)
DECLARE_EVENT_CODE(led_event, LED, MAX)
DECLARE_EVENT_CODE(led_event, LED, CNT)
DECLARE_EVENT_CODE(repeat_event, REP, DELAY)
DECLARE_EVENT_CODE(repeat_event, REP, PERIOD)
DECLARE_EVENT_CODE(repeat_event, REP, MAX)
DECLARE_EVENT_CODE(repeat_event, REP, CNT)
DECLARE_EVENT_CODE(sound_event, SND, CLICK)
DECLARE_EVENT_CODE(sound_event, SND, BELL)
DECLARE_EVENT_CODE(sound_event, SND, TONE)
DECLARE_EVENT_CODE(sound_event, SND, MAX)
DECLARE_EVENT_CODE(sound_event, SND, CNT)
DECLARE_EVENT_CODE(force_feedback_status, FF_STATUS, STOPPED)
DECLARE_EVENT_CODE(force_feedback_status, FF_STATUS, PLAYING)
DECLARE_EVENT_CODE(force_feedback_status, FF_STATUS, MAX)
DECLARE_EVENT_CODE(force_feedback, FF, RUMBLE)
DECLARE_EVENT_CODE(force_feedback, FF, PERIODIC)
DECLARE_EVENT_CODE(force_feedback, FF, CONSTANT)
DECLARE_EVENT_CODE(force_feedback, FF, SPRING)
DECLARE_EVENT_CODE(force_feedback, FF, FRICTION)
DECLARE_EVENT_CODE(force_feedback, FF, DAMPER)
DECLARE_EVENT_CODE(force_feedback, FF, INERTIA)
DECLARE_EVENT_CODE(force_feedback, FF, RAMP)
DECLARE_EVENT_CODE(force_feedback, FF, EFFECT_MIN)
DECLARE_EVENT_CODE(force_feedback, FF, EFFECT_MAX)
DECLARE_EVENT_CODE(force_feedback, FF, SQUARE)
DECLARE_EVENT_CODE(force_feedback, FF, TRIANGLE)
DECLARE_EVENT_CODE(force_feedback, FF, SINE)
DECLARE_EVENT_CODE(force_feedback, FF, SAW_UP)
DECLARE_EVENT_CODE(force_feedback, FF, SAW_DOWN)
DECLARE_EVENT_CODE(force_feedback, FF, CUSTOM)
DECLARE_EVENT_CODE(force_feedback, FF, WAVEFORM_MIN)
DECLARE_EVENT_CODE(force_feedback, FF, WAVEFORM_MAX)
DECLARE_EVENT_CODE(force_feedback, FF, GAIN)
DECLARE_EVENT_CODE(force_feedback, FF, AUTOCENTER)
DECLARE_EVENT_CODE(force_feedback, FF, MAX_EFFECTS)
DECLARE_EVENT_CODE(force_feedback, FF, MAX)
DECLARE_EVENT_CODE(force_feedback, FF, CNT)
#endif

8
event_code_names.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef EVENT_CODE_NAMES_H_
#define EVENT_CODE_NAMES_H_
#include "config.h"
void populate_event_codes(ConstantRegistry * registry);
#endif /* end of include guard: EVENT_CODE_NAMES_H_ */