You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1311 lines
34 KiB
Lua

-- Auto generated file by gen_events.rb, do not edit!
local base = string.match(..., "(.-)[^%.]+%.[^%.]+$")
local bit = require("bit")
local eh = require(base.."helper.enum")
local ffi = require("ffi")
local ioctl_mod = require(base.."helper.ioctl")
local ioctl, nrshift, sizeshift = ioctl_mod.ioctl, ioctl_mod.nrshift, ioctl_mod.sizeshift
local lshift = bit.lshift
local ffi_cast, ffi_sizeof = ffi.cast, ffi.sizeof
local tostring = tostring
ffi.cdef[[
typedef unsigned long __kernel_ulong_t;
typedef int8_t __s8; typedef uint8_t __u8;
typedef int16_t __s16; typedef uint16_t __u16;
typedef int32_t __s32; typedef uint32_t __u32;
typedef int64_t __s64; typedef uint64_t __u64;
struct input_event {
__kernel_ulong_t __sec;
__kernel_ulong_t __usec;
__u16 type;
__u16 code;
__s32 value;
};
struct input_id {
__u16 bustype;
__u16 vendor;
__u16 product;
__u16 version;
};
struct input_absinfo {
__s32 value;
__s32 minimum;
__s32 maximum;
__s32 fuzz;
__s32 flat;
__s32 resolution;
};
struct input_keymap_entry {
__u8 flags;
__u8 len;
__u16 index;
__u32 keycode;
__u8 scancode[32];
};
struct input_mask {
__u32 type;
__u32 codes_size;
__u64 codes_ptr;
};
struct ff_replay {
__u16 length;
__u16 delay;
};
struct ff_trigger {
__u16 button;
__u16 interval;
};
struct ff_envelope {
__u16 attack_length;
__u16 attack_level;
__u16 fade_length;
__u16 fade_level;
};
struct ff_constant_effect {
__s16 level;
struct ff_envelope envelope;
};
struct ff_ramp_effect {
__s16 start_level;
__s16 end_level;
struct ff_envelope envelope;
};
struct ff_condition_effect {
__u16 right_saturation;
__u16 left_saturation;
__s16 right_coeff;
__s16 left_coeff;
__u16 deadband;
__s16 center;
};
struct ff_periodic_effect {
__u16 waveform;
__u16 period;
__s16 magnitude;
__s16 offset;
__u16 phase;
struct ff_envelope envelope;
__u32 custom_len;
__s16 *custom_data;
};
struct ff_rumble_effect {
__u16 strong_magnitude;
__u16 weak_magnitude;
};
struct ff_effect {
__u16 type;
__s16 id;
__u16 direction;
struct ff_trigger trigger;
struct ff_replay replay;
union {
struct ff_constant_effect constant;
struct ff_ramp_effect ramp;
struct ff_periodic_effect periodic;
struct ff_condition_effect condition[2];
struct ff_rumble_effect rumble;
} u;
};
struct uinput_ff_upload {
__u32 request_id;
__s32 retval;
struct ff_effect effect;
struct ff_effect old;
};
struct uinput_ff_erase {
__u32 request_id;
__s32 retval;
__u32 effect_id;
};
struct uinput_setup {
struct input_id id;
char name[80];
__u32 ff_effects_max;
};
struct uinput_abs_setup {
__u16 code;
struct input_absinfo absinfo;
};
struct uinput_user_dev {
char name[80];
struct input_id id;
__u32 ff_effects_max;
__s32 absmax[(0x3f+1)];
__s32 absmin[(0x3f+1)];
__s32 absfuzz[(0x3f+1)];
__s32 absflat[(0x3f+1)];
};
]]
local enums = {}
enums.KEY = eh.make_enum{
{"KEY_RESERVED", 0},
{"KEY_ESC", 1},
{"KEY_1", 2},
{"KEY_2", 3},
{"KEY_3", 4},
{"KEY_4", 5},
{"KEY_5", 6},
{"KEY_6", 7},
{"KEY_7", 8},
{"KEY_8", 9},
{"KEY_9", 10},
{"KEY_0", 11},
{"KEY_MINUS", 12},
{"KEY_EQUAL", 13},
{"KEY_BACKSPACE", 14},
{"KEY_TAB", 15},
{"KEY_Q", 16},
{"KEY_W", 17},
{"KEY_E", 18},
{"KEY_R", 19},
{"KEY_T", 20},
{"KEY_Y", 21},
{"KEY_U", 22},
{"KEY_I", 23},
{"KEY_O", 24},
{"KEY_P", 25},
{"KEY_LEFTBRACE", 26},
{"KEY_RIGHTBRACE", 27},
{"KEY_ENTER", 28},
{"KEY_LEFTCTRL", 29},
{"KEY_A", 30},
{"KEY_S", 31},
{"KEY_D", 32},
{"KEY_F", 33},
{"KEY_G", 34},
{"KEY_H", 35},
{"KEY_J", 36},
{"KEY_K", 37},
{"KEY_L", 38},
{"KEY_SEMICOLON", 39},
{"KEY_APOSTROPHE", 40},
{"KEY_GRAVE", 41},
{"KEY_LEFTSHIFT", 42},
{"KEY_BACKSLASH", 43},
{"KEY_Z", 44},
{"KEY_X", 45},
{"KEY_C", 46},
{"KEY_V", 47},
{"KEY_B", 48},
{"KEY_N", 49},
{"KEY_M", 50},
{"KEY_COMMA", 51},
{"KEY_DOT", 52},
{"KEY_SLASH", 53},
{"KEY_RIGHTSHIFT", 54},
{"KEY_KPASTERISK", 55},
{"KEY_LEFTALT", 56},
{"KEY_SPACE", 57},
{"KEY_CAPSLOCK", 58},
{"KEY_F1", 59},
{"KEY_F2", 60},
{"KEY_F3", 61},
{"KEY_F4", 62},
{"KEY_F5", 63},
{"KEY_F6", 64},
{"KEY_F7", 65},
{"KEY_F8", 66},
{"KEY_F9", 67},
{"KEY_F10", 68},
{"KEY_NUMLOCK", 69},
{"KEY_SCROLLLOCK", 70},
{"KEY_KP7", 71},
{"KEY_KP8", 72},
{"KEY_KP9", 73},
{"KEY_KPMINUS", 74},
{"KEY_KP4", 75},
{"KEY_KP5", 76},
{"KEY_KP6", 77},
{"KEY_KPPLUS", 78},
{"KEY_KP1", 79},
{"KEY_KP2", 80},
{"KEY_KP3", 81},
{"KEY_KP0", 82},
{"KEY_KPDOT", 83},
{"KEY_ZENKAKUHANKAKU", 85},
{"KEY_102ND", 86},
{"KEY_F11", 87},
{"KEY_F12", 88},
{"KEY_RO", 89},
{"KEY_KATAKANA", 90},
{"KEY_HIRAGANA", 91},
{"KEY_HENKAN", 92},
{"KEY_KATAKANAHIRAGANA", 93},
{"KEY_MUHENKAN", 94},
{"KEY_KPJPCOMMA", 95},
{"KEY_KPENTER", 96},
{"KEY_RIGHTCTRL", 97},
{"KEY_KPSLASH", 98},
{"KEY_SYSRQ", 99},
{"KEY_RIGHTALT", 100},
{"KEY_LINEFEED", 101},
{"KEY_HOME", 102},
{"KEY_UP", 103},
{"KEY_PAGEUP", 104},
{"KEY_LEFT", 105},
{"KEY_RIGHT", 106},
{"KEY_END", 107},
{"KEY_DOWN", 108},
{"KEY_PAGEDOWN", 109},
{"KEY_INSERT", 110},
{"KEY_DELETE", 111},
{"KEY_MACRO", 112},
{"KEY_MUTE", 113},
{"KEY_VOLUMEDOWN", 114},
{"KEY_VOLUMEUP", 115},
{"KEY_POWER", 116},
{"KEY_KPEQUAL", 117},
{"KEY_KPPLUSMINUS", 118},
{"KEY_PAUSE", 119},
{"KEY_SCALE", 120},
{"KEY_KPCOMMA", 121},
{"KEY_HANGEUL", 122},
{"KEY_HANGUEL", 122},
{"KEY_HANJA", 123},
{"KEY_YEN", 124},
{"KEY_LEFTMETA", 125},
{"KEY_RIGHTMETA", 126},
{"KEY_COMPOSE", 127},
{"KEY_STOP", 128},
{"KEY_AGAIN", 129},
{"KEY_PROPS", 130},
{"KEY_UNDO", 131},
{"KEY_FRONT", 132},
{"KEY_COPY", 133},
{"KEY_OPEN", 134},
{"KEY_PASTE", 135},
{"KEY_FIND", 136},
{"KEY_CUT", 137},
{"KEY_HELP", 138},
{"KEY_MENU", 139},
{"KEY_CALC", 140},
{"KEY_SETUP", 141},
{"KEY_SLEEP", 142},
{"KEY_WAKEUP", 143},
{"KEY_FILE", 144},
{"KEY_SENDFILE", 145},
{"KEY_DELETEFILE", 146},
{"KEY_XFER", 147},
{"KEY_PROG1", 148},
{"KEY_PROG2", 149},
{"KEY_WWW", 150},
{"KEY_MSDOS", 151},
{"KEY_COFFEE", 152},
{"KEY_SCREENLOCK", 152},
{"KEY_ROTATE_DISPLAY", 153},
{"KEY_DIRECTION", 153},
{"KEY_CYCLEWINDOWS", 154},
{"KEY_MAIL", 155},
{"KEY_BOOKMARKS", 156},
{"KEY_COMPUTER", 157},
{"KEY_BACK", 158},
{"KEY_FORWARD", 159},
{"KEY_CLOSECD", 160},
{"KEY_EJECTCD", 161},
{"KEY_EJECTCLOSECD", 162},
{"KEY_NEXTSONG", 163},
{"KEY_PLAYPAUSE", 164},
{"KEY_PREVIOUSSONG", 165},
{"KEY_STOPCD", 166},
{"KEY_RECORD", 167},
{"KEY_REWIND", 168},
{"KEY_PHONE", 169},
{"KEY_ISO", 170},
{"KEY_CONFIG", 171},
{"KEY_HOMEPAGE", 172},
{"KEY_REFRESH", 173},
{"KEY_EXIT", 174},
{"KEY_MOVE", 175},
{"KEY_EDIT", 176},
{"KEY_SCROLLUP", 177},
{"KEY_SCROLLDOWN", 178},
{"KEY_KPLEFTPAREN", 179},
{"KEY_KPRIGHTPAREN", 180},
{"KEY_NEW", 181},
{"KEY_REDO", 182},
{"KEY_F13", 183},
{"KEY_F14", 184},
{"KEY_F15", 185},
{"KEY_F16", 186},
{"KEY_F17", 187},
{"KEY_F18", 188},
{"KEY_F19", 189},
{"KEY_F20", 190},
{"KEY_F21", 191},
{"KEY_F22", 192},
{"KEY_F23", 193},
{"KEY_F24", 194},
{"KEY_PLAYCD", 200},
{"KEY_PAUSECD", 201},
{"KEY_PROG3", 202},
{"KEY_PROG4", 203},
{"KEY_ALL_APPLICATIONS", 204},
{"KEY_DASHBOARD", 204},
{"KEY_SUSPEND", 205},
{"KEY_CLOSE", 206},
{"KEY_PLAY", 207},
{"KEY_FASTFORWARD", 208},
{"KEY_BASSBOOST", 209},
{"KEY_PRINT", 210},
{"KEY_HP", 211},
{"KEY_CAMERA", 212},
{"KEY_SOUND", 213},
{"KEY_QUESTION", 214},
{"KEY_EMAIL", 215},
{"KEY_CHAT", 216},
{"KEY_SEARCH", 217},
{"KEY_CONNECT", 218},
{"KEY_FINANCE", 219},
{"KEY_SPORT", 220},
{"KEY_SHOP", 221},
{"KEY_ALTERASE", 222},
{"KEY_CANCEL", 223},
{"KEY_BRIGHTNESSDOWN", 224},
{"KEY_BRIGHTNESSUP", 225},
{"KEY_MEDIA", 226},
{"KEY_SWITCHVIDEOMODE", 227},
{"KEY_KBDILLUMTOGGLE", 228},
{"KEY_KBDILLUMDOWN", 229},
{"KEY_KBDILLUMUP", 230},
{"KEY_SEND", 231},
{"KEY_REPLY", 232},
{"KEY_FORWARDMAIL", 233},
{"KEY_SAVE", 234},
{"KEY_DOCUMENTS", 235},
{"KEY_BATTERY", 236},
{"KEY_BLUETOOTH", 237},
{"KEY_WLAN", 238},
{"KEY_UWB", 239},
{"KEY_UNKNOWN", 240},
{"KEY_VIDEO_NEXT", 241},
{"KEY_VIDEO_PREV", 242},
{"KEY_BRIGHTNESS_CYCLE", 243},
{"KEY_BRIGHTNESS_AUTO", 244},
{"KEY_BRIGHTNESS_ZERO", 244},
{"KEY_DISPLAY_OFF", 245},
{"KEY_WWAN", 246},
{"KEY_WIMAX", 246},
{"KEY_RFKILL", 247},
{"KEY_MICMUTE", 248},
{"BTN_MISC", 256},
{"BTN_0", 256},
{"BTN_1", 257},
{"BTN_2", 258},
{"BTN_3", 259},
{"BTN_4", 260},
{"BTN_5", 261},
{"BTN_6", 262},
{"BTN_7", 263},
{"BTN_8", 264},
{"BTN_9", 265},
{"BTN_MOUSE", 272},
{"BTN_LEFT", 272},
{"BTN_RIGHT", 273},
{"BTN_MIDDLE", 274},
{"BTN_SIDE", 275},
{"BTN_EXTRA", 276},
{"BTN_FORWARD", 277},
{"BTN_BACK", 278},
{"BTN_TASK", 279},
{"BTN_JOYSTICK", 288},
{"BTN_TRIGGER", 288},
{"BTN_THUMB", 289},
{"BTN_THUMB2", 290},
{"BTN_TOP", 291},
{"BTN_TOP2", 292},
{"BTN_PINKIE", 293},
{"BTN_BASE", 294},
{"BTN_BASE2", 295},
{"BTN_BASE3", 296},
{"BTN_BASE4", 297},
{"BTN_BASE5", 298},
{"BTN_BASE6", 299},
{"BTN_DEAD", 303},
{"BTN_GAMEPAD", 304},
{"BTN_SOUTH", 304},
{"BTN_A", 304},
{"BTN_EAST", 305},
{"BTN_B", 305},
{"BTN_C", 306},
{"BTN_NORTH", 307},
{"BTN_X", 307},
{"BTN_WEST", 308},
{"BTN_Y", 308},
{"BTN_Z", 309},
{"BTN_TL", 310},
{"BTN_TR", 311},
{"BTN_TL2", 312},
{"BTN_TR2", 313},
{"BTN_SELECT", 314},
{"BTN_START", 315},
{"BTN_MODE", 316},
{"BTN_THUMBL", 317},
{"BTN_THUMBR", 318},
{"BTN_DIGI", 320},
{"BTN_TOOL_PEN", 320},
{"BTN_TOOL_RUBBER", 321},
{"BTN_TOOL_BRUSH", 322},
{"BTN_TOOL_PENCIL", 323},
{"BTN_TOOL_AIRBRUSH", 324},
{"BTN_TOOL_FINGER", 325},
{"BTN_TOOL_MOUSE", 326},
{"BTN_TOOL_LENS", 327},
{"BTN_TOOL_QUINTTAP", 328},
{"BTN_STYLUS3", 329},
{"BTN_TOUCH", 330},
{"BTN_STYLUS", 331},
{"BTN_STYLUS2", 332},
{"BTN_TOOL_DOUBLETAP", 333},
{"BTN_TOOL_TRIPLETAP", 334},
{"BTN_TOOL_QUADTAP", 335},
{"BTN_WHEEL", 336},
{"BTN_GEAR_DOWN", 336},
{"BTN_GEAR_UP", 337},
{"KEY_OK", 352},
{"KEY_SELECT", 353},
{"KEY_GOTO", 354},
{"KEY_CLEAR", 355},
{"KEY_POWER2", 356},
{"KEY_OPTION", 357},
{"KEY_INFO", 358},
{"KEY_TIME", 359},
{"KEY_VENDOR", 360},
{"KEY_ARCHIVE", 361},
{"KEY_PROGRAM", 362},
{"KEY_CHANNEL", 363},
{"KEY_FAVORITES", 364},
{"KEY_EPG", 365},
{"KEY_PVR", 366},
{"KEY_MHP", 367},
{"KEY_LANGUAGE", 368},
{"KEY_TITLE", 369},
{"KEY_SUBTITLE", 370},
{"KEY_ANGLE", 371},
{"KEY_FULL_SCREEN", 372},
{"KEY_ZOOM", 372},
{"KEY_MODE", 373},
{"KEY_KEYBOARD", 374},
{"KEY_ASPECT_RATIO", 375},
{"KEY_SCREEN", 375},
{"KEY_PC", 376},
{"KEY_TV", 377},
{"KEY_TV2", 378},
{"KEY_VCR", 379},
{"KEY_VCR2", 380},
{"KEY_SAT", 381},
{"KEY_SAT2", 382},
{"KEY_CD", 383},
{"KEY_TAPE", 384},
{"KEY_RADIO", 385},
{"KEY_TUNER", 386},
{"KEY_PLAYER", 387},
{"KEY_TEXT", 388},
{"KEY_DVD", 389},
{"KEY_AUX", 390},
{"KEY_MP3", 391},
{"KEY_AUDIO", 392},
{"KEY_VIDEO", 393},
{"KEY_DIRECTORY", 394},
{"KEY_LIST", 395},
{"KEY_MEMO", 396},
{"KEY_CALENDAR", 397},
{"KEY_RED", 398},
{"KEY_GREEN", 399},
{"KEY_YELLOW", 400},
{"KEY_BLUE", 401},
{"KEY_CHANNELUP", 402},
{"KEY_CHANNELDOWN", 403},
{"KEY_FIRST", 404},
{"KEY_LAST", 405},
{"KEY_AB", 406},
{"KEY_NEXT", 407},
{"KEY_RESTART", 408},
{"KEY_SLOW", 409},
{"KEY_SHUFFLE", 410},
{"KEY_BREAK", 411},
{"KEY_PREVIOUS", 412},
{"KEY_DIGITS", 413},
{"KEY_TEEN", 414},
{"KEY_TWEN", 415},
{"KEY_VIDEOPHONE", 416},
{"KEY_GAMES", 417},
{"KEY_ZOOMIN", 418},
{"KEY_ZOOMOUT", 419},
{"KEY_ZOOMRESET", 420},
{"KEY_WORDPROCESSOR", 421},
{"KEY_EDITOR", 422},
{"KEY_SPREADSHEET", 423},
{"KEY_GRAPHICSEDITOR", 424},
{"KEY_PRESENTATION", 425},
{"KEY_DATABASE", 426},
{"KEY_NEWS", 427},
{"KEY_VOICEMAIL", 428},
{"KEY_ADDRESSBOOK", 429},
{"KEY_MESSENGER", 430},
{"KEY_DISPLAYTOGGLE", 431},
{"KEY_BRIGHTNESS_TOGGLE", 431},
{"KEY_SPELLCHECK", 432},
{"KEY_LOGOFF", 433},
{"KEY_DOLLAR", 434},
{"KEY_EURO", 435},
{"KEY_FRAMEBACK", 436},
{"KEY_FRAMEFORWARD", 437},
{"KEY_CONTEXT_MENU", 438},
{"KEY_MEDIA_REPEAT", 439},
{"KEY_10CHANNELSUP", 440},
{"KEY_10CHANNELSDOWN", 441},
{"KEY_IMAGES", 442},
{"KEY_NOTIFICATION_CENTER", 444},
{"KEY_PICKUP_PHONE", 445},
{"KEY_HANGUP_PHONE", 446},
{"KEY_DEL_EOL", 448},
{"KEY_DEL_EOS", 449},
{"KEY_INS_LINE", 450},
{"KEY_DEL_LINE", 451},
{"KEY_FN", 464},
{"KEY_FN_ESC", 465},
{"KEY_FN_F1", 466},
{"KEY_FN_F2", 467},
{"KEY_FN_F3", 468},
{"KEY_FN_F4", 469},
{"KEY_FN_F5", 470},
{"KEY_FN_F6", 471},
{"KEY_FN_F7", 472},
{"KEY_FN_F8", 473},
{"KEY_FN_F9", 474},
{"KEY_FN_F10", 475},
{"KEY_FN_F11", 476},
{"KEY_FN_F12", 477},
{"KEY_FN_1", 478},
{"KEY_FN_2", 479},
{"KEY_FN_D", 480},
{"KEY_FN_E", 481},
{"KEY_FN_F", 482},
{"KEY_FN_S", 483},
{"KEY_FN_B", 484},
{"KEY_FN_RIGHT_SHIFT", 485},
{"KEY_BRL_DOT1", 497},
{"KEY_BRL_DOT2", 498},
{"KEY_BRL_DOT3", 499},
{"KEY_BRL_DOT4", 500},
{"KEY_BRL_DOT5", 501},
{"KEY_BRL_DOT6", 502},
{"KEY_BRL_DOT7", 503},
{"KEY_BRL_DOT8", 504},
{"KEY_BRL_DOT9", 505},
{"KEY_BRL_DOT10", 506},
{"KEY_NUMERIC_0", 512},
{"KEY_NUMERIC_1", 513},
{"KEY_NUMERIC_2", 514},
{"KEY_NUMERIC_3", 515},
{"KEY_NUMERIC_4", 516},
{"KEY_NUMERIC_5", 517},
{"KEY_NUMERIC_6", 518},
{"KEY_NUMERIC_7", 519},
{"KEY_NUMERIC_8", 520},
{"KEY_NUMERIC_9", 521},
{"KEY_NUMERIC_STAR", 522},
{"KEY_NUMERIC_POUND", 523},
{"KEY_NUMERIC_A", 524},
{"KEY_NUMERIC_B", 525},
{"KEY_NUMERIC_C", 526},
{"KEY_NUMERIC_D", 527},
{"KEY_CAMERA_FOCUS", 528},
{"KEY_WPS_BUTTON", 529},
{"KEY_TOUCHPAD_TOGGLE", 530},
{"KEY_TOUCHPAD_ON", 531},
{"KEY_TOUCHPAD_OFF", 532},
{"KEY_CAMERA_ZOOMIN", 533},
{"KEY_CAMERA_ZOOMOUT", 534},
{"KEY_CAMERA_UP", 535},
{"KEY_CAMERA_DOWN", 536},
{"KEY_CAMERA_LEFT", 537},
{"KEY_CAMERA_RIGHT", 538},
{"KEY_ATTENDANT_ON", 539},
{"KEY_ATTENDANT_OFF", 540},
{"KEY_ATTENDANT_TOGGLE", 541},
{"KEY_LIGHTS_TOGGLE", 542},
{"BTN_DPAD_UP", 544},
{"BTN_DPAD_DOWN", 545},
{"BTN_DPAD_LEFT", 546},
{"BTN_DPAD_RIGHT", 547},
{"KEY_ALS_TOGGLE", 560},
{"KEY_ROTATE_LOCK_TOGGLE", 561},
{"KEY_BUTTONCONFIG", 576},
{"KEY_TASKMANAGER", 577},
{"KEY_JOURNAL", 578},
{"KEY_CONTROLPANEL", 579},
{"KEY_APPSELECT", 580},
{"KEY_SCREENSAVER", 581},
{"KEY_VOICECOMMAND", 582},
{"KEY_ASSISTANT", 583},
{"KEY_KBD_LAYOUT_NEXT", 584},
{"KEY_EMOJI_PICKER", 585},
{"KEY_DICTATE", 586},
{"KEY_CAMERA_ACCESS_ENABLE", 587},
{"KEY_CAMERA_ACCESS_DISABLE", 588},
{"KEY_CAMERA_ACCESS_TOGGLE", 589},
{"KEY_BRIGHTNESS_MIN", 592},
{"KEY_BRIGHTNESS_MAX", 593},
{"KEY_KBDINPUTASSIST_PREV", 608},
{"KEY_KBDINPUTASSIST_NEXT", 609},
{"KEY_KBDINPUTASSIST_PREVGROUP", 610},
{"KEY_KBDINPUTASSIST_NEXTGROUP", 611},
{"KEY_KBDINPUTASSIST_ACCEPT", 612},
{"KEY_KBDINPUTASSIST_CANCEL", 613},
{"KEY_RIGHT_UP", 614},
{"KEY_RIGHT_DOWN", 615},
{"KEY_LEFT_UP", 616},
{"KEY_LEFT_DOWN", 617},
{"KEY_ROOT_MENU", 618},
{"KEY_MEDIA_TOP_MENU", 619},
{"KEY_NUMERIC_11", 620},
{"KEY_NUMERIC_12", 621},
{"KEY_AUDIO_DESC", 622},
{"KEY_3D_MODE", 623},
{"KEY_NEXT_FAVORITE", 624},
{"KEY_STOP_RECORD", 625},
{"KEY_PAUSE_RECORD", 626},
{"KEY_VOD", 627},
{"KEY_UNMUTE", 628},
{"KEY_FASTREVERSE", 629},
{"KEY_SLOWREVERSE", 630},
{"KEY_DATA", 631},
{"KEY_ONSCREEN_KEYBOARD", 632},
{"KEY_PRIVACY_SCREEN_TOGGLE", 633},
{"KEY_SELECTIVE_SCREENSHOT", 634},
{"KEY_NEXT_ELEMENT", 635},
{"KEY_PREVIOUS_ELEMENT", 636},
{"KEY_AUTOPILOT_ENGAGE_TOGGLE", 637},
{"KEY_MARK_WAYPOINT", 638},
{"KEY_SOS", 639},
{"KEY_NAV_CHART", 640},
{"KEY_FISHING_CHART", 641},
{"KEY_SINGLE_RANGE_RADAR", 642},
{"KEY_DUAL_RANGE_RADAR", 643},
{"KEY_RADAR_OVERLAY", 644},
{"KEY_TRADITIONAL_SONAR", 645},
{"KEY_CLEARVU_SONAR", 646},
{"KEY_SIDEVU_SONAR", 647},
{"KEY_NAV_INFO", 648},
{"KEY_BRIGHTNESS_MENU", 649},
{"KEY_MACRO1", 656},
{"KEY_MACRO2", 657},
{"KEY_MACRO3", 658},
{"KEY_MACRO4", 659},
{"KEY_MACRO5", 660},
{"KEY_MACRO6", 661},
{"KEY_MACRO7", 662},
{"KEY_MACRO8", 663},
{"KEY_MACRO9", 664},
{"KEY_MACRO10", 665},
{"KEY_MACRO11", 666},
{"KEY_MACRO12", 667},
{"KEY_MACRO13", 668},
{"KEY_MACRO14", 669},
{"KEY_MACRO15", 670},
{"KEY_MACRO16", 671},
{"KEY_MACRO17", 672},
{"KEY_MACRO18", 673},
{"KEY_MACRO19", 674},
{"KEY_MACRO20", 675},
{"KEY_MACRO21", 676},
{"KEY_MACRO22", 677},
{"KEY_MACRO23", 678},
{"KEY_MACRO24", 679},
{"KEY_MACRO25", 680},
{"KEY_MACRO26", 681},
{"KEY_MACRO27", 682},
{"KEY_MACRO28", 683},
{"KEY_MACRO29", 684},
{"KEY_MACRO30", 685},
{"KEY_MACRO_RECORD_START", 688},
{"KEY_MACRO_RECORD_STOP", 689},
{"KEY_MACRO_PRESET_CYCLE", 690},
{"KEY_MACRO_PRESET1", 691},
{"KEY_MACRO_PRESET2", 692},
{"KEY_MACRO_PRESET3", 693},
{"KEY_KBD_LCD_MENU1", 696},
{"KEY_KBD_LCD_MENU2", 697},
{"KEY_KBD_LCD_MENU3", 698},
{"KEY_KBD_LCD_MENU4", 699},
{"KEY_KBD_LCD_MENU5", 700},
{"BTN_TRIGGER_HAPPY", 704},
{"BTN_TRIGGER_HAPPY1", 704},
{"BTN_TRIGGER_HAPPY2", 705},
{"BTN_TRIGGER_HAPPY3", 706},
{"BTN_TRIGGER_HAPPY4", 707},
{"BTN_TRIGGER_HAPPY5", 708},
{"BTN_TRIGGER_HAPPY6", 709},
{"BTN_TRIGGER_HAPPY7", 710},
{"BTN_TRIGGER_HAPPY8", 711},
{"BTN_TRIGGER_HAPPY9", 712},
{"BTN_TRIGGER_HAPPY10", 713},
{"BTN_TRIGGER_HAPPY11", 714},
{"BTN_TRIGGER_HAPPY12", 715},
{"BTN_TRIGGER_HAPPY13", 716},
{"BTN_TRIGGER_HAPPY14", 717},
{"BTN_TRIGGER_HAPPY15", 718},
{"BTN_TRIGGER_HAPPY16", 719},
{"BTN_TRIGGER_HAPPY17", 720},
{"BTN_TRIGGER_HAPPY18", 721},
{"BTN_TRIGGER_HAPPY19", 722},
{"BTN_TRIGGER_HAPPY20", 723},
{"BTN_TRIGGER_HAPPY21", 724},
{"BTN_TRIGGER_HAPPY22", 725},
{"BTN_TRIGGER_HAPPY23", 726},
{"BTN_TRIGGER_HAPPY24", 727},
{"BTN_TRIGGER_HAPPY25", 728},
{"BTN_TRIGGER_HAPPY26", 729},
{"BTN_TRIGGER_HAPPY27", 730},
{"BTN_TRIGGER_HAPPY28", 731},
{"BTN_TRIGGER_HAPPY29", 732},
{"BTN_TRIGGER_HAPPY30", 733},
{"BTN_TRIGGER_HAPPY31", 734},
{"BTN_TRIGGER_HAPPY32", 735},
{"BTN_TRIGGER_HAPPY33", 736},
{"BTN_TRIGGER_HAPPY34", 737},
{"BTN_TRIGGER_HAPPY35", 738},
{"BTN_TRIGGER_HAPPY36", 739},
{"BTN_TRIGGER_HAPPY37", 740},
{"BTN_TRIGGER_HAPPY38", 741},
{"BTN_TRIGGER_HAPPY39", 742},
{"BTN_TRIGGER_HAPPY40", 743},
{"KEY_MIN_INTERESTING", 113},
{"KEY_MAX", 767},
}
enums.UINPUT = eh.make_enum{
{"FF_UPLOAD", 1},
{"FF_ERASE", 2},
}
enums.INPUT_PROP = eh.make_enum{
{"POINTER", 0},
{"DIRECT", 1},
{"BUTTONPAD", 2},
{"SEMI_MT", 3},
{"TOPBUTTONPAD", 4},
{"POINTING_STICK", 5},
{"ACCELEROMETER", 6},
{"MAX", 31},
}
enums.EV = eh.make_enum{
{"SYN", 0},
{"KEY", 1},
{"REL", 2},
{"ABS", 3},
{"MSC", 4},
{"SW", 5},
{"LED", 17},
{"SND", 18},
{"REP", 20},
{"FF", 21},
{"PWR", 22},
{"FF_STATUS", 23},
{"MAX", 31},
{"UINPUT", 257},
}
enums.SYN = eh.make_enum{
{"REPORT", 0},
{"CONFIG", 1},
{"MT_REPORT", 2},
{"DROPPED", 3},
{"MAX", 15},
}
enums.REL = eh.make_enum{
{"X", 0},
{"Y", 1},
{"Z", 2},
{"RX", 3},
{"RY", 4},
{"RZ", 5},
{"HWHEEL", 6},
{"DIAL", 7},
{"WHEEL", 8},
{"MISC", 9},
{"RESERVED", 10},
{"WHEEL_HI_RES", 11},
{"HWHEEL_HI_RES", 12},
{"MAX", 15},
}
enums.ABS = eh.make_enum{
{"X", 0},
{"Y", 1},
{"Z", 2},
{"RX", 3},
{"RY", 4},
{"RZ", 5},
{"THROTTLE", 6},
{"RUDDER", 7},
{"WHEEL", 8},
{"GAS", 9},
{"BRAKE", 10},
{"HAT0X", 16},
{"HAT0Y", 17},
{"HAT1X", 18},
{"HAT1Y", 19},
{"HAT2X", 20},
{"HAT2Y", 21},
{"HAT3X", 22},
{"HAT3Y", 23},
{"PRESSURE", 24},
{"DISTANCE", 25},
{"TILT_X", 26},
{"TILT_Y", 27},
{"TOOL_WIDTH", 28},
{"VOLUME", 32},
{"PROFILE", 33},
{"MISC", 40},
{"RESERVED", 46},
{"MT_SLOT", 47},
{"MT_TOUCH_MAJOR", 48},
{"MT_TOUCH_MINOR", 49},
{"MT_WIDTH_MAJOR", 50},
{"MT_WIDTH_MINOR", 51},
{"MT_ORIENTATION", 52},
{"MT_POSITION_X", 53},
{"MT_POSITION_Y", 54},
{"MT_TOOL_TYPE", 55},
{"MT_BLOB_ID", 56},
{"MT_TRACKING_ID", 57},
{"MT_PRESSURE", 58},
{"MT_DISTANCE", 59},
{"MT_TOOL_X", 60},
{"MT_TOOL_Y", 61},
{"MAX", 63},
}
enums.SW = eh.make_enum{
{"LID", 0},
{"TABLET_MODE", 1},
{"HEADPHONE_INSERT", 2},
{"RFKILL_ALL", 3},
{"RADIO", 3},
{"MICROPHONE_INSERT", 4},
{"DOCK", 5},
{"LINEOUT_INSERT", 6},
{"JACK_PHYSICAL_INSERT", 7},
{"VIDEOOUT_INSERT", 8},
{"CAMERA_LENS_COVER", 9},
{"KEYPAD_SLIDE", 10},
{"FRONT_PROXIMITY", 11},
{"ROTATE_LOCK", 12},
{"LINEIN_INSERT", 13},
{"MUTE_DEVICE", 14},
{"PEN_INSERTED", 15},
{"MACHINE_COVER", 16},
{"MAX", 16},
}
enums.MSC = eh.make_enum{
{"SERIAL", 0},
{"PULSELED", 1},
{"GESTURE", 2},
{"RAW", 3},
{"SCAN", 4},
{"TIMESTAMP", 5},
{"MAX", 7},
}
enums.LED = eh.make_enum{
{"NUML", 0},
{"CAPSL", 1},
{"SCROLLL", 2},
{"COMPOSE", 3},
{"KANA", 4},
{"SLEEP", 5},
{"SUSPEND", 6},
{"MUTE", 7},
{"MISC", 8},
{"MAIL", 9},
{"CHARGING", 10},
{"MAX", 15},
}
enums.REP = eh.make_enum{
{"DELAY", 0},
{"PERIOD", 1},
{"MAX", 1},
}
enums.SND = eh.make_enum{
{"CLICK", 0},
{"BELL", 1},
{"TONE", 2},
{"MAX", 7},
}
enums.ID = eh.make_enum{
{"BUS", 0},
{"VENDOR", 1},
{"PRODUCT", 2},
{"VERSION", 3},
}
enums.BUS = eh.make_enum{
{"PCI", 1},
{"ISAPNP", 2},
{"USB", 3},
{"HIL", 4},
{"BLUETOOTH", 5},
{"VIRTUAL", 6},
{"ISA", 16},
{"I8042", 17},
{"XTKBD", 18},
{"RS232", 19},
{"GAMEPORT", 20},
{"PARPORT", 21},
{"AMIGA", 22},
{"ADB", 23},
{"I2C", 24},
{"HOST", 25},
{"GSC", 26},
{"ATARI", 27},
{"SPI", 28},
{"RMI", 29},
{"CEC", 30},
{"INTEL_ISHTP", 31},
{"AMD_SFH", 32},
}
enums.MT_TOOL = eh.make_enum{
{"FINGER", 0},
{"PEN", 1},
{"PALM", 2},
{"DIAL", 10},
{"MAX", 15},
}
enums.FF_STATUS = eh.make_enum{
{"STOPPED", 0},
{"PLAYING", 1},
{"MAX", 1},
}
enums.FF = eh.make_enum{
{"RUMBLE", 80},
{"PERIODIC", 81},
{"CONSTANT", 82},
{"SPRING", 83},
{"FRICTION", 84},
{"DAMPER", 85},
{"INERTIA", 86},
{"RAMP", 87},
{"EFFECT_MIN", 80},
{"EFFECT_MAX", 87},
{"SQUARE", 88},
{"TRIANGLE", 89},
{"SINE", 90},
{"SAW_UP", 91},
{"SAW_DOWN", 92},
{"CUSTOM", 93},
{"WAVEFORM_MIN", 88},
{"WAVEFORM_MAX", 93},
{"GAIN", 96},
{"AUTOCENTER", 97},
{"MAX", 127},
}
enums.EV_VERSION = 0x010001
local ctype_int_5b1_5d = ffi.typeof("int[1]")
local ctype_struct_20input_5fid_5b1_5d = ffi.typeof("struct input_id[1]")
local ctype_unsigned_20int_5b2_5d = ffi.typeof("unsigned int[2]")
local ctype_struct_20input_5fkeymap_5fentry_2a = ffi.typeof("struct input_keymap_entry*")
local ctype_void_2a = ffi.typeof("void*")
local ctype_struct_20input_5fabsinfo_5b1_5d = ffi.typeof("struct input_absinfo[1]")
local ctype_struct_20input_5fabsinfo_2a = ffi.typeof("struct input_absinfo*")
local ctype_struct_20ff_5feffect_2a = ffi.typeof("struct ff_effect*")
local ctype_int = ffi.typeof("int")
local ctype_struct_20input_5fmask_2a = ffi.typeof("struct input_mask*")
local ctype_unsigned_20int_5b1_5d = ffi.typeof("unsigned int[1]")
local ctype_struct_20uinput_5fsetup_2a = ffi.typeof("struct uinput_setup*")
local ctype_struct_20uinput_5fabs_5fsetup_2a = ffi.typeof("struct uinput_abs_setup*")
local ctype_struct_20uinput_5fff_5fupload_2a = ffi.typeof("struct uinput_ff_upload*")
local ctype_struct_20uinput_5fff_5ferase_2a = ffi.typeof("struct uinput_ff_erase*")
local ioctls = {}
local get_version_req = ioctl_mod.ioctl_req(true, false, 69, 1, ffi.sizeof("int"))
function ioctls.get_version(fd)
local arg = ctype_int_5b1_5d()
local res = ioctl(fd, get_version_req, arg)
return res, arg[0]
end
local get_id_req = ioctl_mod.ioctl_req(true, false, 69, 2, ffi.sizeof("struct input_id"))
function ioctls.get_id(fd)
local arg = ctype_struct_20input_5fid_5b1_5d()
local res = ioctl(fd, get_id_req, arg)
return res, arg[0]
end
local get_rep_req = ioctl_mod.ioctl_req(true, false, 69, 3, ffi.sizeof("unsigned int[2]"))
function ioctls.get_rep(fd)
local arg = ctype_unsigned_20int_5b2_5d()
local res = ioctl(fd, get_rep_req, arg)
return res, arg[0], arg[1]
end
local set_rep_req = ioctl_mod.ioctl_req(false, true, 69, 3, ffi.sizeof("unsigned int[2]"))
function ioctls.set_rep(fd, x0, x1)
local arg = ctype_unsigned_20int_5b2_5d(x0, x1)
local res = ioctl(fd, set_rep_req, arg)
return res
end
local get_keycode_req = ioctl_mod.ioctl_req(true, false, 69, 4, ffi.sizeof("unsigned int[2]"))
function ioctls.get_keycode(fd, x0, x1)
local arg = ctype_unsigned_20int_5b2_5d(x0, x1)
local res = ioctl(fd, get_keycode_req, arg)
return res, arg[0], arg[1]
end
local get_keycode_v2_req = ioctl_mod.ioctl_req(true, false, 69, 4, ffi.sizeof("struct input_keymap_entry"))
function ioctls.get_keycode_v2(fd, x0)
local arg = ctype_struct_20input_5fkeymap_5fentry_2a(x0)
local res = ioctl(fd, get_keycode_v2_req, arg)
return res, arg[0]
end
local set_keycode_req = ioctl_mod.ioctl_req(false, true, 69, 4, ffi.sizeof("unsigned int[2]"))
function ioctls.set_keycode(fd, x0, x1)
local arg = ctype_unsigned_20int_5b2_5d(x0, x1)
local res = ioctl(fd, set_keycode_req, arg)
return res
end
local set_keycode_v2_req = ioctl_mod.ioctl_req(false, true, 69, 4, ffi.sizeof("struct input_keymap_entry"))
function ioctls.set_keycode_v2(fd, x0)
local arg = ctype_struct_20input_5fkeymap_5fentry_2a(x0)
local res = ioctl(fd, set_keycode_v2_req, arg)
return res
end
local get_name_req = ioctl_mod.ioctl_req(true, false, 69, 6, 0)
function ioctls.get_name(fd, arg, len)
len = len or ffi_sizeof(arg)
local res = ioctl(fd, get_name_req + lshift(len, sizeshift), ffi_cast(ctype_void_2a, arg))
return res
end
local get_phys_req = ioctl_mod.ioctl_req(true, false, 69, 7, 0)
function ioctls.get_phys(fd, arg, len)
len = len or ffi_sizeof(arg)
local res = ioctl(fd, get_phys_req + lshift(len, sizeshift), ffi_cast(ctype_void_2a, arg))
return res
end
local get_uniq_req = ioctl_mod.ioctl_req(true, false, 69, 8, 0)
function ioctls.get_uniq(fd, arg, len)
len = len or ffi_sizeof(arg)
local res = ioctl(fd, get_uniq_req + lshift(len, sizeshift), ffi_cast(ctype_void_2a, arg))
return res
end
local get_prop_req = ioctl_mod.ioctl_req(true, false, 69, 9, 0)
function ioctls.get_prop(fd, arg, len)
len = len or ffi_sizeof(arg)
local res = ioctl(fd, get_prop_req + lshift(len, sizeshift), ffi_cast(ctype_void_2a, arg))
return res
end
local get_mtslots_req = ioctl_mod.ioctl_req(true, false, 69, 10, 0)
function ioctls.get_mtslots(fd, arg, len)
len = len or ffi_sizeof(arg)
local res = ioctl(fd, get_mtslots_req + lshift(len, sizeshift), ffi_cast(ctype_void_2a, arg))
return res
end
local get_key_req = ioctl_mod.ioctl_req(true, false, 69, 24, 0)
function ioctls.get_key(fd, arg, len)
len = len or ffi_sizeof(arg)
local res = ioctl(fd, get_key_req + lshift(len, sizeshift), ffi_cast(ctype_void_2a, arg))
return res
end
local get_led_req = ioctl_mod.ioctl_req(true, false, 69, 25, 0)
function ioctls.get_led(fd, arg, len)
len = len or ffi_sizeof(arg)
local res = ioctl(fd, get_led_req + lshift(len, sizeshift), ffi_cast(ctype_void_2a, arg))
return res
end
local get_snd_req = ioctl_mod.ioctl_req(true, false, 69, 26, 0)
function ioctls.get_snd(fd, arg, len)
len = len or ffi_sizeof(arg)
local res = ioctl(fd, get_snd_req + lshift(len, sizeshift), ffi_cast(ctype_void_2a, arg))
return res
end
local get_sw_req = ioctl_mod.ioctl_req(true, false, 69, 27, 0)
function ioctls.get_sw(fd, arg, len)
len = len or ffi_sizeof(arg)
local res = ioctl(fd, get_sw_req + lshift(len, sizeshift), ffi_cast(ctype_void_2a, arg))
return res
end
local get_bit_req = ioctl_mod.ioctl_req(true, false, 69, 32, 0)
function ioctls.get_bit(fd, ev, arg, len)
len = len or ffi_sizeof(arg)
local res = ioctl(fd, get_bit_req + lshift(ev, nrshift) + lshift(len, sizeshift), ffi_cast(ctype_void_2a, arg))
return res
end
local get_abs_req = ioctl_mod.ioctl_req(true, false, 69, 64, ffi.sizeof("struct input_absinfo"))
function ioctls.get_abs(fd, abs)
local arg = ctype_struct_20input_5fabsinfo_5b1_5d()
local res = ioctl(fd, get_abs_req + lshift(abs, nrshift), arg)
return res, arg[0]
end
local set_abs_req = ioctl_mod.ioctl_req(false, true, 69, 192, ffi.sizeof("struct input_absinfo"))
function ioctls.set_abs(fd, abs, x0)
local arg = ctype_struct_20input_5fabsinfo_2a(x0)
local res = ioctl(fd, set_abs_req + lshift(abs, nrshift), arg)
return res
end
local set_ff_req = ioctl_mod.ioctl_req(false, true, 69, 128, ffi.sizeof("struct ff_effect"))
function ioctls.set_ff(fd, x0)
local arg = ctype_struct_20ff_5feffect_2a(x0)
local res = ioctl(fd, set_ff_req, arg)
return res
end
local rm_ff_req = ioctl_mod.ioctl_req(false, true, 69, 129, ffi.sizeof("int"))
function ioctls.rm_ff(fd, x0)
local arg = ctype_int(x0)
local res = ioctl(fd, rm_ff_req, arg)
return res
end
local get_effects_req = ioctl_mod.ioctl_req(true, false, 69, 132, ffi.sizeof("int"))
function ioctls.get_effects(fd)
local arg = ctype_int_5b1_5d()
local res = ioctl(fd, get_effects_req, arg)
return res, arg[0]
end
local grab_req = ioctl_mod.ioctl_req(false, true, 69, 144, ffi.sizeof("int"))
function ioctls.grab(fd, x0)
local arg = ctype_int(x0)
local res = ioctl(fd, grab_req, arg)
return res
end
local revoke_req = ioctl_mod.ioctl_req(false, true, 69, 145, ffi.sizeof("int"))
function ioctls.revoke(fd, x0)
local arg = ctype_int(x0)
local res = ioctl(fd, revoke_req, arg)
return res
end
local get_mask_req = ioctl_mod.ioctl_req(true, false, 69, 146, ffi.sizeof("struct input_mask"))
function ioctls.get_mask(fd, x0)
local arg = ctype_struct_20input_5fmask_2a(x0)
local res = ioctl(fd, get_mask_req, arg)
return res, arg[0]
end
local set_mask_req = ioctl_mod.ioctl_req(false, true, 69, 147, ffi.sizeof("struct input_mask"))
function ioctls.set_mask(fd, x0)
local arg = ctype_struct_20input_5fmask_2a(x0)
local res = ioctl(fd, set_mask_req, arg)
return res
end
local set_clockid_req = ioctl_mod.ioctl_req(false, true, 69, 160, ffi.sizeof("int"))
function ioctls.set_clockid(fd, x0)
local arg = ctype_unsigned_20int_5b1_5d(x0)
local res = ioctl(fd, set_clockid_req, arg)
return res
end
local ui_dev_create_req = ioctl_mod.ioctl_req(false, false, 85, 1, 0)
function ioctls.ui_dev_create(fd)
local res = ioctl(fd, ui_dev_create_req)
return res
end
local ui_dev_destroy_req = ioctl_mod.ioctl_req(false, false, 85, 2, 0)
function ioctls.ui_dev_destroy(fd)
local res = ioctl(fd, ui_dev_destroy_req)
return res
end
local ui_dev_setup_req = ioctl_mod.ioctl_req(false, true, 85, 3, ffi.sizeof("struct uinput_setup"))
function ioctls.ui_dev_setup(fd, x0)
local arg = ctype_struct_20uinput_5fsetup_2a(x0)
local res = ioctl(fd, ui_dev_setup_req, arg)
return res
end
local ui_abs_setup_req = ioctl_mod.ioctl_req(false, true, 85, 4, ffi.sizeof("struct uinput_abs_setup"))
function ioctls.ui_abs_setup(fd, x0)
local arg = ctype_struct_20uinput_5fabs_5fsetup_2a(x0)
local res = ioctl(fd, ui_abs_setup_req, arg)
return res
end
local ui_set_evbit_req = ioctl_mod.ioctl_req(false, true, 85, 100, ffi.sizeof("int"))
function ioctls.ui_set_evbit(fd, x0)
local arg = ctype_int(x0)
local res = ioctl(fd, ui_set_evbit_req, arg)
return res
end
local ui_set_keybit_req = ioctl_mod.ioctl_req(false, true, 85, 101, ffi.sizeof("int"))
function ioctls.ui_set_keybit(fd, x0)
local arg = ctype_int(x0)
local res = ioctl(fd, ui_set_keybit_req, arg)
return res
end
local ui_set_relbit_req = ioctl_mod.ioctl_req(false, true, 85, 102, ffi.sizeof("int"))
function ioctls.ui_set_relbit(fd, x0)
local arg = ctype_int(x0)
local res = ioctl(fd, ui_set_relbit_req, arg)
return res
end
local ui_set_absbit_req = ioctl_mod.ioctl_req(false, true, 85, 103, ffi.sizeof("int"))
function ioctls.ui_set_absbit(fd, x0)
local arg = ctype_int(x0)
local res = ioctl(fd, ui_set_absbit_req, arg)
return res
end
local ui_set_mscbit_req = ioctl_mod.ioctl_req(false, true, 85, 104, ffi.sizeof("int"))
function ioctls.ui_set_mscbit(fd, x0)
local arg = ctype_int(x0)
local res = ioctl(fd, ui_set_mscbit_req, arg)
return res
end
local ui_set_ledbit_req = ioctl_mod.ioctl_req(false, true, 85, 105, ffi.sizeof("int"))
function ioctls.ui_set_ledbit(fd, x0)
local arg = ctype_int(x0)
local res = ioctl(fd, ui_set_ledbit_req, arg)
return res
end
local ui_set_sndbit_req = ioctl_mod.ioctl_req(false, true, 85, 106, ffi.sizeof("int"))
function ioctls.ui_set_sndbit(fd, x0)
local arg = ctype_int(x0)
local res = ioctl(fd, ui_set_sndbit_req, arg)
return res
end
local ui_set_ffbit_req = ioctl_mod.ioctl_req(false, true, 85, 107, ffi.sizeof("int"))
function ioctls.ui_set_ffbit(fd, x0)
local arg = ctype_int(x0)
local res = ioctl(fd, ui_set_ffbit_req, arg)
return res
end
local ui_set_phys_req = ioctl_mod.ioctl_req(false, true, 85, 108, ffi.sizeof("char*"))
function ioctls.ui_set_phys(fd, str)
local res = ioctl(fd, ui_set_phys_req, tostring(str))
return res
end
local ui_set_swbit_req = ioctl_mod.ioctl_req(false, true, 85, 109, ffi.sizeof("int"))
function ioctls.ui_set_swbit(fd, x0)
local arg = ctype_int(x0)
local res = ioctl(fd, ui_set_swbit_req, arg)
return res
end
local ui_set_propbit_req = ioctl_mod.ioctl_req(false, true, 85, 110, ffi.sizeof("int"))
function ioctls.ui_set_propbit(fd, x0)
local arg = ctype_int(x0)
local res = ioctl(fd, ui_set_propbit_req, arg)
return res
end
local ui_begin_ff_upload_req = ioctl_mod.ioctl_req(true, true, 85, 200, ffi.sizeof("struct uinput_ff_upload"))
function ioctls.ui_begin_ff_upload(fd, x0)
local arg = ctype_struct_20uinput_5fff_5fupload_2a(x0)
local res = ioctl(fd, ui_begin_ff_upload_req, arg)
return res, arg[0]
end
local ui_end_ff_upload_req = ioctl_mod.ioctl_req(false, true, 85, 201, ffi.sizeof("struct uinput_ff_upload"))
function ioctls.ui_end_ff_upload(fd, x0)
local arg = ctype_struct_20uinput_5fff_5fupload_2a(x0)
local res = ioctl(fd, ui_end_ff_upload_req, arg)
return res
end
local ui_begin_ff_erase_req = ioctl_mod.ioctl_req(true, true, 85, 202, ffi.sizeof("struct uinput_ff_erase"))
function ioctls.ui_begin_ff_erase(fd, x0)
local arg = ctype_struct_20uinput_5fff_5ferase_2a(x0)
local res = ioctl(fd, ui_begin_ff_erase_req, arg)
return res, arg[0]
end
local ui_end_ff_erase_req = ioctl_mod.ioctl_req(false, true, 85, 203, ffi.sizeof("struct uinput_ff_erase"))
function ioctls.ui_end_ff_erase(fd, x0)
local arg = ctype_struct_20uinput_5fff_5ferase_2a(x0)
local res = ioctl(fd, ui_end_ff_erase_req, arg)
return res
end
local ui_get_sysname_req = ioctl_mod.ioctl_req(true, false, 85, 44, 0)
function ioctls.ui_get_sysname(fd, arg, len)
len = len or ffi_sizeof(arg)
local res = ioctl(fd, ui_get_sysname_req + lshift(len, sizeshift), ffi_cast(ctype_void_2a, arg))
return res
end
local ui_get_version_req = ioctl_mod.ioctl_req(true, false, 85, 45, ffi.sizeof("unsigned int"))
function ioctls.ui_get_version(fd)
local arg = ctype_unsigned_20int_5b1_5d()
local res = ioctl(fd, ui_get_version_req, arg)
return res, arg[0]
end
return {enums=enums, ioctls=ioctls}