use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

/// An [EvdevConfig] defines a matching evdev input event
#[derive(Debug, Deserialize, Serialize, Clone, JsonSchema, PartialEq)]
#[serde(rename_all = "snake_case")]
pub struct EvdevConfig {
    pub event_type: EventType,
    pub event_code: EventCode,
    pub event_value: Option<u16>,
    pub value_type: ValueType,
    pub axis_direction: Option<AxisDirection>,
}

#[derive(Debug, Deserialize, Serialize, Clone, JsonSchema, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum ValueType {
    Button,
    Trigger,
    JoystickX,
    JoystickY,
    ImuX,
    ImuY,
    ImuZ,
}

/// The AxisDirection can be used to map one half of an axis to a particular
/// capability. For example, you can map the negative values of `ABS_Y` to the
/// `DPadDown` capability and the positive values of `ABS_Y` to `DPadUp`.
#[derive(Debug, Deserialize, Serialize, Clone, JsonSchema, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum AxisDirection {
    None,
    Positive,
    Negative,
}

#[derive(Debug, Deserialize, Serialize, Clone, JsonSchema, PartialEq, Copy)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum EventType {
    /// A bookkeeping event. Usually not important to applications.
    Sync = 0x00,
    /// A key changed state. A key, or button, is usually a momentary switch (in the circuit sense). It has two
    /// states: down, or up. There are events for when keys are pressed (become down) and
    /// released (become up). There are also "key repeats", where multiple events are sent
    /// while a key is down.
    Key = 0x01,
    /// Movement on a relative axis. There is no absolute coordinate frame, just the fact that
    /// there was a change of a certain amount of units. Used for things like mouse movement or
    /// scroll wheels.
    Rel = 0x02,
    /// Movement on an absolute axis. Used for things such as touch events and joysticks.
    Abs = 0x03,
    /// Miscellaneous events that don't fall into other categories. For example, Key presses may
    /// send `MSC_SCAN` events before each KEY event
    Msc = 0x04,
    /// Change in a switch value. Switches are boolean conditions and usually correspond to a
    /// toggle switch of some kind in hardware.
    Sw = 0x05,
    /// An LED was toggled.
    Led = 0x11,
    /// A sound was made.
    Snd = 0x12,
    /// Metadata about key repeat configuration.
    Rep = 0x14,
    /// Sent to the device with a previusly obtained effect id as a code in order to toggle the effect.
    Ff = 0x15,
    /// Used to trigger power events such as suspend or power off.
    Pwr = 0x16,
    /// A force feedback effect's state changed.
    FfStatus = 0x17,
    /// An event originating from uinput.
    Uinput = 0x0101,
}

impl EventType {
    pub fn as_u16(&self) -> u16 {
        *self as u16
    }
}

#[derive(Debug, Deserialize, Serialize, Clone, JsonSchema, PartialEq)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum EventCode {
    SynReport,
    SynConfig,
    SynMtReport,
    SynDropped,
    KeyReserved,
    KeyEsc,
    Key1,
    Key2,
    Key3,
    Key4,
    Key5,
    Key6,
    Key7,
    Key8,
    Key9,
    Key0,
    KeyMinus,
    KeyEqual,
    KeyBackspace,
    KeyTab,
    KeyQ,
    KeyW,
    KeyE,
    KeyR,
    KeyT,
    KeyY,
    KeyU,
    KeyI,
    KeyO,
    KeyP,
    KeyLeftbrace,
    KeyRightbrace,
    KeyEnter,
    KeyLeftctrl,
    KeyA,
    KeyS,
    KeyD,
    KeyF,
    KeyG,
    KeyH,
    KeyJ,
    KeyK,
    KeyL,
    KeySemicolon,
    KeyApostrophe,
    KeyGrave,
    KeyLeftshift,
    KeyBackslash,
    KeyZ,
    KeyX,
    KeyC,
    KeyV,
    KeyB,
    KeyN,
    KeyM,
    KeyComma,
    KeyDot,
    KeySlash,
    KeyRightshift,
    KeyKpasterisk,
    KeyLeftalt,
    KeySpace,
    KeyCapslock,
    KeyF1,
    KeyF2,
    KeyF3,
    KeyF4,
    KeyF5,
    KeyF6,
    KeyF7,
    KeyF8,
    KeyF9,
    KeyF10,
    KeyNumlock,
    KeyScrolllock,
    KeyKp7,
    KeyKp8,
    KeyKp9,
    KeyKpminus,
    KeyKp4,
    KeyKp5,
    KeyKp6,
    KeyKpplus,
    KeyKp1,
    KeyKp2,
    KeyKp3,
    KeyKp0,
    KeyKpdot,
    KeyZenkakuhankaku,
    Key102nd,
    KeyF11,
    KeyF12,
    KeyRo,
    KeyKatakana,
    KeyHiragana,
    KeyHenkan,
    KeyKatakanahiragana,
    KeyMuhenkan,
    KeyKpjpcomma,
    KeyKpenter,
    KeyRightctrl,
    KeyKpslash,
    KeySysrq,
    KeyRightalt,
    KeyLinefeed,
    KeyHome,
    KeyUp,
    KeyPageup,
    KeyLeft,
    KeyRight,
    KeyEnd,
    KeyDown,
    KeyPagedown,
    KeyInsert,
    KeyDelete,
    KeyMacro,
    KeyMute,
    KeyVolumedown,
    KeyVolumeup,
    KeyPower,
    KeyKpequal,
    KeyKpplusminus,
    KeyPause,
    KeyScale,
    KeyKpcomma,
    KeyHangeul,
    KeyHanja,
    KeyYen,
    KeyLeftmeta,
    KeyRightmeta,
    KeyCompose,
    KeyStop,
    KeyAgain,
    KeyProps,
    KeyUndo,
    KeyFront,
    KeyCopy,
    KeyOpen,
    KeyPaste,
    KeyFind,
    KeyCut,
    KeyHelp,
    KeyMenu,
    KeyCalc,
    KeySetup,
    KeySleep,
    KeyWakeup,
    KeyFile,
    KeySendfile,
    KeyDeletefile,
    KeyXfer,
    KeyProg1,
    KeyProg2,
    KeyWww,
    KeyMsdos,
    KeyScreenlock,
    KeyRotateDisplay,
    KeyCyclewindows,
    KeyMail,
    KeyBookmarks,
    KeyComputer,
    KeyBack,
    KeyForward,
    KeyClosecd,
    KeyEjectcd,
    KeyEjectclosecd,
    KeyNextsong,
    KeyPlaypause,
    KeyPrevioussong,
    KeyStopcd,
    KeyRecord,
    KeyRewind,
    KeyPhone,
    KeyIso,
    KeyConfig,
    KeyHomepage,
    KeyRefresh,
    KeyExit,
    KeyMove,
    KeyEdit,
    KeyScrollup,
    KeyScrolldown,
    KeyKpleftparen,
    KeyKprightparen,
    KeyNew,
    KeyRedo,
    KeyF13,
    KeyF14,
    KeyF15,
    KeyF16,
    KeyF17,
    KeyF18,
    KeyF19,
    KeyF20,
    KeyF21,
    KeyF22,
    KeyF23,
    KeyF24,
    KeyPlaycd,
    KeyPausecd,
    KeyProg3,
    KeyProg4,
    KeyAllApplications,
    KeySuspend,
    KeyClose,
    KeyPlay,
    KeyFastforward,
    KeyBassboost,
    KeyPrint,
    KeyHp,
    KeyCamera,
    KeySound,
    KeyQuestion,
    KeyEmail,
    KeyChat,
    KeySearch,
    KeyConnect,
    KeyFinance,
    KeySport,
    KeyShop,
    KeyAlterase,
    KeyCancel,
    KeyBrightnessdown,
    KeyBrightnessup,
    KeyMedia,
    KeySwitchvideomode,
    KeyKbdillumtoggle,
    KeyKbdillumdown,
    KeyKbdillumup,
    KeySend,
    KeyReply,
    KeyForwardmail,
    KeySave,
    KeyDocuments,
    KeyBattery,
    KeyBluetooth,
    KeyWlan,
    KeyUwb,
    KeyUnknown,
    KeyVideoNext,
    KeyVideoPrev,
    KeyBrightnessCycle,
    KeyBrightnessAuto,
    KeyDisplayOff,
    KeyWwan,
    KeyRfkill,
    KeyMicmute,
    BtnMisc,
    Btn0,
    Btn1,
    Btn2,
    Btn3,
    Btn4,
    Btn5,
    Btn6,
    Btn7,
    Btn8,
    Btn9,
    BtnMouse,
    BtnLeft,
    BtnRight,
    BtnMiddle,
    BtnSide,
    BtnExtra,
    BtnForward,
    BtnBack,
    BtnTask,
    BtnJoystick,
    BtnTrigger,
    BtnThumb,
    BtnThumb2,
    BtnTop,
    BtnTop2,
    BtnPinkie,
    BtnBase,
    BtnBase2,
    BtnBase3,
    BtnBase4,
    BtnBase5,
    BtnBase6,
    BtnDead,
    BtnGamepad,
    BtnSouth,
    BtnEast,
    BtnC,
    BtnNorth,
    BtnWest,
    BtnZ,
    BtnTl,
    BtnTr,
    BtnTl2,
    BtnTr2,
    BtnSelect,
    BtnStart,
    BtnMode,
    BtnThumbl,
    BtnThumbr,
    BtnDigi,
    BtnToolPen,
    BtnToolRubber,
    BtnToolBrush,
    BtnToolPencil,
    BtnToolAirbrush,
    BtnToolFinger,
    BtnToolMouse,
    BtnToolLens,
    BtnToolQuinttap,
    BtnStylus3,
    BtnTouch,
    BtnStylus,
    BtnStylus2,
    BtnToolDoubletap,
    BtnToolTripletap,
    BtnToolQuadtap,
    BtnWheel,
    BtnGearDown,
    BtnGearUp,
    KeyOk,
    KeySelect,
    KeyGoto,
    KeyClear,
    KeyPower2,
    KeyOption,
    KeyInfo,
    KeyTime,
    KeyVendor,
    KeyArchive,
    KeyProgram,
    KeyChannel,
    KeyFavorites,
    KeyEpg,
    KeyPvr,
    KeyMhp,
    KeyLanguage,
    KeyTitle,
    KeySubtitle,
    KeyAngle,
    KeyFullScreen,
    KeyMode,
    KeyKeyboard,
    KeyAspectRatio,
    KeyPc,
    KeyTv,
    KeyTv2,
    KeyVcr,
    KeyVcr2,
    KeySat,
    KeySat2,
    KeyCd,
    KeyTape,
    KeyRadio,
    KeyTuner,
    KeyPlayer,
    KeyText,
    KeyDvd,
    KeyAux,
    KeyMp3,
    KeyAudio,
    KeyVideo,
    KeyDirectory,
    KeyList,
    KeyMemo,
    KeyCalendar,
    KeyRed,
    KeyGreen,
    KeyYellow,
    KeyBlue,
    KeyChannelup,
    KeyChanneldown,
    KeyFirst,
    KeyLast,
    KeyAb,
    KeyNext,
    KeyRestart,
    KeySlow,
    KeyShuffle,
    KeyBreak,
    KeyPrevious,
    KeyDigits,
    KeyTeen,
    KeyTwen,
    KeyVideophone,
    KeyGames,
    KeyZoomin,
    KeyZoomout,
    KeyZoomreset,
    KeyWordprocessor,
    KeyEditor,
    KeySpreadsheet,
    KeyGraphicseditor,
    KeyPresentation,
    KeyDatabase,
    KeyNews,
    KeyVoicemail,
    KeyAddressbook,
    KeyMessenger,
    KeyDisplaytoggle,
    KeySpellcheck,
    KeyLogoff,
    KeyDollar,
    KeyEuro,
    KeyFrameback,
    KeyFrameforward,
    KeyContextMenu,
    KeyMediaRepeat,
    Key10channelsup,
    Key10channelsdown,
    KeyImages,
    KeyNotificationCenter,
    KeyPickupPhone,
    KeyHangupPhone,
    KeyLinkPhone,
    KeyDelEol,
    KeyDelEos,
    KeyInsLine,
    KeyDelLine,
    KeyFn,
    KeyFnEsc,
    KeyFnF1,
    KeyFnF2,
    KeyFnF3,
    KeyFnF4,
    KeyFnF5,
    KeyFnF6,
    KeyFnF7,
    KeyFnF8,
    KeyFnF9,
    KeyFnF10,
    KeyFnF11,
    KeyFnF12,
    KeyFn1,
    KeyFn2,
    KeyFnD,
    KeyFnE,
    KeyFnF,
    KeyFnS,
    KeyFnB,
    KeyFnRightShift,
    KeyBrlDot1,
    KeyBrlDot2,
    KeyBrlDot3,
    KeyBrlDot4,
    KeyBrlDot5,
    KeyBrlDot6,
    KeyBrlDot7,
    KeyBrlDot8,
    KeyBrlDot9,
    KeyBrlDot10,
    KeyNumeric0,
    KeyNumeric1,
    KeyNumeric2,
    KeyNumeric3,
    KeyNumeric4,
    KeyNumeric5,
    KeyNumeric6,
    KeyNumeric7,
    KeyNumeric8,
    KeyNumeric9,
    KeyNumericStar,
    KeyNumericPound,
    KeyNumericA,
    KeyNumericB,
    KeyNumericC,
    KeyNumericD,
    KeyCameraFocus,
    KeyWpsButton,
    KeyTouchpadToggle,
    KeyTouchpadOn,
    KeyTouchpadOff,
    KeyCameraZoomin,
    KeyCameraZoomout,
    KeyCameraUp,
    KeyCameraDown,
    KeyCameraLeft,
    KeyCameraRight,
    KeyAttendantOn,
    KeyAttendantOff,
    KeyAttendantToggle,
    KeyLightsToggle,
    BtnDpadUp,
    BtnDpadDown,
    BtnDpadLeft,
    BtnDpadRight,
    KeyAlsToggle,
    KeyRotateLockToggle,
    KeyRefreshRateToggle,
    KeyButtonconfig,
    KeyTaskmanager,
    KeyJournal,
    KeyControlpanel,
    KeyAppselect,
    KeyScreensaver,
    KeyVoicecommand,
    KeyAssistant,
    KeyKbdLayoutNext,
    KeyEmojiPicker,
    KeyDictate,
    KeyCameraAccessEnable,
    KeyCameraAccessDisable,
    KeyCameraAccessToggle,
    KeyAccessibility,
    KeyDoNotDisturb,
    KeyBrightnessMin,
    KeyBrightnessMax,
    KeyKbdinputassistPrev,
    KeyKbdinputassistNext,
    KeyKbdinputassistPrevgroup,
    KeyKbdinputassistNextgroup,
    KeyKbdinputassistAccept,
    KeyKbdinputassistCancel,
    KeyRightUp,
    KeyRightDown,
    KeyLeftUp,
    KeyLeftDown,
    KeyRootMenu,
    KeyMediaTopMenu,
    KeyNumeric11,
    KeyNumeric12,
    KeyAudioDesc,
    Key3dMode,
    KeyNextFavorite,
    KeyStopRecord,
    KeyPauseRecord,
    KeyVod,
    KeyUnmute,
    KeyFastreverse,
    KeySlowreverse,
    KeyData,
    KeyOnscreenKeyboard,
    KeyPrivacyScreenToggle,
    KeySelectiveScreenshot,
    KeyNextElement,
    KeyPreviousElement,
    KeyAutopilotEngageToggle,
    KeyMarkWaypoint,
    KeySos,
    KeyNavChart,
    KeyFishingChart,
    KeySingleRangeRadar,
    KeyDualRangeRadar,
    KeyRadarOverlay,
    KeyTraditionalSonar,
    KeyClearvuSonar,
    KeySidevuSonar,
    KeyNavInfo,
    KeyBrightnessMenu,
    KeyMacro1,
    KeyMacro2,
    KeyMacro3,
    KeyMacro4,
    KeyMacro5,
    KeyMacro6,
    KeyMacro7,
    KeyMacro8,
    KeyMacro9,
    KeyMacro10,
    KeyMacro11,
    KeyMacro12,
    KeyMacro13,
    KeyMacro14,
    KeyMacro15,
    KeyMacro16,
    KeyMacro17,
    KeyMacro18,
    KeyMacro19,
    KeyMacro20,
    KeyMacro21,
    KeyMacro22,
    KeyMacro23,
    KeyMacro24,
    KeyMacro25,
    KeyMacro26,
    KeyMacro27,
    KeyMacro28,
    KeyMacro29,
    KeyMacro30,
    KeyMacroRecordStart,
    KeyMacroRecordStop,
    KeyMacroPresetCycle,
    KeyMacroPreset1,
    KeyMacroPreset2,
    KeyMacroPreset3,
    KeyKbdLcdMenu1,
    KeyKbdLcdMenu2,
    KeyKbdLcdMenu3,
    KeyKbdLcdMenu4,
    KeyKbdLcdMenu5,
    BtnTriggerHappy,
    BtnTriggerHappy1,
    BtnTriggerHappy2,
    BtnTriggerHappy3,
    BtnTriggerHappy4,
    BtnTriggerHappy5,
    BtnTriggerHappy6,
    BtnTriggerHappy7,
    BtnTriggerHappy8,
    BtnTriggerHappy9,
    BtnTriggerHappy10,
    BtnTriggerHappy11,
    BtnTriggerHappy12,
    BtnTriggerHappy13,
    BtnTriggerHappy14,
    BtnTriggerHappy15,
    BtnTriggerHappy16,
    BtnTriggerHappy17,
    BtnTriggerHappy18,
    BtnTriggerHappy19,
    BtnTriggerHappy20,
    BtnTriggerHappy21,
    BtnTriggerHappy22,
    BtnTriggerHappy23,
    BtnTriggerHappy24,
    BtnTriggerHappy25,
    BtnTriggerHappy26,
    BtnTriggerHappy27,
    BtnTriggerHappy28,
    BtnTriggerHappy29,
    BtnTriggerHappy30,
    BtnTriggerHappy31,
    BtnTriggerHappy32,
    BtnTriggerHappy33,
    BtnTriggerHappy34,
    BtnTriggerHappy35,
    BtnTriggerHappy36,
    BtnTriggerHappy37,
    BtnTriggerHappy38,
    BtnTriggerHappy39,
    BtnTriggerHappy40,
    RelX,
    RelY,
    RelZ,
    RelRx,
    RelRy,
    RelRz,
    RelHwheel,
    RelDial,
    RelWheel,
    RelMisc,
    RelReserved,
    RelWheelHiRes,
    RelHwheelHiRes,
    AbsX,
    AbsY,
    AbsZ,
    AbsRx,
    AbsRy,
    AbsRz,
    AbsThrottle,
    AbsRudder,
    AbsWheel,
    AbsGas,
    AbsBrake,
    AbsHat0x,
    AbsHat0y,
    AbsHat1x,
    AbsHat1y,
    AbsHat2x,
    AbsHat2y,
    AbsHat3x,
    AbsHat3y,
    AbsPressure,
    AbsDistance,
    AbsTiltX,
    AbsTiltY,
    AbsToolWidth,
    AbsVolume,
    AbsProfile,
    AbsMisc,
    AbsReserved,
    AbsMtSlot,
    AbsMtTouchMajor,
    AbsMtTouchMinor,
    AbsMtWidthMajor,
    AbsMtWidthMinor,
    AbsMtOrientation,
    AbsMtPositionX,
    AbsMtPositionY,
    AbsMtToolType,
    AbsMtBlobId,
    AbsMtTrackingId,
    AbsMtPressure,
    AbsMtDistance,
    AbsMtToolX,
    AbsMtToolY,
    SwLid,
    SwTabletMode,
    SwHeadphoneInsert,
    SwRfkillAll,
    SwMicrophoneInsert,
    SwDock,
    SwLineoutInsert,
    SwJackPhysicalInsert,
    SwVideooutInsert,
    SwCameraLensCover,
    SwKeypadSlide,
    SwFrontProximity,
    SwRotateLock,
    SwLineinInsert,
    SwMuteDevice,
    SwPenInserted,
    SwMachineCover,
    MscSerial,
    MscPulseled,
    MscGesture,
    MscRaw,
    MscScan,
    MscTimestamp,
    LedNuml,
    LedCapsl,
    LedScrolll,
    LedCompose,
    LedKana,
    LedSleep,
    LedSuspend,
    LedMute,
    LedMisc,
    LedMail,
    LedCharging,
    RepDelay,
    RepPeriod,
    SndClick,
    SndBell,
    SndTone,
}

impl EventCode {
    pub fn as_u16(&self) -> u16 {
        match self {
            EventCode::SynReport => 0,
            EventCode::SynConfig => 1,
            EventCode::SynMtReport => 2,
            EventCode::SynDropped => 3,
            EventCode::KeyReserved => 0,
            EventCode::KeyEsc => 1,
            EventCode::Key1 => 2,
            EventCode::Key2 => 3,
            EventCode::Key3 => 4,
            EventCode::Key4 => 5,
            EventCode::Key5 => 6,
            EventCode::Key6 => 7,
            EventCode::Key7 => 8,
            EventCode::Key8 => 9,
            EventCode::Key9 => 10,
            EventCode::Key0 => 11,
            EventCode::KeyMinus => 12,
            EventCode::KeyEqual => 13,
            EventCode::KeyBackspace => 14,
            EventCode::KeyTab => 15,
            EventCode::KeyQ => 16,
            EventCode::KeyW => 17,
            EventCode::KeyE => 18,
            EventCode::KeyR => 19,
            EventCode::KeyT => 20,
            EventCode::KeyY => 21,
            EventCode::KeyU => 22,
            EventCode::KeyI => 23,
            EventCode::KeyO => 24,
            EventCode::KeyP => 25,
            EventCode::KeyLeftbrace => 26,
            EventCode::KeyRightbrace => 27,
            EventCode::KeyEnter => 28,
            EventCode::KeyLeftctrl => 29,
            EventCode::KeyA => 30,
            EventCode::KeyS => 31,
            EventCode::KeyD => 32,
            EventCode::KeyF => 33,
            EventCode::KeyG => 34,
            EventCode::KeyH => 35,
            EventCode::KeyJ => 36,
            EventCode::KeyK => 37,
            EventCode::KeyL => 38,
            EventCode::KeySemicolon => 39,
            EventCode::KeyApostrophe => 40,
            EventCode::KeyGrave => 41,
            EventCode::KeyLeftshift => 42,
            EventCode::KeyBackslash => 43,
            EventCode::KeyZ => 44,
            EventCode::KeyX => 45,
            EventCode::KeyC => 46,
            EventCode::KeyV => 47,
            EventCode::KeyB => 48,
            EventCode::KeyN => 49,
            EventCode::KeyM => 50,
            EventCode::KeyComma => 51,
            EventCode::KeyDot => 52,
            EventCode::KeySlash => 53,
            EventCode::KeyRightshift => 54,
            EventCode::KeyKpasterisk => 55,
            EventCode::KeyLeftalt => 56,
            EventCode::KeySpace => 57,
            EventCode::KeyCapslock => 58,
            EventCode::KeyF1 => 59,
            EventCode::KeyF2 => 60,
            EventCode::KeyF3 => 61,
            EventCode::KeyF4 => 62,
            EventCode::KeyF5 => 63,
            EventCode::KeyF6 => 64,
            EventCode::KeyF7 => 65,
            EventCode::KeyF8 => 66,
            EventCode::KeyF9 => 67,
            EventCode::KeyF10 => 68,
            EventCode::KeyNumlock => 69,
            EventCode::KeyScrolllock => 70,
            EventCode::KeyKp7 => 71,
            EventCode::KeyKp8 => 72,
            EventCode::KeyKp9 => 73,
            EventCode::KeyKpminus => 74,
            EventCode::KeyKp4 => 75,
            EventCode::KeyKp5 => 76,
            EventCode::KeyKp6 => 77,
            EventCode::KeyKpplus => 78,
            EventCode::KeyKp1 => 79,
            EventCode::KeyKp2 => 80,
            EventCode::KeyKp3 => 81,
            EventCode::KeyKp0 => 82,
            EventCode::KeyKpdot => 83,
            EventCode::KeyZenkakuhankaku => 85,
            EventCode::Key102nd => 86,
            EventCode::KeyF11 => 87,
            EventCode::KeyF12 => 88,
            EventCode::KeyRo => 89,
            EventCode::KeyKatakana => 90,
            EventCode::KeyHiragana => 91,
            EventCode::KeyHenkan => 92,
            EventCode::KeyKatakanahiragana => 93,
            EventCode::KeyMuhenkan => 94,
            EventCode::KeyKpjpcomma => 95,
            EventCode::KeyKpenter => 96,
            EventCode::KeyRightctrl => 97,
            EventCode::KeyKpslash => 98,
            EventCode::KeySysrq => 99,
            EventCode::KeyRightalt => 100,
            EventCode::KeyLinefeed => 101,
            EventCode::KeyHome => 102,
            EventCode::KeyUp => 103,
            EventCode::KeyPageup => 104,
            EventCode::KeyLeft => 105,
            EventCode::KeyRight => 106,
            EventCode::KeyEnd => 107,
            EventCode::KeyDown => 108,
            EventCode::KeyPagedown => 109,
            EventCode::KeyInsert => 110,
            EventCode::KeyDelete => 111,
            EventCode::KeyMacro => 112,
            EventCode::KeyMute => 113,
            EventCode::KeyVolumedown => 114,
            EventCode::KeyVolumeup => 115,
            EventCode::KeyPower => 116,
            EventCode::KeyKpequal => 117,
            EventCode::KeyKpplusminus => 118,
            EventCode::KeyPause => 119,
            EventCode::KeyScale => 120,
            EventCode::KeyKpcomma => 121,
            EventCode::KeyHangeul => 122,
            EventCode::KeyHanja => 123,
            EventCode::KeyYen => 124,
            EventCode::KeyLeftmeta => 125,
            EventCode::KeyRightmeta => 126,
            EventCode::KeyCompose => 127,
            EventCode::KeyStop => 128,
            EventCode::KeyAgain => 129,
            EventCode::KeyProps => 130,
            EventCode::KeyUndo => 131,
            EventCode::KeyFront => 132,
            EventCode::KeyCopy => 133,
            EventCode::KeyOpen => 134,
            EventCode::KeyPaste => 135,
            EventCode::KeyFind => 136,
            EventCode::KeyCut => 137,
            EventCode::KeyHelp => 138,
            EventCode::KeyMenu => 139,
            EventCode::KeyCalc => 140,
            EventCode::KeySetup => 141,
            EventCode::KeySleep => 142,
            EventCode::KeyWakeup => 143,
            EventCode::KeyFile => 144,
            EventCode::KeySendfile => 145,
            EventCode::KeyDeletefile => 146,
            EventCode::KeyXfer => 147,
            EventCode::KeyProg1 => 148,
            EventCode::KeyProg2 => 149,
            EventCode::KeyWww => 150,
            EventCode::KeyMsdos => 151,
            EventCode::KeyScreenlock => 152,
            EventCode::KeyRotateDisplay => 153,
            EventCode::KeyCyclewindows => 154,
            EventCode::KeyMail => 155,
            EventCode::KeyBookmarks => 156,
            EventCode::KeyComputer => 157,
            EventCode::KeyBack => 158,
            EventCode::KeyForward => 159,
            EventCode::KeyClosecd => 160,
            EventCode::KeyEjectcd => 161,
            EventCode::KeyEjectclosecd => 162,
            EventCode::KeyNextsong => 163,
            EventCode::KeyPlaypause => 164,
            EventCode::KeyPrevioussong => 165,
            EventCode::KeyStopcd => 166,
            EventCode::KeyRecord => 167,
            EventCode::KeyRewind => 168,
            EventCode::KeyPhone => 169,
            EventCode::KeyIso => 170,
            EventCode::KeyConfig => 171,
            EventCode::KeyHomepage => 172,
            EventCode::KeyRefresh => 173,
            EventCode::KeyExit => 174,
            EventCode::KeyMove => 175,
            EventCode::KeyEdit => 176,
            EventCode::KeyScrollup => 177,
            EventCode::KeyScrolldown => 178,
            EventCode::KeyKpleftparen => 179,
            EventCode::KeyKprightparen => 180,
            EventCode::KeyNew => 181,
            EventCode::KeyRedo => 182,
            EventCode::KeyF13 => 183,
            EventCode::KeyF14 => 184,
            EventCode::KeyF15 => 185,
            EventCode::KeyF16 => 186,
            EventCode::KeyF17 => 187,
            EventCode::KeyF18 => 188,
            EventCode::KeyF19 => 189,
            EventCode::KeyF20 => 190,
            EventCode::KeyF21 => 191,
            EventCode::KeyF22 => 192,
            EventCode::KeyF23 => 193,
            EventCode::KeyF24 => 194,
            EventCode::KeyPlaycd => 200,
            EventCode::KeyPausecd => 201,
            EventCode::KeyProg3 => 202,
            EventCode::KeyProg4 => 203,
            EventCode::KeyAllApplications => 204,
            EventCode::KeySuspend => 205,
            EventCode::KeyClose => 206,
            EventCode::KeyPlay => 207,
            EventCode::KeyFastforward => 208,
            EventCode::KeyBassboost => 209,
            EventCode::KeyPrint => 210,
            EventCode::KeyHp => 211,
            EventCode::KeyCamera => 212,
            EventCode::KeySound => 213,
            EventCode::KeyQuestion => 214,
            EventCode::KeyEmail => 215,
            EventCode::KeyChat => 216,
            EventCode::KeySearch => 217,
            EventCode::KeyConnect => 218,
            EventCode::KeyFinance => 219,
            EventCode::KeySport => 220,
            EventCode::KeyShop => 221,
            EventCode::KeyAlterase => 222,
            EventCode::KeyCancel => 223,
            EventCode::KeyBrightnessdown => 224,
            EventCode::KeyBrightnessup => 225,
            EventCode::KeyMedia => 226,
            EventCode::KeySwitchvideomode => 227,
            EventCode::KeyKbdillumtoggle => 228,
            EventCode::KeyKbdillumdown => 229,
            EventCode::KeyKbdillumup => 230,
            EventCode::KeySend => 231,
            EventCode::KeyReply => 232,
            EventCode::KeyForwardmail => 233,
            EventCode::KeySave => 234,
            EventCode::KeyDocuments => 235,
            EventCode::KeyBattery => 236,
            EventCode::KeyBluetooth => 237,
            EventCode::KeyWlan => 238,
            EventCode::KeyUwb => 239,
            EventCode::KeyUnknown => 240,
            EventCode::KeyVideoNext => 241,
            EventCode::KeyVideoPrev => 242,
            EventCode::KeyBrightnessCycle => 243,
            EventCode::KeyBrightnessAuto => 244,
            EventCode::KeyDisplayOff => 245,
            EventCode::KeyWwan => 246,
            EventCode::KeyRfkill => 247,
            EventCode::KeyMicmute => 248,
            EventCode::BtnMisc => 0x100,
            EventCode::Btn0 => 0x100,
            EventCode::Btn1 => 0x101,
            EventCode::Btn2 => 0x102,
            EventCode::Btn3 => 0x103,
            EventCode::Btn4 => 0x104,
            EventCode::Btn5 => 0x105,
            EventCode::Btn6 => 0x106,
            EventCode::Btn7 => 0x107,
            EventCode::Btn8 => 0x108,
            EventCode::Btn9 => 0x109,
            EventCode::BtnMouse => 0x110,
            EventCode::BtnLeft => 0x110,
            EventCode::BtnRight => 0x111,
            EventCode::BtnMiddle => 0x112,
            EventCode::BtnSide => 0x113,
            EventCode::BtnExtra => 0x114,
            EventCode::BtnForward => 0x115,
            EventCode::BtnBack => 0x116,
            EventCode::BtnTask => 0x117,
            EventCode::BtnJoystick => 0x120,
            EventCode::BtnTrigger => 0x120,
            EventCode::BtnThumb => 0x121,
            EventCode::BtnThumb2 => 0x122,
            EventCode::BtnTop => 0x123,
            EventCode::BtnTop2 => 0x124,
            EventCode::BtnPinkie => 0x125,
            EventCode::BtnBase => 0x126,
            EventCode::BtnBase2 => 0x127,
            EventCode::BtnBase3 => 0x128,
            EventCode::BtnBase4 => 0x129,
            EventCode::BtnBase5 => 0x12a,
            EventCode::BtnBase6 => 0x12b,
            EventCode::BtnDead => 0x12f,
            EventCode::BtnGamepad => 0x130,
            EventCode::BtnSouth => 0x130,
            EventCode::BtnEast => 0x131,
            EventCode::BtnC => 0x132,
            EventCode::BtnNorth => 0x133,
            EventCode::BtnWest => 0x134,
            EventCode::BtnZ => 0x135,
            EventCode::BtnTl => 0x136,
            EventCode::BtnTr => 0x137,
            EventCode::BtnTl2 => 0x138,
            EventCode::BtnTr2 => 0x139,
            EventCode::BtnSelect => 0x13a,
            EventCode::BtnStart => 0x13b,
            EventCode::BtnMode => 0x13c,
            EventCode::BtnThumbl => 0x13d,
            EventCode::BtnThumbr => 0x13e,
            EventCode::BtnDigi => 0x140,
            EventCode::BtnToolPen => 0x140,
            EventCode::BtnToolRubber => 0x141,
            EventCode::BtnToolBrush => 0x142,
            EventCode::BtnToolPencil => 0x143,
            EventCode::BtnToolAirbrush => 0x144,
            EventCode::BtnToolFinger => 0x145,
            EventCode::BtnToolMouse => 0x146,
            EventCode::BtnToolLens => 0x147,
            EventCode::BtnToolQuinttap => 0x148,
            EventCode::BtnStylus3 => 0x149,
            EventCode::BtnTouch => 0x14a,
            EventCode::BtnStylus => 0x14b,
            EventCode::BtnStylus2 => 0x14c,
            EventCode::BtnToolDoubletap => 0x14d,
            EventCode::BtnToolTripletap => 0x14e,
            EventCode::BtnToolQuadtap => 0x14f,
            EventCode::BtnWheel => 0x150,
            EventCode::BtnGearDown => 0x150,
            EventCode::BtnGearUp => 0x151,
            EventCode::KeyOk => 0x160,
            EventCode::KeySelect => 0x161,
            EventCode::KeyGoto => 0x162,
            EventCode::KeyClear => 0x163,
            EventCode::KeyPower2 => 0x164,
            EventCode::KeyOption => 0x165,
            EventCode::KeyInfo => 0x166,
            EventCode::KeyTime => 0x167,
            EventCode::KeyVendor => 0x168,
            EventCode::KeyArchive => 0x169,
            EventCode::KeyProgram => 0x16a,
            EventCode::KeyChannel => 0x16b,
            EventCode::KeyFavorites => 0x16c,
            EventCode::KeyEpg => 0x16d,
            EventCode::KeyPvr => 0x16e,
            EventCode::KeyMhp => 0x16f,
            EventCode::KeyLanguage => 0x170,
            EventCode::KeyTitle => 0x171,
            EventCode::KeySubtitle => 0x172,
            EventCode::KeyAngle => 0x173,
            EventCode::KeyFullScreen => 0x174,
            EventCode::KeyMode => 0x175,
            EventCode::KeyKeyboard => 0x176,
            EventCode::KeyAspectRatio => 0x177,
            EventCode::KeyPc => 0x178,
            EventCode::KeyTv => 0x179,
            EventCode::KeyTv2 => 0x17a,
            EventCode::KeyVcr => 0x17b,
            EventCode::KeyVcr2 => 0x17c,
            EventCode::KeySat => 0x17d,
            EventCode::KeySat2 => 0x17e,
            EventCode::KeyCd => 0x17f,
            EventCode::KeyTape => 0x180,
            EventCode::KeyRadio => 0x181,
            EventCode::KeyTuner => 0x182,
            EventCode::KeyPlayer => 0x183,
            EventCode::KeyText => 0x184,
            EventCode::KeyDvd => 0x185,
            EventCode::KeyAux => 0x186,
            EventCode::KeyMp3 => 0x187,
            EventCode::KeyAudio => 0x188,
            EventCode::KeyVideo => 0x189,
            EventCode::KeyDirectory => 0x18a,
            EventCode::KeyList => 0x18b,
            EventCode::KeyMemo => 0x18c,
            EventCode::KeyCalendar => 0x18d,
            EventCode::KeyRed => 0x18e,
            EventCode::KeyGreen => 0x18f,
            EventCode::KeyYellow => 0x190,
            EventCode::KeyBlue => 0x191,
            EventCode::KeyChannelup => 0x192,
            EventCode::KeyChanneldown => 0x193,
            EventCode::KeyFirst => 0x194,
            EventCode::KeyLast => 0x195,
            EventCode::KeyAb => 0x196,
            EventCode::KeyNext => 0x197,
            EventCode::KeyRestart => 0x198,
            EventCode::KeySlow => 0x199,
            EventCode::KeyShuffle => 0x19a,
            EventCode::KeyBreak => 0x19b,
            EventCode::KeyPrevious => 0x19c,
            EventCode::KeyDigits => 0x19d,
            EventCode::KeyTeen => 0x19e,
            EventCode::KeyTwen => 0x19f,
            EventCode::KeyVideophone => 0x1a0,
            EventCode::KeyGames => 0x1a1,
            EventCode::KeyZoomin => 0x1a2,
            EventCode::KeyZoomout => 0x1a3,
            EventCode::KeyZoomreset => 0x1a4,
            EventCode::KeyWordprocessor => 0x1a5,
            EventCode::KeyEditor => 0x1a6,
            EventCode::KeySpreadsheet => 0x1a7,
            EventCode::KeyGraphicseditor => 0x1a8,
            EventCode::KeyPresentation => 0x1a9,
            EventCode::KeyDatabase => 0x1aa,
            EventCode::KeyNews => 0x1ab,
            EventCode::KeyVoicemail => 0x1ac,
            EventCode::KeyAddressbook => 0x1ad,
            EventCode::KeyMessenger => 0x1ae,
            EventCode::KeyDisplaytoggle => 0x1af,
            EventCode::KeySpellcheck => 0x1b0,
            EventCode::KeyLogoff => 0x1b1,
            EventCode::KeyDollar => 0x1b2,
            EventCode::KeyEuro => 0x1b3,
            EventCode::KeyFrameback => 0x1b4,
            EventCode::KeyFrameforward => 0x1b5,
            EventCode::KeyContextMenu => 0x1b6,
            EventCode::KeyMediaRepeat => 0x1b7,
            EventCode::Key10channelsup => 0x1b8,
            EventCode::Key10channelsdown => 0x1b9,
            EventCode::KeyImages => 0x1ba,
            EventCode::KeyNotificationCenter => 0x1bc,
            EventCode::KeyPickupPhone => 0x1bd,
            EventCode::KeyHangupPhone => 0x1be,
            EventCode::KeyLinkPhone => 0x1bf,
            EventCode::KeyDelEol => 0x1c0,
            EventCode::KeyDelEos => 0x1c1,
            EventCode::KeyInsLine => 0x1c2,
            EventCode::KeyDelLine => 0x1c3,
            EventCode::KeyFn => 0x1d0,
            EventCode::KeyFnEsc => 0x1d1,
            EventCode::KeyFnF1 => 0x1d2,
            EventCode::KeyFnF2 => 0x1d3,
            EventCode::KeyFnF3 => 0x1d4,
            EventCode::KeyFnF4 => 0x1d5,
            EventCode::KeyFnF5 => 0x1d6,
            EventCode::KeyFnF6 => 0x1d7,
            EventCode::KeyFnF7 => 0x1d8,
            EventCode::KeyFnF8 => 0x1d9,
            EventCode::KeyFnF9 => 0x1da,
            EventCode::KeyFnF10 => 0x1db,
            EventCode::KeyFnF11 => 0x1dc,
            EventCode::KeyFnF12 => 0x1dd,
            EventCode::KeyFn1 => 0x1de,
            EventCode::KeyFn2 => 0x1df,
            EventCode::KeyFnD => 0x1e0,
            EventCode::KeyFnE => 0x1e1,
            EventCode::KeyFnF => 0x1e2,
            EventCode::KeyFnS => 0x1e3,
            EventCode::KeyFnB => 0x1e4,
            EventCode::KeyFnRightShift => 0x1e5,
            EventCode::KeyBrlDot1 => 0x1f1,
            EventCode::KeyBrlDot2 => 0x1f2,
            EventCode::KeyBrlDot3 => 0x1f3,
            EventCode::KeyBrlDot4 => 0x1f4,
            EventCode::KeyBrlDot5 => 0x1f5,
            EventCode::KeyBrlDot6 => 0x1f6,
            EventCode::KeyBrlDot7 => 0x1f7,
            EventCode::KeyBrlDot8 => 0x1f8,
            EventCode::KeyBrlDot9 => 0x1f9,
            EventCode::KeyBrlDot10 => 0x1fa,
            EventCode::KeyNumeric0 => 0x200,
            EventCode::KeyNumeric1 => 0x201,
            EventCode::KeyNumeric2 => 0x202,
            EventCode::KeyNumeric3 => 0x203,
            EventCode::KeyNumeric4 => 0x204,
            EventCode::KeyNumeric5 => 0x205,
            EventCode::KeyNumeric6 => 0x206,
            EventCode::KeyNumeric7 => 0x207,
            EventCode::KeyNumeric8 => 0x208,
            EventCode::KeyNumeric9 => 0x209,
            EventCode::KeyNumericStar => 0x20a,
            EventCode::KeyNumericPound => 0x20b,
            EventCode::KeyNumericA => 0x20c,
            EventCode::KeyNumericB => 0x20d,
            EventCode::KeyNumericC => 0x20e,
            EventCode::KeyNumericD => 0x20f,
            EventCode::KeyCameraFocus => 0x210,
            EventCode::KeyWpsButton => 0x211,
            EventCode::KeyTouchpadToggle => 0x212,
            EventCode::KeyTouchpadOn => 0x213,
            EventCode::KeyTouchpadOff => 0x214,
            EventCode::KeyCameraZoomin => 0x215,
            EventCode::KeyCameraZoomout => 0x216,
            EventCode::KeyCameraUp => 0x217,
            EventCode::KeyCameraDown => 0x218,
            EventCode::KeyCameraLeft => 0x219,
            EventCode::KeyCameraRight => 0x21a,
            EventCode::KeyAttendantOn => 0x21b,
            EventCode::KeyAttendantOff => 0x21c,
            EventCode::KeyAttendantToggle => 0x21d,
            EventCode::KeyLightsToggle => 0x21e,
            EventCode::BtnDpadUp => 0x220,
            EventCode::BtnDpadDown => 0x221,
            EventCode::BtnDpadLeft => 0x222,
            EventCode::BtnDpadRight => 0x223,
            EventCode::KeyAlsToggle => 0x230,
            EventCode::KeyRotateLockToggle => 0x231,
            EventCode::KeyRefreshRateToggle => 0x232,
            EventCode::KeyButtonconfig => 0x240,
            EventCode::KeyTaskmanager => 0x241,
            EventCode::KeyJournal => 0x242,
            EventCode::KeyControlpanel => 0x243,
            EventCode::KeyAppselect => 0x244,
            EventCode::KeyScreensaver => 0x245,
            EventCode::KeyVoicecommand => 0x246,
            EventCode::KeyAssistant => 0x247,
            EventCode::KeyKbdLayoutNext => 0x248,
            EventCode::KeyEmojiPicker => 0x249,
            EventCode::KeyDictate => 0x24a,
            EventCode::KeyCameraAccessEnable => 0x24b,
            EventCode::KeyCameraAccessDisable => 0x24c,
            EventCode::KeyCameraAccessToggle => 0x24d,
            EventCode::KeyAccessibility => 0x24e,
            EventCode::KeyDoNotDisturb => 0x24f,
            EventCode::KeyBrightnessMin => 0x250,
            EventCode::KeyBrightnessMax => 0x251,
            EventCode::KeyKbdinputassistPrev => 0x260,
            EventCode::KeyKbdinputassistNext => 0x261,
            EventCode::KeyKbdinputassistPrevgroup => 0x262,
            EventCode::KeyKbdinputassistNextgroup => 0x263,
            EventCode::KeyKbdinputassistAccept => 0x264,
            EventCode::KeyKbdinputassistCancel => 0x265,
            EventCode::KeyRightUp => 0x266,
            EventCode::KeyRightDown => 0x267,
            EventCode::KeyLeftUp => 0x268,
            EventCode::KeyLeftDown => 0x269,
            EventCode::KeyRootMenu => 0x26a,
            EventCode::KeyMediaTopMenu => 0x26b,
            EventCode::KeyNumeric11 => 0x26c,
            EventCode::KeyNumeric12 => 0x26d,
            EventCode::KeyAudioDesc => 0x26e,
            EventCode::Key3dMode => 0x26f,
            EventCode::KeyNextFavorite => 0x270,
            EventCode::KeyStopRecord => 0x271,
            EventCode::KeyPauseRecord => 0x272,
            EventCode::KeyVod => 0x273,
            EventCode::KeyUnmute => 0x274,
            EventCode::KeyFastreverse => 0x275,
            EventCode::KeySlowreverse => 0x276,
            EventCode::KeyData => 0x277,
            EventCode::KeyOnscreenKeyboard => 0x278,
            EventCode::KeyPrivacyScreenToggle => 0x279,
            EventCode::KeySelectiveScreenshot => 0x27a,
            EventCode::KeyNextElement => 0x27b,
            EventCode::KeyPreviousElement => 0x27c,
            EventCode::KeyAutopilotEngageToggle => 0x27d,
            EventCode::KeyMarkWaypoint => 0x27e,
            EventCode::KeySos => 0x27f,
            EventCode::KeyNavChart => 0x280,
            EventCode::KeyFishingChart => 0x281,
            EventCode::KeySingleRangeRadar => 0x282,
            EventCode::KeyDualRangeRadar => 0x283,
            EventCode::KeyRadarOverlay => 0x284,
            EventCode::KeyTraditionalSonar => 0x285,
            EventCode::KeyClearvuSonar => 0x286,
            EventCode::KeySidevuSonar => 0x287,
            EventCode::KeyNavInfo => 0x288,
            EventCode::KeyBrightnessMenu => 0x289,
            EventCode::KeyMacro1 => 0x290,
            EventCode::KeyMacro2 => 0x291,
            EventCode::KeyMacro3 => 0x292,
            EventCode::KeyMacro4 => 0x293,
            EventCode::KeyMacro5 => 0x294,
            EventCode::KeyMacro6 => 0x295,
            EventCode::KeyMacro7 => 0x296,
            EventCode::KeyMacro8 => 0x297,
            EventCode::KeyMacro9 => 0x298,
            EventCode::KeyMacro10 => 0x299,
            EventCode::KeyMacro11 => 0x29a,
            EventCode::KeyMacro12 => 0x29b,
            EventCode::KeyMacro13 => 0x29c,
            EventCode::KeyMacro14 => 0x29d,
            EventCode::KeyMacro15 => 0x29e,
            EventCode::KeyMacro16 => 0x29f,
            EventCode::KeyMacro17 => 0x2a0,
            EventCode::KeyMacro18 => 0x2a1,
            EventCode::KeyMacro19 => 0x2a2,
            EventCode::KeyMacro20 => 0x2a3,
            EventCode::KeyMacro21 => 0x2a4,
            EventCode::KeyMacro22 => 0x2a5,
            EventCode::KeyMacro23 => 0x2a6,
            EventCode::KeyMacro24 => 0x2a7,
            EventCode::KeyMacro25 => 0x2a8,
            EventCode::KeyMacro26 => 0x2a9,
            EventCode::KeyMacro27 => 0x2aa,
            EventCode::KeyMacro28 => 0x2ab,
            EventCode::KeyMacro29 => 0x2ac,
            EventCode::KeyMacro30 => 0x2ad,
            EventCode::KeyMacroRecordStart => 0x2b0,
            EventCode::KeyMacroRecordStop => 0x2b1,
            EventCode::KeyMacroPresetCycle => 0x2b2,
            EventCode::KeyMacroPreset1 => 0x2b3,
            EventCode::KeyMacroPreset2 => 0x2b4,
            EventCode::KeyMacroPreset3 => 0x2b5,
            EventCode::KeyKbdLcdMenu1 => 0x2b8,
            EventCode::KeyKbdLcdMenu2 => 0x2b9,
            EventCode::KeyKbdLcdMenu3 => 0x2ba,
            EventCode::KeyKbdLcdMenu4 => 0x2bb,
            EventCode::KeyKbdLcdMenu5 => 0x2bc,
            EventCode::BtnTriggerHappy => 0x2c0,
            EventCode::BtnTriggerHappy1 => 0x2c0,
            EventCode::BtnTriggerHappy2 => 0x2c1,
            EventCode::BtnTriggerHappy3 => 0x2c2,
            EventCode::BtnTriggerHappy4 => 0x2c3,
            EventCode::BtnTriggerHappy5 => 0x2c4,
            EventCode::BtnTriggerHappy6 => 0x2c5,
            EventCode::BtnTriggerHappy7 => 0x2c6,
            EventCode::BtnTriggerHappy8 => 0x2c7,
            EventCode::BtnTriggerHappy9 => 0x2c8,
            EventCode::BtnTriggerHappy10 => 0x2c9,
            EventCode::BtnTriggerHappy11 => 0x2ca,
            EventCode::BtnTriggerHappy12 => 0x2cb,
            EventCode::BtnTriggerHappy13 => 0x2cc,
            EventCode::BtnTriggerHappy14 => 0x2cd,
            EventCode::BtnTriggerHappy15 => 0x2ce,
            EventCode::BtnTriggerHappy16 => 0x2cf,
            EventCode::BtnTriggerHappy17 => 0x2d0,
            EventCode::BtnTriggerHappy18 => 0x2d1,
            EventCode::BtnTriggerHappy19 => 0x2d2,
            EventCode::BtnTriggerHappy20 => 0x2d3,
            EventCode::BtnTriggerHappy21 => 0x2d4,
            EventCode::BtnTriggerHappy22 => 0x2d5,
            EventCode::BtnTriggerHappy23 => 0x2d6,
            EventCode::BtnTriggerHappy24 => 0x2d7,
            EventCode::BtnTriggerHappy25 => 0x2d8,
            EventCode::BtnTriggerHappy26 => 0x2d9,
            EventCode::BtnTriggerHappy27 => 0x2da,
            EventCode::BtnTriggerHappy28 => 0x2db,
            EventCode::BtnTriggerHappy29 => 0x2dc,
            EventCode::BtnTriggerHappy30 => 0x2dd,
            EventCode::BtnTriggerHappy31 => 0x2de,
            EventCode::BtnTriggerHappy32 => 0x2df,
            EventCode::BtnTriggerHappy33 => 0x2e0,
            EventCode::BtnTriggerHappy34 => 0x2e1,
            EventCode::BtnTriggerHappy35 => 0x2e2,
            EventCode::BtnTriggerHappy36 => 0x2e3,
            EventCode::BtnTriggerHappy37 => 0x2e4,
            EventCode::BtnTriggerHappy38 => 0x2e5,
            EventCode::BtnTriggerHappy39 => 0x2e6,
            EventCode::BtnTriggerHappy40 => 0x2e7,
            EventCode::RelX => 0x00,
            EventCode::RelY => 0x01,
            EventCode::RelZ => 0x02,
            EventCode::RelRx => 0x03,
            EventCode::RelRy => 0x04,
            EventCode::RelRz => 0x05,
            EventCode::RelHwheel => 0x06,
            EventCode::RelDial => 0x07,
            EventCode::RelWheel => 0x08,
            EventCode::RelMisc => 0x09,
            EventCode::RelReserved => 0x0a,
            EventCode::RelWheelHiRes => 0x0b,
            EventCode::RelHwheelHiRes => 0x0c,
            EventCode::AbsX => 0x00,
            EventCode::AbsY => 0x01,
            EventCode::AbsZ => 0x02,
            EventCode::AbsRx => 0x03,
            EventCode::AbsRy => 0x04,
            EventCode::AbsRz => 0x05,
            EventCode::AbsThrottle => 0x06,
            EventCode::AbsRudder => 0x07,
            EventCode::AbsWheel => 0x08,
            EventCode::AbsGas => 0x09,
            EventCode::AbsBrake => 0x0a,
            EventCode::AbsHat0x => 0x10,
            EventCode::AbsHat0y => 0x11,
            EventCode::AbsHat1x => 0x12,
            EventCode::AbsHat1y => 0x13,
            EventCode::AbsHat2x => 0x14,
            EventCode::AbsHat2y => 0x15,
            EventCode::AbsHat3x => 0x16,
            EventCode::AbsHat3y => 0x17,
            EventCode::AbsPressure => 0x18,
            EventCode::AbsDistance => 0x19,
            EventCode::AbsTiltX => 0x1a,
            EventCode::AbsTiltY => 0x1b,
            EventCode::AbsToolWidth => 0x1c,
            EventCode::AbsVolume => 0x20,
            EventCode::AbsProfile => 0x21,
            EventCode::AbsMisc => 0x28,
            EventCode::AbsReserved => 0x2e,
            EventCode::AbsMtSlot => 0x2f,
            EventCode::AbsMtTouchMajor => 0x30,
            EventCode::AbsMtTouchMinor => 0x31,
            EventCode::AbsMtWidthMajor => 0x32,
            EventCode::AbsMtWidthMinor => 0x33,
            EventCode::AbsMtOrientation => 0x34,
            EventCode::AbsMtPositionX => 0x35,
            EventCode::AbsMtPositionY => 0x36,
            EventCode::AbsMtToolType => 0x37,
            EventCode::AbsMtBlobId => 0x38,
            EventCode::AbsMtTrackingId => 0x39,
            EventCode::AbsMtPressure => 0x3a,
            EventCode::AbsMtDistance => 0x3b,
            EventCode::AbsMtToolX => 0x3c,
            EventCode::AbsMtToolY => 0x3d,
            EventCode::SwLid => 0x00,
            EventCode::SwTabletMode => 0x01,
            EventCode::SwHeadphoneInsert => 0x02,
            EventCode::SwRfkillAll => 0x03,
            EventCode::SwMicrophoneInsert => 0x04,
            EventCode::SwDock => 0x05,
            EventCode::SwLineoutInsert => 0x06,
            EventCode::SwJackPhysicalInsert => 0x07,
            EventCode::SwVideooutInsert => 0x08,
            EventCode::SwCameraLensCover => 0x09,
            EventCode::SwKeypadSlide => 0x0a,
            EventCode::SwFrontProximity => 0x0b,
            EventCode::SwRotateLock => 0x0c,
            EventCode::SwLineinInsert => 0x0d,
            EventCode::SwMuteDevice => 0x0e,
            EventCode::SwPenInserted => 0x0f,
            EventCode::SwMachineCover => 0x10,
            EventCode::MscSerial => 0x00,
            EventCode::MscPulseled => 0x01,
            EventCode::MscGesture => 0x02,
            EventCode::MscRaw => 0x03,
            EventCode::MscScan => 0x04,
            EventCode::MscTimestamp => 0x05,
            EventCode::LedNuml => 0x00,
            EventCode::LedCapsl => 0x01,
            EventCode::LedScrolll => 0x02,
            EventCode::LedCompose => 0x03,
            EventCode::LedKana => 0x04,
            EventCode::LedSleep => 0x05,
            EventCode::LedSuspend => 0x06,
            EventCode::LedMute => 0x07,
            EventCode::LedMisc => 0x08,
            EventCode::LedMail => 0x09,
            EventCode::LedCharging => 0x0a,
            EventCode::RepDelay => 0x00,
            EventCode::RepPeriod => 0x01,
            EventCode::SndClick => 0x00,
            EventCode::SndBell => 0x01,
            EventCode::SndTone => 0x02,
        }
    }
}
