require '_h2ph_pre.ph';

unless(defined(&_INPUT_H)) {
    eval 'sub _INPUT_H () {1;}' unless defined(&_INPUT_H);
    require 'sys/time.ph';
    require 'sys/ioctl.ph';
    require 'asm/types.ph';
    eval 'sub EV_VERSION () {0x10000;}' unless defined(&EV_VERSION);
    eval 'sub EVIOCGVERSION () { &_IOR(ord(\'E\'), 0x1, \'int\');}' unless defined(&EVIOCGVERSION);
    eval 'sub EVIOCGID () { &_IOR(ord(\'E\'), 0x2, \'short\'[4]);}' unless defined(&EVIOCGID);
    eval 'sub EVIOCGREP () { &_IOR(ord(\'E\'), 0x3, \'int\'[2]);}' unless defined(&EVIOCGREP);
    eval 'sub EVIOCSREP () { &_IOW(ord(\'E\'), 0x3, \'int\'[2]);}' unless defined(&EVIOCSREP);
    eval 'sub EVIOCGKEYCODE () { &_IOR(ord(\'E\'), 0x4, \'int\'[2]);}' unless defined(&EVIOCGKEYCODE);
    eval 'sub EVIOCSKEYCODE () { &_IOW(ord(\'E\'), 0x4, \'int\'[2]);}' unless defined(&EVIOCSKEYCODE);
    eval 'sub EVIOCGKEY () { &_IOR(ord(\'E\'), 0x5, \'int\'[2]);}' unless defined(&EVIOCGKEY);
    eval 'sub EVIOCGNAME {
        local($len) = @_;
	    eval q( &_IOC( &_IOC_READ, ord(\'E\'), 0x6, $len));
    }' unless defined(&EVIOCGNAME);
    eval 'sub EVIOCGBUS () { &_IOR(ord(\'E\'), 0x7, \'short\'[4]);}' unless defined(&EVIOCGBUS);
    eval 'sub EVIOCGBIT {
        local($ev,$len) = @_;
	    eval q( &_IOC( &_IOC_READ, ord(\'E\'), 0x20 + $ev, $len));
    }' unless defined(&EVIOCGBIT);
    eval 'sub EVIOCGABS {
        local($abs) = @_;
	    eval q( &_IOR(ord(\'E\'), 0x40 + $abs, \'int\'[5]));
    }' unless defined(&EVIOCGABS);
    eval 'sub EVIOCSFF () { &_IOC( &_IOC_WRITE, ord(\'E\'), 0x80, $sizeof{\'struct ff_effect\'});}' unless defined(&EVIOCSFF);
    eval 'sub EVIOCRMFF () { &_IOW(ord(\'E\'), 0x81, \'int\');}' unless defined(&EVIOCRMFF);
    eval 'sub EVIOCSGAIN () { &_IOW(ord(\'E\'), 0x82, \'unsigned short\');}' unless defined(&EVIOCSGAIN);
    eval 'sub EVIOCSAUTOCENTER () { &_IOW(ord(\'E\'), 0x83, \'unsigned short\');}' unless defined(&EVIOCSAUTOCENTER);
    eval 'sub EVIOCGEFFECTS () { &_IOR(ord(\'E\'), 0x84, \'int\');}' unless defined(&EVIOCGEFFECTS);
    eval 'sub EV_RST () {0x;}' unless defined(&EV_RST);
    eval 'sub EV_KEY () {0x1;}' unless defined(&EV_KEY);
    eval 'sub EV_REL () {0x2;}' unless defined(&EV_REL);
    eval 'sub EV_ABS () {0x3;}' unless defined(&EV_ABS);
    eval 'sub EV_MSC () {0x4;}' unless defined(&EV_MSC);
    eval 'sub EV_LED () {0x11;}' unless defined(&EV_LED);
    eval 'sub EV_SND () {0x12;}' unless defined(&EV_SND);
    eval 'sub EV_REP () {0x14;}' unless defined(&EV_REP);
    eval 'sub EV_FF () {0x15;}' unless defined(&EV_FF);
    eval 'sub EV_MAX () {0x1f;}' unless defined(&EV_MAX);
    eval 'sub KEY_RESERVED () {0;}' unless defined(&KEY_RESERVED);
    eval 'sub KEY_ESC () {1;}' unless defined(&KEY_ESC);
    eval 'sub KEY_1 () {2;}' unless defined(&KEY_1);
    eval 'sub KEY_2 () {3;}' unless defined(&KEY_2);
    eval 'sub KEY_3 () {4;}' unless defined(&KEY_3);
    eval 'sub KEY_4 () {5;}' unless defined(&KEY_4);
    eval 'sub KEY_5 () {6;}' unless defined(&KEY_5);
    eval 'sub KEY_6 () {7;}' unless defined(&KEY_6);
    eval 'sub KEY_7 () {8;}' unless defined(&KEY_7);
    eval 'sub KEY_8 () {9;}' unless defined(&KEY_8);
    eval 'sub KEY_9 () {10;}' unless defined(&KEY_9);
    eval 'sub KEY_0 () {11;}' unless defined(&KEY_0);
    eval 'sub KEY_MINUS () {12;}' unless defined(&KEY_MINUS);
    eval 'sub KEY_EQUAL () {13;}' unless defined(&KEY_EQUAL);
    eval 'sub KEY_BACKSPACE () {14;}' unless defined(&KEY_BACKSPACE);
    eval 'sub KEY_TAB () {15;}' unless defined(&KEY_TAB);
    eval 'sub KEY_Q () {16;}' unless defined(&KEY_Q);
    eval 'sub KEY_W () {17;}' unless defined(&KEY_W);
    eval 'sub KEY_E () {18;}' unless defined(&KEY_E);
    eval 'sub KEY_R () {19;}' unless defined(&KEY_R);
    eval 'sub KEY_T () {20;}' unless defined(&KEY_T);
    eval 'sub KEY_Y () {21;}' unless defined(&KEY_Y);
    eval 'sub KEY_U () {22;}' unless defined(&KEY_U);
    eval 'sub KEY_I () {23;}' unless defined(&KEY_I);
    eval 'sub KEY_O () {24;}' unless defined(&KEY_O);
    eval 'sub KEY_P () {25;}' unless defined(&KEY_P);
    eval 'sub KEY_LEFTBRACE () {26;}' unless defined(&KEY_LEFTBRACE);
    eval 'sub KEY_RIGHTBRACE () {27;}' unless defined(&KEY_RIGHTBRACE);
    eval 'sub KEY_ENTER () {28;}' unless defined(&KEY_ENTER);
    eval 'sub KEY_LEFTCTRL () {29;}' unless defined(&KEY_LEFTCTRL);
    eval 'sub KEY_A () {30;}' unless defined(&KEY_A);
    eval 'sub KEY_S () {31;}' unless defined(&KEY_S);
    eval 'sub KEY_D () {32;}' unless defined(&KEY_D);
    eval 'sub KEY_F () {33;}' unless defined(&KEY_F);
    eval 'sub KEY_G () {34;}' unless defined(&KEY_G);
    eval 'sub KEY_H () {35;}' unless defined(&KEY_H);
    eval 'sub KEY_J () {36;}' unless defined(&KEY_J);
    eval 'sub KEY_K () {37;}' unless defined(&KEY_K);
    eval 'sub KEY_L () {38;}' unless defined(&KEY_L);
    eval 'sub KEY_SEMICOLON () {39;}' unless defined(&KEY_SEMICOLON);
    eval 'sub KEY_APOSTROPHE () {40;}' unless defined(&KEY_APOSTROPHE);
    eval 'sub KEY_GRAVE () {41;}' unless defined(&KEY_GRAVE);
    eval 'sub KEY_LEFTSHIFT () {42;}' unless defined(&KEY_LEFTSHIFT);
    eval 'sub KEY_BACKSLASH () {43;}' unless defined(&KEY_BACKSLASH);
    eval 'sub KEY_Z () {44;}' unless defined(&KEY_Z);
    eval 'sub KEY_X () {45;}' unless defined(&KEY_X);
    eval 'sub KEY_C () {46;}' unless defined(&KEY_C);
    eval 'sub KEY_V () {47;}' unless defined(&KEY_V);
    eval 'sub KEY_B () {48;}' unless defined(&KEY_B);
    eval 'sub KEY_N () {49;}' unless defined(&KEY_N);
    eval 'sub KEY_M () {50;}' unless defined(&KEY_M);
    eval 'sub KEY_COMMA () {51;}' unless defined(&KEY_COMMA);
    eval 'sub KEY_DOT () {52;}' unless defined(&KEY_DOT);
    eval 'sub KEY_SLASH () {53;}' unless defined(&KEY_SLASH);
    eval 'sub KEY_RIGHTSHIFT () {54;}' unless defined(&KEY_RIGHTSHIFT);
    eval 'sub KEY_KPASTERISK () {55;}' unless defined(&KEY_KPASTERISK);
    eval 'sub KEY_LEFTALT () {56;}' unless defined(&KEY_LEFTALT);
    eval 'sub KEY_SPACE () {57;}' unless defined(&KEY_SPACE);
    eval 'sub KEY_CAPSLOCK () {58;}' unless defined(&KEY_CAPSLOCK);
    eval 'sub KEY_F1 () {59;}' unless defined(&KEY_F1);
    eval 'sub KEY_F2 () {60;}' unless defined(&KEY_F2);
    eval 'sub KEY_F3 () {61;}' unless defined(&KEY_F3);
    eval 'sub KEY_F4 () {62;}' unless defined(&KEY_F4);
    eval 'sub KEY_F5 () {63;}' unless defined(&KEY_F5);
    eval 'sub KEY_F6 () {64;}' unless defined(&KEY_F6);
    eval 'sub KEY_F7 () {65;}' unless defined(&KEY_F7);
    eval 'sub KEY_F8 () {66;}' unless defined(&KEY_F8);
    eval 'sub KEY_F9 () {67;}' unless defined(&KEY_F9);
    eval 'sub KEY_F10 () {68;}' unless defined(&KEY_F10);
    eval 'sub KEY_NUMLOCK () {69;}' unless defined(&KEY_NUMLOCK);
    eval 'sub KEY_SCROLLLOCK () {70;}' unless defined(&KEY_SCROLLLOCK);
    eval 'sub KEY_KP7 () {71;}' unless defined(&KEY_KP7);
    eval 'sub KEY_KP8 () {72;}' unless defined(&KEY_KP8);
    eval 'sub KEY_KP9 () {73;}' unless defined(&KEY_KP9);
    eval 'sub KEY_KPMINUS () {74;}' unless defined(&KEY_KPMINUS);
    eval 'sub KEY_KP4 () {75;}' unless defined(&KEY_KP4);
    eval 'sub KEY_KP5 () {76;}' unless defined(&KEY_KP5);
    eval 'sub KEY_KP6 () {77;}' unless defined(&KEY_KP6);
    eval 'sub KEY_KPPLUS () {78;}' unless defined(&KEY_KPPLUS);
    eval 'sub KEY_KP1 () {79;}' unless defined(&KEY_KP1);
    eval 'sub KEY_KP2 () {80;}' unless defined(&KEY_KP2);
    eval 'sub KEY_KP3 () {81;}' unless defined(&KEY_KP3);
    eval 'sub KEY_KP0 () {82;}' unless defined(&KEY_KP0);
    eval 'sub KEY_KPDOT () {83;}' unless defined(&KEY_KPDOT);
    eval 'sub KEY_103RD () {84;}' unless defined(&KEY_103RD);
    eval 'sub KEY_F13 () {85;}' unless defined(&KEY_F13);
    eval 'sub KEY_102ND () {86;}' unless defined(&KEY_102ND);
    eval 'sub KEY_F11 () {87;}' unless defined(&KEY_F11);
    eval 'sub KEY_F12 () {88;}' unless defined(&KEY_F12);
    eval 'sub KEY_F14 () {89;}' unless defined(&KEY_F14);
    eval 'sub KEY_F15 () {90;}' unless defined(&KEY_F15);
    eval 'sub KEY_F16 () {91;}' unless defined(&KEY_F16);
    eval 'sub KEY_F17 () {92;}' unless defined(&KEY_F17);
    eval 'sub KEY_F18 () {93;}' unless defined(&KEY_F18);
    eval 'sub KEY_F19 () {94;}' unless defined(&KEY_F19);
    eval 'sub KEY_F20 () {95;}' unless defined(&KEY_F20);
    eval 'sub KEY_KPENTER () {96;}' unless defined(&KEY_KPENTER);
    eval 'sub KEY_RIGHTCTRL () {97;}' unless defined(&KEY_RIGHTCTRL);
    eval 'sub KEY_KPSLASH () {98;}' unless defined(&KEY_KPSLASH);
    eval 'sub KEY_SYSRQ () {99;}' unless defined(&KEY_SYSRQ);
    eval 'sub KEY_RIGHTALT () {100;}' unless defined(&KEY_RIGHTALT);
    eval 'sub KEY_LINEFEED () {101;}' unless defined(&KEY_LINEFEED);
    eval 'sub KEY_HOME () {102;}' unless defined(&KEY_HOME);
    eval 'sub KEY_UP () {103;}' unless defined(&KEY_UP);
    eval 'sub KEY_PAGEUP () {104;}' unless defined(&KEY_PAGEUP);
    eval 'sub KEY_LEFT () {105;}' unless defined(&KEY_LEFT);
    eval 'sub KEY_RIGHT () {106;}' unless defined(&KEY_RIGHT);
    eval 'sub KEY_END () {107;}' unless defined(&KEY_END);
    eval 'sub KEY_DOWN () {108;}' unless defined(&KEY_DOWN);
    eval 'sub KEY_PAGEDOWN () {109;}' unless defined(&KEY_PAGEDOWN);
    eval 'sub KEY_INSERT () {110;}' unless defined(&KEY_INSERT);
    eval 'sub KEY_DELETE () {111;}' unless defined(&KEY_DELETE);
    eval 'sub KEY_MACRO () {112;}' unless defined(&KEY_MACRO);
    eval 'sub KEY_MUTE () {113;}' unless defined(&KEY_MUTE);
    eval 'sub KEY_VOLUMEDOWN () {114;}' unless defined(&KEY_VOLUMEDOWN);
    eval 'sub KEY_VOLUMEUP () {115;}' unless defined(&KEY_VOLUMEUP);
    eval 'sub KEY_POWER () {116;}' unless defined(&KEY_POWER);
    eval 'sub KEY_KPEQUAL () {117;}' unless defined(&KEY_KPEQUAL);
    eval 'sub KEY_KPPLUSMINUS () {118;}' unless defined(&KEY_KPPLUSMINUS);
    eval 'sub KEY_PAUSE () {119;}' unless defined(&KEY_PAUSE);
    eval 'sub KEY_F21 () {120;}' unless defined(&KEY_F21);
    eval 'sub KEY_F22 () {121;}' unless defined(&KEY_F22);
    eval 'sub KEY_F23 () {122;}' unless defined(&KEY_F23);
    eval 'sub KEY_F24 () {123;}' unless defined(&KEY_F24);
    eval 'sub KEY_KPCOMMA () {124;}' unless defined(&KEY_KPCOMMA);
    eval 'sub KEY_LEFTMETA () {125;}' unless defined(&KEY_LEFTMETA);
    eval 'sub KEY_RIGHTMETA () {126;}' unless defined(&KEY_RIGHTMETA);
    eval 'sub KEY_COMPOSE () {127;}' unless defined(&KEY_COMPOSE);
    eval 'sub KEY_STOP () {128;}' unless defined(&KEY_STOP);
    eval 'sub KEY_AGAIN () {129;}' unless defined(&KEY_AGAIN);
    eval 'sub KEY_PROPS () {130;}' unless defined(&KEY_PROPS);
    eval 'sub KEY_UNDO () {131;}' unless defined(&KEY_UNDO);
    eval 'sub KEY_FRONT () {132;}' unless defined(&KEY_FRONT);
    eval 'sub KEY_COPY () {133;}' unless defined(&KEY_COPY);
    eval 'sub KEY_OPEN () {134;}' unless defined(&KEY_OPEN);
    eval 'sub KEY_PASTE () {135;}' unless defined(&KEY_PASTE);
    eval 'sub KEY_FIND () {136;}' unless defined(&KEY_FIND);
    eval 'sub KEY_CUT () {137;}' unless defined(&KEY_CUT);
    eval 'sub KEY_HELP () {138;}' unless defined(&KEY_HELP);
    eval 'sub KEY_MENU () {139;}' unless defined(&KEY_MENU);
    eval 'sub KEY_CALC () {140;}' unless defined(&KEY_CALC);
    eval 'sub KEY_SETUP () {141;}' unless defined(&KEY_SETUP);
    eval 'sub KEY_SLEEP () {142;}' unless defined(&KEY_SLEEP);
    eval 'sub KEY_WAKEUP () {143;}' unless defined(&KEY_WAKEUP);
    eval 'sub KEY_FILE () {144;}' unless defined(&KEY_FILE);
    eval 'sub KEY_SENDFILE () {145;}' unless defined(&KEY_SENDFILE);
    eval 'sub KEY_DELETEFILE () {146;}' unless defined(&KEY_DELETEFILE);
    eval 'sub KEY_XFER () {147;}' unless defined(&KEY_XFER);
    eval 'sub KEY_PROG1 () {148;}' unless defined(&KEY_PROG1);
    eval 'sub KEY_PROG2 () {149;}' unless defined(&KEY_PROG2);
    eval 'sub KEY_WWW () {150;}' unless defined(&KEY_WWW);
    eval 'sub KEY_MSDOS () {151;}' unless defined(&KEY_MSDOS);
    eval 'sub KEY_COFFEE () {152;}' unless defined(&KEY_COFFEE);
    eval 'sub KEY_DIRECTION () {153;}' unless defined(&KEY_DIRECTION);
    eval 'sub KEY_CYCLEWINDOWS () {154;}' unless defined(&KEY_CYCLEWINDOWS);
    eval 'sub KEY_MAIL () {155;}' unless defined(&KEY_MAIL);
    eval 'sub KEY_BOOKMARKS () {156;}' unless defined(&KEY_BOOKMARKS);
    eval 'sub KEY_COMPUTER () {157;}' unless defined(&KEY_COMPUTER);
    eval 'sub KEY_BACK () {158;}' unless defined(&KEY_BACK);
    eval 'sub KEY_FORWARD () {159;}' unless defined(&KEY_FORWARD);
    eval 'sub KEY_CLOSECD () {160;}' unless defined(&KEY_CLOSECD);
    eval 'sub KEY_EJECTCD () {161;}' unless defined(&KEY_EJECTCD);
    eval 'sub KEY_EJECTCLOSECD () {162;}' unless defined(&KEY_EJECTCLOSECD);
    eval 'sub KEY_NEXTSONG () {163;}' unless defined(&KEY_NEXTSONG);
    eval 'sub KEY_PLAYPAUSE () {164;}' unless defined(&KEY_PLAYPAUSE);
    eval 'sub KEY_PREVIOUSSONG () {165;}' unless defined(&KEY_PREVIOUSSONG);
    eval 'sub KEY_STOPCD () {166;}' unless defined(&KEY_STOPCD);
    eval 'sub KEY_RECORD () {167;}' unless defined(&KEY_RECORD);
    eval 'sub KEY_REWIND () {168;}' unless defined(&KEY_REWIND);
    eval 'sub KEY_PHONE () {169;}' unless defined(&KEY_PHONE);
    eval 'sub KEY_ISO () {170;}' unless defined(&KEY_ISO);
    eval 'sub KEY_CONFIG () {171;}' unless defined(&KEY_CONFIG);
    eval 'sub KEY_HOMEPAGE () {172;}' unless defined(&KEY_HOMEPAGE);
    eval 'sub KEY_REFRESH () {173;}' unless defined(&KEY_REFRESH);
    eval 'sub KEY_EXIT () {174;}' unless defined(&KEY_EXIT);
    eval 'sub KEY_MOVE () {175;}' unless defined(&KEY_MOVE);
    eval 'sub KEY_EDIT () {176;}' unless defined(&KEY_EDIT);
    eval 'sub KEY_SCROLLUP () {177;}' unless defined(&KEY_SCROLLUP);
    eval 'sub KEY_SCROLLDOWN () {178;}' unless defined(&KEY_SCROLLDOWN);
    eval 'sub KEY_KPLEFTPAREN () {179;}' unless defined(&KEY_KPLEFTPAREN);
    eval 'sub KEY_KPRIGHTPAREN () {180;}' unless defined(&KEY_KPRIGHTPAREN);
    eval 'sub KEY_INTL1 () {181;}' unless defined(&KEY_INTL1);
    eval 'sub KEY_INTL2 () {182;}' unless defined(&KEY_INTL2);
    eval 'sub KEY_INTL3 () {183;}' unless defined(&KEY_INTL3);
    eval 'sub KEY_INTL4 () {184;}' unless defined(&KEY_INTL4);
    eval 'sub KEY_INTL5 () {185;}' unless defined(&KEY_INTL5);
    eval 'sub KEY_INTL6 () {186;}' unless defined(&KEY_INTL6);
    eval 'sub KEY_INTL7 () {187;}' unless defined(&KEY_INTL7);
    eval 'sub KEY_INTL8 () {188;}' unless defined(&KEY_INTL8);
    eval 'sub KEY_INTL9 () {189;}' unless defined(&KEY_INTL9);
    eval 'sub KEY_LANG1 () {190;}' unless defined(&KEY_LANG1);
    eval 'sub KEY_LANG2 () {191;}' unless defined(&KEY_LANG2);
    eval 'sub KEY_LANG3 () {192;}' unless defined(&KEY_LANG3);
    eval 'sub KEY_LANG4 () {193;}' unless defined(&KEY_LANG4);
    eval 'sub KEY_LANG5 () {194;}' unless defined(&KEY_LANG5);
    eval 'sub KEY_LANG6 () {195;}' unless defined(&KEY_LANG6);
    eval 'sub KEY_LANG7 () {196;}' unless defined(&KEY_LANG7);
    eval 'sub KEY_LANG8 () {197;}' unless defined(&KEY_LANG8);
    eval 'sub KEY_LANG9 () {198;}' unless defined(&KEY_LANG9);
    eval 'sub KEY_PLAYCD () {200;}' unless defined(&KEY_PLAYCD);
    eval 'sub KEY_PAUSECD () {201;}' unless defined(&KEY_PAUSECD);
    eval 'sub KEY_PROG3 () {202;}' unless defined(&KEY_PROG3);
    eval 'sub KEY_PROG4 () {203;}' unless defined(&KEY_PROG4);
    eval 'sub KEY_SUSPEND () {205;}' unless defined(&KEY_SUSPEND);
    eval 'sub KEY_CLOSE () {206;}' unless defined(&KEY_CLOSE);
    eval 'sub KEY_UNKNOWN () {220;}' unless defined(&KEY_UNKNOWN);
    eval 'sub BTN_MISC () {0x100;}' unless defined(&BTN_MISC);
    eval 'sub BTN_0 () {0x100;}' unless defined(&BTN_0);
    eval 'sub BTN_1 () {0x101;}' unless defined(&BTN_1);
    eval 'sub BTN_2 () {0x102;}' unless defined(&BTN_2);
    eval 'sub BTN_3 () {0x103;}' unless defined(&BTN_3);
    eval 'sub BTN_4 () {0x104;}' unless defined(&BTN_4);
    eval 'sub BTN_5 () {0x105;}' unless defined(&BTN_5);
    eval 'sub BTN_6 () {0x106;}' unless defined(&BTN_6);
    eval 'sub BTN_7 () {0x107;}' unless defined(&BTN_7);
    eval 'sub BTN_8 () {0x108;}' unless defined(&BTN_8);
    eval 'sub BTN_9 () {0x109;}' unless defined(&BTN_9);
    eval 'sub BTN_MOUSE () {0x110;}' unless defined(&BTN_MOUSE);
    eval 'sub BTN_LEFT () {0x110;}' unless defined(&BTN_LEFT);
    eval 'sub BTN_RIGHT () {0x111;}' unless defined(&BTN_RIGHT);
    eval 'sub BTN_MIDDLE () {0x112;}' unless defined(&BTN_MIDDLE);
    eval 'sub BTN_SIDE () {0x113;}' unless defined(&BTN_SIDE);
    eval 'sub BTN_EXTRA () {0x114;}' unless defined(&BTN_EXTRA);
    eval 'sub BTN_FORWARD () {0x115;}' unless defined(&BTN_FORWARD);
    eval 'sub BTN_BACK () {0x116;}' unless defined(&BTN_BACK);
    eval 'sub BTN_JOYSTICK () {0x120;}' unless defined(&BTN_JOYSTICK);
    eval 'sub BTN_TRIGGER () {0x120;}' unless defined(&BTN_TRIGGER);
    eval 'sub BTN_THUMB () {0x121;}' unless defined(&BTN_THUMB);
    eval 'sub BTN_THUMB2 () {0x122;}' unless defined(&BTN_THUMB2);
    eval 'sub BTN_TOP () {0x123;}' unless defined(&BTN_TOP);
    eval 'sub BTN_TOP2 () {0x124;}' unless defined(&BTN_TOP2);
    eval 'sub BTN_PINKIE () {0x125;}' unless defined(&BTN_PINKIE);
    eval 'sub BTN_BASE () {0x126;}' unless defined(&BTN_BASE);
    eval 'sub BTN_BASE2 () {0x127;}' unless defined(&BTN_BASE2);
    eval 'sub BTN_BASE3 () {0x128;}' unless defined(&BTN_BASE3);
    eval 'sub BTN_BASE4 () {0x129;}' unless defined(&BTN_BASE4);
    eval 'sub BTN_BASE5 () {0x12a;}' unless defined(&BTN_BASE5);
    eval 'sub BTN_BASE6 () {0x12b;}' unless defined(&BTN_BASE6);
    eval 'sub BTN_DEAD () {0x12f;}' unless defined(&BTN_DEAD);
    eval 'sub BTN_GAMEPAD () {0x130;}' unless defined(&BTN_GAMEPAD);
    eval 'sub BTN_A () {0x130;}' unless defined(&BTN_A);
    eval 'sub BTN_B () {0x131;}' unless defined(&BTN_B);
    eval 'sub BTN_C () {0x132;}' unless defined(&BTN_C);
    eval 'sub BTN_X () {0x133;}' unless defined(&BTN_X);
    eval 'sub BTN_Y () {0x134;}' unless defined(&BTN_Y);
    eval 'sub BTN_Z () {0x135;}' unless defined(&BTN_Z);
    eval 'sub BTN_TL () {0x136;}' unless defined(&BTN_TL);
    eval 'sub BTN_TR () {0x137;}' unless defined(&BTN_TR);
    eval 'sub BTN_TL2 () {0x138;}' unless defined(&BTN_TL2);
    eval 'sub BTN_TR2 () {0x139;}' unless defined(&BTN_TR2);
    eval 'sub BTN_SELECT () {0x13a;}' unless defined(&BTN_SELECT);
    eval 'sub BTN_START () {0x13b;}' unless defined(&BTN_START);
    eval 'sub BTN_MODE () {0x13c;}' unless defined(&BTN_MODE);
    eval 'sub BTN_THUMBL () {0x13d;}' unless defined(&BTN_THUMBL);
    eval 'sub BTN_THUMBR () {0x13e;}' unless defined(&BTN_THUMBR);
    eval 'sub BTN_DIGI () {0x140;}' unless defined(&BTN_DIGI);
    eval 'sub BTN_TOOL_PEN () {0x140;}' unless defined(&BTN_TOOL_PEN);
    eval 'sub BTN_TOOL_RUBBER () {0x141;}' unless defined(&BTN_TOOL_RUBBER);
    eval 'sub BTN_TOOL_BRUSH () {0x142;}' unless defined(&BTN_TOOL_BRUSH);
    eval 'sub BTN_TOOL_PENCIL () {0x143;}' unless defined(&BTN_TOOL_PENCIL);
    eval 'sub BTN_TOOL_AIRBRUSH () {0x144;}' unless defined(&BTN_TOOL_AIRBRUSH);
    eval 'sub BTN_TOOL_FINGER () {0x145;}' unless defined(&BTN_TOOL_FINGER);
    eval 'sub BTN_TOOL_MOUSE () {0x146;}' unless defined(&BTN_TOOL_MOUSE);
    eval 'sub BTN_TOOL_LENS () {0x147;}' unless defined(&BTN_TOOL_LENS);
    eval 'sub BTN_TOUCH () {0x14a;}' unless defined(&BTN_TOUCH);
    eval 'sub BTN_STYLUS () {0x14b;}' unless defined(&BTN_STYLUS);
    eval 'sub BTN_STYLUS2 () {0x14c;}' unless defined(&BTN_STYLUS2);
    eval 'sub KEY_MAX () {0x1ff;}' unless defined(&KEY_MAX);
    eval 'sub REL_X () {0x;}' unless defined(&REL_X);
    eval 'sub REL_Y () {0x1;}' unless defined(&REL_Y);
    eval 'sub REL_Z () {0x2;}' unless defined(&REL_Z);
    eval 'sub REL_HWHEEL () {0x6;}' unless defined(&REL_HWHEEL);
    eval 'sub REL_DIAL () {0x7;}' unless defined(&REL_DIAL);
    eval 'sub REL_WHEEL () {0x8;}' unless defined(&REL_WHEEL);
    eval 'sub REL_MISC () {0x9;}' unless defined(&REL_MISC);
    eval 'sub REL_MAX () {0xf;}' unless defined(&REL_MAX);
    eval 'sub ABS_X () {0x;}' unless defined(&ABS_X);
    eval 'sub ABS_Y () {0x1;}' unless defined(&ABS_Y);
    eval 'sub ABS_Z () {0x2;}' unless defined(&ABS_Z);
    eval 'sub ABS_RX () {0x3;}' unless defined(&ABS_RX);
    eval 'sub ABS_RY () {0x4;}' unless defined(&ABS_RY);
    eval 'sub ABS_RZ () {0x5;}' unless defined(&ABS_RZ);
    eval 'sub ABS_THROTTLE () {0x6;}' unless defined(&ABS_THROTTLE);
    eval 'sub ABS_RUDDER () {0x7;}' unless defined(&ABS_RUDDER);
    eval 'sub ABS_WHEEL () {0x8;}' unless defined(&ABS_WHEEL);
    eval 'sub ABS_GAS () {0x9;}' unless defined(&ABS_GAS);
    eval 'sub ABS_BRAKE () {0xa;}' unless defined(&ABS_BRAKE);
    eval 'sub ABS_HAT0X () {0x10;}' unless defined(&ABS_HAT0X);
    eval 'sub ABS_HAT0Y () {0x11;}' unless defined(&ABS_HAT0Y);
    eval 'sub ABS_HAT1X () {0x12;}' unless defined(&ABS_HAT1X);
    eval 'sub ABS_HAT1Y () {0x13;}' unless defined(&ABS_HAT1Y);
    eval 'sub ABS_HAT2X () {0x14;}' unless defined(&ABS_HAT2X);
    eval 'sub ABS_HAT2Y () {0x15;}' unless defined(&ABS_HAT2Y);
    eval 'sub ABS_HAT3X () {0x16;}' unless defined(&ABS_HAT3X);
    eval 'sub ABS_HAT3Y () {0x17;}' unless defined(&ABS_HAT3Y);
    eval 'sub ABS_PRESSURE () {0x18;}' unless defined(&ABS_PRESSURE);
    eval 'sub ABS_DISTANCE () {0x19;}' unless defined(&ABS_DISTANCE);
    eval 'sub ABS_TILT_X () {0x1a;}' unless defined(&ABS_TILT_X);
    eval 'sub ABS_TILT_Y () {0x1b;}' unless defined(&ABS_TILT_Y);
    eval 'sub ABS_MISC () {0x1c;}' unless defined(&ABS_MISC);
    eval 'sub ABS_MAX () {0x1f;}' unless defined(&ABS_MAX);
    eval 'sub MSC_SERIAL () {0x;}' unless defined(&MSC_SERIAL);
    eval 'sub MSC_MAX () {0x7;}' unless defined(&MSC_MAX);
    eval 'sub LED_NUML () {0x;}' unless defined(&LED_NUML);
    eval 'sub LED_CAPSL () {0x1;}' unless defined(&LED_CAPSL);
    eval 'sub LED_SCROLLL () {0x2;}' unless defined(&LED_SCROLLL);
    eval 'sub LED_COMPOSE () {0x3;}' unless defined(&LED_COMPOSE);
    eval 'sub LED_KANA () {0x4;}' unless defined(&LED_KANA);
    eval 'sub LED_SLEEP () {0x5;}' unless defined(&LED_SLEEP);
    eval 'sub LED_SUSPEND () {0x6;}' unless defined(&LED_SUSPEND);
    eval 'sub LED_MUTE () {0x7;}' unless defined(&LED_MUTE);
    eval 'sub LED_MISC () {0x8;}' unless defined(&LED_MISC);
    eval 'sub LED_MAX () {0xf;}' unless defined(&LED_MAX);
    eval 'sub REP_DELAY () {0x;}' unless defined(&REP_DELAY);
    eval 'sub REP_PERIOD () {0x1;}' unless defined(&REP_PERIOD);
    eval 'sub REP_MAX () {0x1;}' unless defined(&REP_MAX);
    eval 'sub SND_CLICK () {0x;}' unless defined(&SND_CLICK);
    eval 'sub SND_BELL () {0x1;}' unless defined(&SND_BELL);
    eval 'sub SND_MAX () {0x7;}' unless defined(&SND_MAX);
    eval 'sub ID_BUS () {0;}' unless defined(&ID_BUS);
    eval 'sub ID_VENDOR () {1;}' unless defined(&ID_VENDOR);
    eval 'sub ID_PRODUCT () {2;}' unless defined(&ID_PRODUCT);
    eval 'sub ID_VERSION () {3;}' unless defined(&ID_VERSION);
    eval 'sub BUS_PCI () {0x1;}' unless defined(&BUS_PCI);
    eval 'sub BUS_ISAPNP () {0x2;}' unless defined(&BUS_ISAPNP);
    eval 'sub BUS_USB () {0x3;}' unless defined(&BUS_USB);
    eval 'sub BUS_ISA () {0x10;}' unless defined(&BUS_ISA);
    eval 'sub BUS_I8042 () {0x11;}' unless defined(&BUS_I8042);
    eval 'sub BUS_XTKBD () {0x12;}' unless defined(&BUS_XTKBD);
    eval 'sub BUS_RS232 () {0x13;}' unless defined(&BUS_RS232);
    eval 'sub BUS_GAMEPORT () {0x14;}' unless defined(&BUS_GAMEPORT);
    eval 'sub BUS_PARPORT () {0x15;}' unless defined(&BUS_PARPORT);
    eval 'sub BUS_AMIGA () {0x16;}' unless defined(&BUS_AMIGA);
    eval 'sub BUS_ADB () {0x17;}' unless defined(&BUS_ADB);
    eval 'sub BUS_I2C () {0x18;}' unless defined(&BUS_I2C);
    eval 'sub FF_BTN {
        local($x) = @_;
	    eval q((($x) -  &BTN_MISC +  &FF_BTN_OFFSET));
    }' unless defined(&FF_BTN);
    eval 'sub FF_BTN_OFFSET () {0x;}' unless defined(&FF_BTN_OFFSET);
    eval 'sub FF_ABS {
        local($x) = @_;
	    eval q((($x) +  &FF_ABS_OFFSET));
    }' unless defined(&FF_ABS);
    eval 'sub FF_ABS_OFFSET () {0x40;}' unless defined(&FF_ABS_OFFSET);
    eval 'sub FF_RUMBLE () {0x50;}' unless defined(&FF_RUMBLE);
    eval 'sub FF_PERIODIC () {0x51;}' unless defined(&FF_PERIODIC);
    eval 'sub FF_CONSTANT () {0x52;}' unless defined(&FF_CONSTANT);
    eval 'sub FF_SPRING () {0x53;}' unless defined(&FF_SPRING);
    eval 'sub FF_FRICTION () {0x54;}' unless defined(&FF_FRICTION);
    eval 'sub FF_SQUARE () {0x58;}' unless defined(&FF_SQUARE);
    eval 'sub FF_TRIANGLE () {0x59;}' unless defined(&FF_TRIANGLE);
    eval 'sub FF_SINE () {0x5a;}' unless defined(&FF_SINE);
    eval 'sub FF_SAW_UP () {0x5b;}' unless defined(&FF_SAW_UP);
    eval 'sub FF_SAW_DOWN () {0x5c;}' unless defined(&FF_SAW_DOWN);
    eval 'sub FF_CUSTOM () {0x5d;}' unless defined(&FF_CUSTOM);
    eval 'sub FF_GAIN () {0x60;}' unless defined(&FF_GAIN);
    eval 'sub FF_AUTOCENTER () {0x61;}' unless defined(&FF_AUTOCENTER);
    eval 'sub FF_MAX () {0x7f;}' unless defined(&FF_MAX);
}
1;
