pub fn raw_keycode_to_keycode(keycode: u32) -> KeyCode {
    let rawkey = keycode - 8;
    // The keycode values are taken from linux/include/uapi/linux/input-event-codes.h, as
    // libxkbcommon's documentation indicates that the keycode values we're getting from it are
    // defined by the Linux kernel. If Winit programs end up being run on other Unix-likes which
    // also use libxkbcommon, then I dearly hope the keycode values mean the same thing.
    //
    // Some of the keycodes are likely superfluous for our purposes, and some are ones which are
    // difficult to test the correctness of, or discover the purpose of. Because of this, they've
    // either been commented out here, or not included at all.
    match rawkey {
        0 => KeyCode::Unidentified(NativeKeyCode::XkbCode(0)),
        1 => KeyCode::Escape,
        2 => KeyCode::Digit1,
        3 => KeyCode::Digit2,
        4 => KeyCode::Digit3,
        5 => KeyCode::Digit4,
        6 => KeyCode::Digit5,
        7 => KeyCode::Digit6,
        8 => KeyCode::Digit7,
        9 => KeyCode::Digit8,
        10 => KeyCode::Digit9,
        11 => KeyCode::Digit0,
        12 => KeyCode::Minus,
        13 => KeyCode::Equal,
        14 => KeyCode::Backspace,
        15 => KeyCode::Tab,
        16 => KeyCode::KeyQ,
        17 => KeyCode::KeyW,
        18 => KeyCode::KeyE,
        19 => KeyCode::KeyR,
        20 => KeyCode::KeyT,
        21 => KeyCode::KeyY,
        22 => KeyCode::KeyU,
        23 => KeyCode::KeyI,
        24 => KeyCode::KeyO,
        25 => KeyCode::KeyP,
        26 => KeyCode::BracketLeft,
        27 => KeyCode::BracketRight,
        28 => KeyCode::Enter,
        29 => KeyCode::ControlLeft,
        30 => KeyCode::KeyA,
        31 => KeyCode::KeyS,
        32 => KeyCode::KeyD,
        33 => KeyCode::KeyF,
        34 => KeyCode::KeyG,
        35 => KeyCode::KeyH,
        36 => KeyCode::KeyJ,
        37 => KeyCode::KeyK,
        38 => KeyCode::KeyL,
        39 => KeyCode::Semicolon,
        40 => KeyCode::Quote,
        41 => KeyCode::Backquote,
        42 => KeyCode::ShiftLeft,
        43 => KeyCode::Backslash,
        44 => KeyCode::KeyZ,
        45 => KeyCode::KeyX,
        46 => KeyCode::KeyC,
        47 => KeyCode::KeyV,
        48 => KeyCode::KeyB,
        49 => KeyCode::KeyN,
        50 => KeyCode::KeyM,
        51 => KeyCode::Comma,
        52 => KeyCode::Period,
        53 => KeyCode::Slash,
        54 => KeyCode::ShiftRight,
        55 => KeyCode::NumpadMultiply,
        56 => KeyCode::AltLeft,
        57 => KeyCode::Space,
        58 => KeyCode::CapsLock,
        59 => KeyCode::F1,
        60 => KeyCode::F2,
        61 => KeyCode::F3,
        62 => KeyCode::F4,
        63 => KeyCode::F5,
        64 => KeyCode::F6,
        65 => KeyCode::F7,
        66 => KeyCode::F8,
        67 => KeyCode::F9,
        68 => KeyCode::F10,
        69 => KeyCode::NumLock,
        70 => KeyCode::ScrollLock,
        71 => KeyCode::Numpad7,
        72 => KeyCode::Numpad8,
        73 => KeyCode::Numpad9,
        74 => KeyCode::NumpadSubtract,
        75 => KeyCode::Numpad4,
        76 => KeyCode::Numpad5,
        77 => KeyCode::Numpad6,
        78 => KeyCode::NumpadAdd,
        79 => KeyCode::Numpad1,
        80 => KeyCode::Numpad2,
        81 => KeyCode::Numpad3,
        82 => KeyCode::Numpad0,
        83 => KeyCode::NumpadDecimal,
        85 => KeyCode::Lang5,
        86 => KeyCode::IntlBackslash,
        87 => KeyCode::F11,
        88 => KeyCode::F12,
        89 => KeyCode::IntlRo,
        90 => KeyCode::Lang3,
        91 => KeyCode::Lang4,
        92 => KeyCode::Convert,
        93 => KeyCode::KanaMode,
        94 => KeyCode::NonConvert,
        // 95 => KeyCode::KPJPCOMMA,
        96 => KeyCode::NumpadEnter,
        97 => KeyCode::ControlRight,
        98 => KeyCode::NumpadDivide,
        99 => KeyCode::PrintScreen,
        100 => KeyCode::AltRight,
        // 101 => KeyCode::LINEFEED,
        102 => KeyCode::Home,
        103 => KeyCode::ArrowUp,
        104 => KeyCode::PageUp,
        105 => KeyCode::ArrowLeft,
        106 => KeyCode::ArrowRight,
        107 => KeyCode::End,
        108 => KeyCode::ArrowDown,
        109 => KeyCode::PageDown,
        110 => KeyCode::Insert,
        111 => KeyCode::Delete,
        // 112 => KeyCode::MACRO,
        113 => KeyCode::AudioVolumeMute,
        114 => KeyCode::AudioVolumeDown,
        115 => KeyCode::AudioVolumeUp,
        // 116 => KeyCode::POWER,
        117 => KeyCode::NumpadEqual,
        // 118 => KeyCode::KPPLUSMINUS,
        119 => KeyCode::Pause,
        // 120 => KeyCode::SCALE,
        121 => KeyCode::NumpadComma,
        122 => KeyCode::Lang1,
        123 => KeyCode::Lang2,
        124 => KeyCode::IntlYen,
        125 => KeyCode::SuperLeft,
        126 => KeyCode::SuperRight,
        127 => KeyCode::ContextMenu,
        // 128 => KeyCode::STOP,
        // 129 => KeyCode::AGAIN,
        // 130 => KeyCode::PROPS,
        // 131 => KeyCode::UNDO,
        // 132 => KeyCode::FRONT,
        // 133 => KeyCode::COPY,
        // 134 => KeyCode::OPEN,
        // 135 => KeyCode::PASTE,
        // 136 => KeyCode::FIND,
        // 137 => KeyCode::CUT,
        // 138 => KeyCode::HELP,
        // 139 => KeyCode::MENU,
        // 140 => KeyCode::CALC,
        // 141 => KeyCode::SETUP,
        // 142 => KeyCode::SLEEP,
        // 143 => KeyCode::WAKEUP,
        // 144 => KeyCode::FILE,
        // 145 => KeyCode::SENDFILE,
        // 146 => KeyCode::DELETEFILE,
        // 147 => KeyCode::XFER,
        // 148 => KeyCode::PROG1,
        // 149 => KeyCode::PROG2,
        // 150 => KeyCode::WWW,
        // 151 => KeyCode::MSDOS,
        // 152 => KeyCode::COFFEE,
        // 153 => KeyCode::ROTATE_DISPLAY,
        // 154 => KeyCode::CYCLEWINDOWS,
        // 155 => KeyCode::MAIL,
        // 156 => KeyCode::BOOKMARKS,
        // 157 => KeyCode::COMPUTER,
        // 158 => KeyCode::BACK,
        // 159 => KeyCode::FORWARD,
        // 160 => KeyCode::CLOSECD,
        // 161 => KeyCode::EJECTCD,
        // 162 => KeyCode::EJECTCLOSECD,
        163 => KeyCode::MediaTrackNext,
        164 => KeyCode::MediaPlayPause,
        165 => KeyCode::MediaTrackPrevious,
        166 => KeyCode::MediaStop,
        // 167 => KeyCode::RECORD,
        // 168 => KeyCode::REWIND,
        // 169 => KeyCode::PHONE,
        // 170 => KeyCode::ISO,
        // 171 => KeyCode::CONFIG,
        // 172 => KeyCode::HOMEPAGE,
        // 173 => KeyCode::REFRESH,
        // 174 => KeyCode::EXIT,
        // 175 => KeyCode::MOVE,
        // 176 => KeyCode::EDIT,
        // 177 => KeyCode::SCROLLUP,
        // 178 => KeyCode::SCROLLDOWN,
        // 179 => KeyCode::KPLEFTPAREN,
        // 180 => KeyCode::KPRIGHTPAREN,
        // 181 => KeyCode::NEW,
        // 182 => KeyCode::REDO,
        183 => KeyCode::F13,
        184 => KeyCode::F14,
        185 => KeyCode::F15,
        186 => KeyCode::F16,
        187 => KeyCode::F17,
        188 => KeyCode::F18,
        189 => KeyCode::F19,
        190 => KeyCode::F20,
        191 => KeyCode::F21,
        192 => KeyCode::F22,
        193 => KeyCode::F23,
        194 => KeyCode::F24,
        // 200 => KeyCode::PLAYCD,
        // 201 => KeyCode::PAUSECD,
        // 202 => KeyCode::PROG3,
        // 203 => KeyCode::PROG4,
        // 204 => KeyCode::DASHBOARD,
        // 205 => KeyCode::SUSPEND,
        // 206 => KeyCode::CLOSE,
        // 207 => KeyCode::PLAY,
        // 208 => KeyCode::FASTFORWARD,
        // 209 => KeyCode::BASSBOOST,
        // 210 => KeyCode::PRINT,
        // 211 => KeyCode::HP,
        // 212 => KeyCode::CAMERA,
        // 213 => KeyCode::SOUND,
        // 214 => KeyCode::QUESTION,
        // 215 => KeyCode::EMAIL,
        // 216 => KeyCode::CHAT,
        // 217 => KeyCode::SEARCH,
        // 218 => KeyCode::CONNECT,
        // 219 => KeyCode::FINANCE,
        // 220 => KeyCode::SPORT,
        // 221 => KeyCode::SHOP,
        // 222 => KeyCode::ALTERASE,
        // 223 => KeyCode::CANCEL,
        // 224 => KeyCode::BRIGHTNESSDOW,
        // 225 => KeyCode::BRIGHTNESSU,
        // 226 => KeyCode::MEDIA,
        // 227 => KeyCode::SWITCHVIDEOMODE,
        // 228 => KeyCode::KBDILLUMTOGGLE,
        // 229 => KeyCode::KBDILLUMDOWN,
        // 230 => KeyCode::KBDILLUMUP,
        // 231 => KeyCode::SEND,
        // 232 => KeyCode::REPLY,
        // 233 => KeyCode::FORWARDMAIL,
        // 234 => KeyCode::SAVE,
        // 235 => KeyCode::DOCUMENTS,
        // 236 => KeyCode::BATTERY,
        // 237 => KeyCode::BLUETOOTH,
        // 238 => KeyCode::WLAN,
        // 239 => KeyCode::UWB,
        240 => KeyCode::Unidentified(NativeKeyCode::Unidentified),
        // 241 => KeyCode::VIDEO_NEXT,
        // 242 => KeyCode::VIDEO_PREV,
        // 243 => KeyCode::BRIGHTNESS_CYCLE,
        // 244 => KeyCode::BRIGHTNESS_AUTO,
        // 245 => KeyCode::DISPLAY_OFF,
        // 246 => KeyCode::WWAN,
        // 247 => KeyCode::RFKILL,
        // 248 => KeyCode::KEY_MICMUTE,
        _ => KeyCode::Unidentified(NativeKeyCode::XkbCode(rawkey)),
    }
}
/// Map the raw X11-style keycode to the `KeyCode` enum.
///
/// X11-style keycodes are offset by 8 from the keycodes the Linux kernel uses.
Map the raw X11-style keycode to the `KeyCode` enum.
X11-style keycodes are offset by 8 from the keycodes the Linux kernel uses.
Map the raw X11 - style keycode to the ` KeyCode ` enum . X11 - style keycodes are offset by 8 from the keycodes the Linux kernel uses .
pub fn raw_keycode_to_keycode(keycode: u32) -> KeyCode {
    let rawkey = keycode - 8;
    // The keycode values are taken from linux/include/uapi/linux/input-event-codes.h, as
    // libxkbcommon's documentation indicates that the keycode values we're getting from it are
    // defined by the Linux kernel. If Winit programs end up being run on other Unix-likes which
    // also use libxkbcommon, then I dearly hope the keycode values mean the same thing.
    //
    // Some of the keycodes are likely superfluous for our purposes, and some are ones which are
    // difficult to test the correctness of, or discover the purpose of. Because of this, they've
    // either been commented out here, or not included at all.
    match rawkey {
        0 => KeyCode::Unidentified(NativeKeyCode::XkbCode(0)),
        1 => KeyCode::Escape,
        2 => KeyCode::Digit1,
        3 => KeyCode::Digit2,
        4 => KeyCode::Digit3,
        5 => KeyCode::Digit4,
        6 => KeyCode::Digit5,
        7 => KeyCode::Digit6,
        8 => KeyCode::Digit7,
        9 => KeyCode::Digit8,
        10 => KeyCode::Digit9,
        11 => KeyCode::Digit0,
        12 => KeyCode::Minus,
        13 => KeyCode::Equal,
        14 => KeyCode::Backspace,
        15 => KeyCode::Tab,
        16 => KeyCode::KeyQ,
        17 => KeyCode::KeyW,
        18 => KeyCode::KeyE,
        19 => KeyCode::KeyR,
        20 => KeyCode::KeyT,
        21 => KeyCode::KeyY,
        22 => KeyCode::KeyU,
        23 => KeyCode::KeyI,
        24 => KeyCode::KeyO,
        25 => KeyCode::KeyP,
        26 => KeyCode::BracketLeft,
        27 => KeyCode::BracketRight,
        28 => KeyCode::Enter,
        29 => KeyCode::ControlLeft,
        30 => KeyCode::KeyA,
        31 => KeyCode::KeyS,
        32 => KeyCode::KeyD,
        33 => KeyCode::KeyF,
        34 => KeyCode::KeyG,
        35 => KeyCode::KeyH,
        36 => KeyCode::KeyJ,
        37 => KeyCode::KeyK,
        38 => KeyCode::KeyL,
        39 => KeyCode::Semicolon,
        40 => KeyCode::Quote,
        41 => KeyCode::Backquote,
        42 => KeyCode::ShiftLeft,
        43 => KeyCode::Backslash,
        44 => KeyCode::KeyZ,
        45 => KeyCode::KeyX,
        46 => KeyCode::KeyC,
        47 => KeyCode::KeyV,
        48 => KeyCode::KeyB,
        49 => KeyCode::KeyN,
        50 => KeyCode::KeyM,
        51 => KeyCode::Comma,
        52 => KeyCode::Period,
        53 => KeyCode::Slash,
        54 => KeyCode::ShiftRight,
        55 => KeyCode::NumpadMultiply,
        56 => KeyCode::AltLeft,
        57 => KeyCode::Space,
        58 => KeyCode::CapsLock,
        59 => KeyCode::F1,
        60 => KeyCode::F2,
        61 => KeyCode::F3,
        62 => KeyCode::F4,
        63 => KeyCode::F5,
        64 => KeyCode::F6,
        65 => KeyCode::F7,
        66 => KeyCode::F8,
        67 => KeyCode::F9,
        68 => KeyCode::F10,
        69 => KeyCode::NumLock,
        70 => KeyCode::ScrollLock,
        71 => KeyCode::Numpad7,
        72 => KeyCode::Numpad8,
        73 => KeyCode::Numpad9,
        74 => KeyCode::NumpadSubtract,
        75 => KeyCode::Numpad4,
        76 => KeyCode::Numpad5,
        77 => KeyCode::Numpad6,
        78 => KeyCode::NumpadAdd,
        79 => KeyCode::Numpad1,
        80 => KeyCode::Numpad2,
        81 => KeyCode::Numpad3,
        82 => KeyCode::Numpad0,
        83 => KeyCode::NumpadDecimal,
        85 => KeyCode::Lang5,
        86 => KeyCode::IntlBackslash,
        87 => KeyCode::F11,
        88 => KeyCode::F12,
        89 => KeyCode::IntlRo,
        90 => KeyCode::Lang3,
        91 => KeyCode::Lang4,
        92 => KeyCode::Convert,
        93 => KeyCode::KanaMode,
        94 => KeyCode::NonConvert,
        // 95 => KeyCode::KPJPCOMMA,
        96 => KeyCode::NumpadEnter,
        97 => KeyCode::ControlRight,
        98 => KeyCode::NumpadDivide,
        99 => KeyCode::PrintScreen,
        100 => KeyCode::AltRight,
        // 101 => KeyCode::LINEFEED,
        102 => KeyCode::Home,
        103 => KeyCode::ArrowUp,
        104 => KeyCode::PageUp,
        105 => KeyCode::ArrowLeft,
        106 => KeyCode::ArrowRight,
        107 => KeyCode::End,
        108 => KeyCode::ArrowDown,
        109 => KeyCode::PageDown,
        110 => KeyCode::Insert,
        111 => KeyCode::Delete,
        // 112 => KeyCode::MACRO,
        113 => KeyCode::AudioVolumeMute,
        114 => KeyCode::AudioVolumeDown,
        115 => KeyCode::AudioVolumeUp,
        // 116 => KeyCode::POWER,
        117 => KeyCode::NumpadEqual,
        // 118 => KeyCode::KPPLUSMINUS,
        119 => KeyCode::Pause,
        // 120 => KeyCode::SCALE,
        121 => KeyCode::NumpadComma,
        122 => KeyCode::Lang1,
        123 => KeyCode::Lang2,
        124 => KeyCode::IntlYen,
        125 => KeyCode::SuperLeft,
        126 => KeyCode::SuperRight,
        127 => KeyCode::ContextMenu,
        // 128 => KeyCode::STOP,
        // 129 => KeyCode::AGAIN,
        // 130 => KeyCode::PROPS,
        // 131 => KeyCode::UNDO,
        // 132 => KeyCode::FRONT,
        // 133 => KeyCode::COPY,
        // 134 => KeyCode::OPEN,
        // 135 => KeyCode::PASTE,
        // 136 => KeyCode::FIND,
        // 137 => KeyCode::CUT,
        // 138 => KeyCode::HELP,
        // 139 => KeyCode::MENU,
        // 140 => KeyCode::CALC,
        // 141 => KeyCode::SETUP,
        // 142 => KeyCode::SLEEP,
        // 143 => KeyCode::WAKEUP,
        // 144 => KeyCode::FILE,
        // 145 => KeyCode::SENDFILE,
        // 146 => KeyCode::DELETEFILE,
        // 147 => KeyCode::XFER,
        // 148 => KeyCode::PROG1,
        // 149 => KeyCode::PROG2,
        // 150 => KeyCode::WWW,
        // 151 => KeyCode::MSDOS,
        // 152 => KeyCode::COFFEE,
        // 153 => KeyCode::ROTATE_DISPLAY,
        // 154 => KeyCode::CYCLEWINDOWS,
        // 155 => KeyCode::MAIL,
        // 156 => KeyCode::BOOKMARKS,
        // 157 => KeyCode::COMPUTER,
        // 158 => KeyCode::BACK,
        // 159 => KeyCode::FORWARD,
        // 160 => KeyCode::CLOSECD,
        // 161 => KeyCode::EJECTCD,
        // 162 => KeyCode::EJECTCLOSECD,
        163 => KeyCode::MediaTrackNext,
        164 => KeyCode::MediaPlayPause,
        165 => KeyCode::MediaTrackPrevious,
        166 => KeyCode::MediaStop,
        // 167 => KeyCode::RECORD,
        // 168 => KeyCode::REWIND,
        // 169 => KeyCode::PHONE,
        // 170 => KeyCode::ISO,
        // 171 => KeyCode::CONFIG,
        // 172 => KeyCode::HOMEPAGE,
        // 173 => KeyCode::REFRESH,
        // 174 => KeyCode::EXIT,
        // 175 => KeyCode::MOVE,
        // 176 => KeyCode::EDIT,
        // 177 => KeyCode::SCROLLUP,
        // 178 => KeyCode::SCROLLDOWN,
        // 179 => KeyCode::KPLEFTPAREN,
        // 180 => KeyCode::KPRIGHTPAREN,
        // 181 => KeyCode::NEW,
        // 182 => KeyCode::REDO,
        183 => KeyCode::F13,
        184 => KeyCode::F14,
        185 => KeyCode::F15,
        186 => KeyCode::F16,
        187 => KeyCode::F17,
        188 => KeyCode::F18,
        189 => KeyCode::F19,
        190 => KeyCode::F20,
        191 => KeyCode::F21,
        192 => KeyCode::F22,
        193 => KeyCode::F23,
        194 => KeyCode::F24,
        // 200 => KeyCode::PLAYCD,
        // 201 => KeyCode::PAUSECD,
        // 202 => KeyCode::PROG3,
        // 203 => KeyCode::PROG4,
        // 204 => KeyCode::DASHBOARD,
        // 205 => KeyCode::SUSPEND,
        // 206 => KeyCode::CLOSE,
        // 207 => KeyCode::PLAY,
        // 208 => KeyCode::FASTFORWARD,
        // 209 => KeyCode::BASSBOOST,
        // 210 => KeyCode::PRINT,
        // 211 => KeyCode::HP,
        // 212 => KeyCode::CAMERA,
        // 213 => KeyCode::SOUND,
        // 214 => KeyCode::QUESTION,
        // 215 => KeyCode::EMAIL,
        // 216 => KeyCode::CHAT,
        // 217 => KeyCode::SEARCH,
        // 218 => KeyCode::CONNECT,
        // 219 => KeyCode::FINANCE,
        // 220 => KeyCode::SPORT,
        // 221 => KeyCode::SHOP,
        // 222 => KeyCode::ALTERASE,
        // 223 => KeyCode::CANCEL,
        // 224 => KeyCode::BRIGHTNESSDOW,
        // 225 => KeyCode::BRIGHTNESSU,
        // 226 => KeyCode::MEDIA,
        // 227 => KeyCode::SWITCHVIDEOMODE,
        // 228 => KeyCode::KBDILLUMTOGGLE,
        // 229 => KeyCode::KBDILLUMDOWN,
        // 230 => KeyCode::KBDILLUMUP,
        // 231 => KeyCode::SEND,
        // 232 => KeyCode::REPLY,
        // 233 => KeyCode::FORWARDMAIL,
        // 234 => KeyCode::SAVE,
        // 235 => KeyCode::DOCUMENTS,
        // 236 => KeyCode::BATTERY,
        // 237 => KeyCode::BLUETOOTH,
        // 238 => KeyCode::WLAN,
        // 239 => KeyCode::UWB,
        240 => KeyCode::Unidentified(NativeKeyCode::Unidentified),
        // 241 => KeyCode::VIDEO_NEXT,
        // 242 => KeyCode::VIDEO_PREV,
        // 243 => KeyCode::BRIGHTNESS_CYCLE,
        // 244 => KeyCode::BRIGHTNESS_AUTO,
        // 245 => KeyCode::DISPLAY_OFF,
        // 246 => KeyCode::WWAN,
        // 247 => KeyCode::RFKILL,
        // 248 => KeyCode::KEY_MICMUTE,
        _ => KeyCode::Unidentified(NativeKeyCode::XkbCode(rawkey)),
    }
}
pub fn raw_keycode_to_keycode ( keycode : u32 ) -> KeyCode { let rawkey = keycode - 8 ; // The keycode values are taken from linux/include/uapi/linux/input-event-codes.h, as // libxkbcommon's documentation indicates that the keycode values we're getting from it are // defined by the Linux kernel. If Winit programs end up being run on other Unix-likes which // also use libxkbcommon, then I dearly hope the keycode values mean the same thing. // // Some of the keycodes are likely superfluous for our purposes, and some are ones which are // difficult to test the correctness of, or discover the purpose of. Because of this, they've // either been commented out here, or not included at all. match rawkey { 0 => KeyCode :: Unidentified ( NativeKeyCode :: XkbCode ( 0 ) ) , 1 => KeyCode :: Escape , 2 => KeyCode :: Digit1 , 3 => KeyCode :: Digit2 , 4 => KeyCode :: Digit3 , 5 => KeyCode :: Digit4 , 6 => KeyCode :: Digit5 , 7 => KeyCode :: Digit6 , 8 => KeyCode :: Digit7 , 9 => KeyCode :: Digit8 , 10 => KeyCode :: Digit9 , 11 => KeyCode :: Digit0 , 12 => KeyCode :: Minus , 13 => KeyCode :: Equal , 14 => KeyCode :: Backspace , 15 => KeyCode :: Tab , 16 => KeyCode :: KeyQ , 17 => KeyCode :: KeyW , 18 => KeyCode :: KeyE , 19 => KeyCode :: KeyR , 20 => KeyCode :: KeyT , 21 => KeyCode :: KeyY , 22 => KeyCode :: KeyU , 23 => KeyCode :: KeyI , 24 => KeyCode :: KeyO , 25 => KeyCode :: KeyP , 26 => KeyCode :: BracketLeft , 27 => KeyCode :: BracketRight , 28 => KeyCode :: Enter , 29 => KeyCode :: ControlLeft , 30 => KeyCode :: KeyA , 31 => KeyCode :: KeyS , 32 => KeyCode :: KeyD , 33 => KeyCode :: KeyF , 34 => KeyCode :: KeyG , 35 => KeyCode :: KeyH , 36 => KeyCode :: KeyJ , 37 => KeyCode :: KeyK , 38 => KeyCode :: KeyL , 39 => KeyCode :: Semicolon , 40 => KeyCode :: Quote , 41 => KeyCode :: Backquote , 42 => KeyCode :: ShiftLeft , 43 => KeyCode :: Backslash , 44 => KeyCode :: KeyZ , 45 => KeyCode :: KeyX , 46 => KeyCode :: KeyC , 47 => KeyCode :: KeyV , 48 => KeyCode :: KeyB , 49 => KeyCode :: KeyN , 50 => KeyCode :: KeyM , 51 => KeyCode :: Comma , 52 => KeyCode :: Period , 53 => KeyCode :: Slash , 54 => KeyCode :: ShiftRight , 55 => KeyCode :: NumpadMultiply , 56 => KeyCode :: AltLeft , 57 => KeyCode :: Space , 58 => KeyCode :: CapsLock , 59 => KeyCode :: F1 , 60 => KeyCode :: F2 , 61 => KeyCode :: F3 , 62 => KeyCode :: F4 , 63 => KeyCode :: F5 , 64 => KeyCode :: F6 , 65 => KeyCode :: F7 , 66 => KeyCode :: F8 , 67 => KeyCode :: F9 , 68 => KeyCode :: F10 , 69 => KeyCode :: NumLock , 70 => KeyCode :: ScrollLock , 71 => KeyCode :: Numpad7 , 72 => KeyCode :: Numpad8 , 73 => KeyCode :: Numpad9 , 74 => KeyCode :: NumpadSubtract , 75 => KeyCode :: Numpad4 , 76 => KeyCode :: Numpad5 , 77 => KeyCode :: Numpad6 , 78 => KeyCode :: NumpadAdd , 79 => KeyCode :: Numpad1 , 80 => KeyCode :: Numpad2 , 81 => KeyCode :: Numpad3 , 82 => KeyCode :: Numpad0 , 83 => KeyCode :: NumpadDecimal , 85 => KeyCode :: Lang5 , 86 => KeyCode :: IntlBackslash , 87 => KeyCode :: F11 , 88 => KeyCode :: F12 , 89 => KeyCode :: IntlRo , 90 => KeyCode :: Lang3 , 91 => KeyCode :: Lang4 , 92 => KeyCode :: Convert , 93 => KeyCode :: KanaMode , 94 => KeyCode :: NonConvert , // 95 => KeyCode::KPJPCOMMA, 96 => KeyCode :: NumpadEnter , 97 => KeyCode :: ControlRight , 98 => KeyCode :: NumpadDivide , 99 => KeyCode :: PrintScreen , 100 => KeyCode :: AltRight , // 101 => KeyCode::LINEFEED, 102 => KeyCode :: Home , 103 => KeyCode :: ArrowUp , 104 => KeyCode :: PageUp , 105 => KeyCode :: ArrowLeft , 106 => KeyCode :: ArrowRight , 107 => KeyCode :: End , 108 => KeyCode :: ArrowDown , 109 => KeyCode :: PageDown , 110 => KeyCode :: Insert , 111 => KeyCode :: Delete , // 112 => KeyCode::MACRO, 113 => KeyCode :: AudioVolumeMute , 114 => KeyCode :: AudioVolumeDown , 115 => KeyCode :: AudioVolumeUp , // 116 => KeyCode::POWER, 117 => KeyCode :: NumpadEqual , // 118 => KeyCode::KPPLUSMINUS, 119 => KeyCode :: Pause , // 120 => KeyCode::SCALE, 121 => KeyCode :: NumpadComma , 122 => KeyCode :: Lang1 , 123 => KeyCode :: Lang2 , 124 => KeyCode :: IntlYen , 125 => KeyCode :: SuperLeft , 126 => KeyCode :: SuperRight , 127 => KeyCode :: ContextMenu , // 128 => KeyCode::STOP, // 129 => KeyCode::AGAIN, // 130 => KeyCode::PROPS, // 131 => KeyCode::UNDO, // 132 => KeyCode::FRONT, // 133 => KeyCode::COPY, // 134 => KeyCode::OPEN, // 135 => KeyCode::PASTE, // 136 => KeyCode::FIND, // 137 => KeyCode::CUT, // 138 => KeyCode::HELP, // 139 => KeyCode::MENU, // 140 => KeyCode::CALC, // 141 => KeyCode::SETUP, // 142 => KeyCode::SLEEP, // 143 => KeyCode::WAKEUP, // 144 => KeyCode::FILE, // 145 => KeyCode::SENDFILE, // 146 => KeyCode::DELETEFILE, // 147 => KeyCode::XFER, // 148 => KeyCode::PROG1, // 149 => KeyCode::PROG2, // 150 => KeyCode::WWW, // 151 => KeyCode::MSDOS, // 152 => KeyCode::COFFEE, // 153 => KeyCode::ROTATE_DISPLAY, // 154 => KeyCode::CYCLEWINDOWS, // 155 => KeyCode::MAIL, // 156 => KeyCode::BOOKMARKS, // 157 => KeyCode::COMPUTER, // 158 => KeyCode::BACK, // 159 => KeyCode::FORWARD, // 160 => KeyCode::CLOSECD, // 161 => KeyCode::EJECTCD, // 162 => KeyCode::EJECTCLOSECD, 163 => KeyCode :: MediaTrackNext , 164 => KeyCode :: MediaPlayPause , 165 => KeyCode :: MediaTrackPrevious , 166 => KeyCode :: MediaStop , // 167 => KeyCode::RECORD, // 168 => KeyCode::REWIND, // 169 => KeyCode::PHONE, // 170 => KeyCode::ISO, // 171 => KeyCode::CONFIG, // 172 => KeyCode::HOMEPAGE, // 173 => KeyCode::REFRESH, // 174 => KeyCode::EXIT, // 175 => KeyCode::MOVE, // 176 => KeyCode::EDIT, // 177 => KeyCode::SCROLLUP, // 178 => KeyCode::SCROLLDOWN, // 179 => KeyCode::KPLEFTPAREN, // 180 => KeyCode::KPRIGHTPAREN, // 181 => KeyCode::NEW, // 182 => KeyCode::REDO, 183 => KeyCode :: F13 , 184 => KeyCode :: F14 , 185 => KeyCode :: F15 , 186 => KeyCode :: F16 , 187 => KeyCode :: F17 , 188 => KeyCode :: F18 , 189 => KeyCode :: F19 , 190 => KeyCode :: F20 , 191 => KeyCode :: F21 , 192 => KeyCode :: F22 , 193 => KeyCode :: F23 , 194 => KeyCode :: F24 , // 200 => KeyCode::PLAYCD, // 201 => KeyCode::PAUSECD, // 202 => KeyCode::PROG3, // 203 => KeyCode::PROG4, // 204 => KeyCode::DASHBOARD, // 205 => KeyCode::SUSPEND, // 206 => KeyCode::CLOSE, // 207 => KeyCode::PLAY, // 208 => KeyCode::FASTFORWARD, // 209 => KeyCode::BASSBOOST, // 210 => KeyCode::PRINT, // 211 => KeyCode::HP, // 212 => KeyCode::CAMERA, // 213 => KeyCode::SOUND, // 214 => KeyCode::QUESTION, // 215 => KeyCode::EMAIL, // 216 => KeyCode::CHAT, // 217 => KeyCode::SEARCH, // 218 => KeyCode::CONNECT, // 219 => KeyCode::FINANCE, // 220 => KeyCode::SPORT, // 221 => KeyCode::SHOP, // 222 => KeyCode::ALTERASE, // 223 => KeyCode::CANCEL, // 224 => KeyCode::BRIGHTNESSDOW, // 225 => KeyCode::BRIGHTNESSU, // 226 => KeyCode::MEDIA, // 227 => KeyCode::SWITCHVIDEOMODE, // 228 => KeyCode::KBDILLUMTOGGLE, // 229 => KeyCode::KBDILLUMDOWN, // 230 => KeyCode::KBDILLUMUP, // 231 => KeyCode::SEND, // 232 => KeyCode::REPLY, // 233 => KeyCode::FORWARDMAIL, // 234 => KeyCode::SAVE, // 235 => KeyCode::DOCUMENTS, // 236 => KeyCode::BATTERY, // 237 => KeyCode::BLUETOOTH, // 238 => KeyCode::WLAN, // 239 => KeyCode::UWB, 240 => KeyCode :: Unidentified ( NativeKeyCode :: Unidentified ) , // 241 => KeyCode::VIDEO_NEXT, // 242 => KeyCode::VIDEO_PREV, // 243 => KeyCode::BRIGHTNESS_CYCLE, // 244 => KeyCode::BRIGHTNESS_AUTO, // 245 => KeyCode::DISPLAY_OFF, // 246 => KeyCode::WWAN, // 247 => KeyCode::RFKILL, // 248 => KeyCode::KEY_MICMUTE, _ => KeyCode :: Unidentified ( NativeKeyCode :: XkbCode ( rawkey ) ) , } }
Map the raw X11-style keycode to the `KeyCode` enum.
Map the raw X11 - style keycode to the ` KeyCode ` enum .
keycode
u32
keycode
u32