pub const Scancode = enum(c_uint) {
    unknown,

    //**
    //*  \name Usage page 0x07
    //*
    //*  These values are from usage page 0x07 (USB keyboard page).
    //*/
    //* @{ */

    a = 4,
    b = 5,
    c = 6,
    d = 7,
    e = 8,
    f = 9,
    g = 10,
    h = 11,
    i = 12,
    j = 13,
    k = 14,
    l = 15,
    m = 16,
    n = 17,
    o = 18,
    p = 19,
    q = 20,
    r = 21,
    s = 22,
    t = 23,
    u = 24,
    v = 25,
    w = 26,
    x = 27,
    y = 28,
    z = 29,

    @"1" = 30,
    @"2" = 31,
    @"3" = 32,
    @"4" = 33,
    @"5" = 34,
    @"6" = 35,
    @"7" = 36,
    @"8" = 37,
    @"9" = 38,
    @"0" = 39,

    @"return" = 40,
    escape = 41,
    backspace = 42,
    tab = 43,
    space = 44,

    minus = 45,
    equals = 46,
    leftbracket = 47,
    rightbracket = 48,
    backslash = 49, //**< Located at the lower left of the return
    // *   key on ISO keyboards and at the right end
    // *   of the QWERTY row on ANSI keyboards.
    // *   Produces REVERSE SOLIDUS (backslash) and
    // *   VERTICAL LINE in a US layout, REVERSE
    // *   SOLIDUS and VERTICAL LINE in a UK Mac
    // *   layout, NUMBER SIGN and TILDE in a UK
    // *   Windows layout, DOLLAR SIGN and POUND SIGN
    // *   in a Swiss German layout, NUMBER SIGN and
    // *   APOSTROPHE in a German layout, GRAVE
    // *   ACCENT and POUND SIGN in a French Mac
    // *   layout, and ASTERISK and MICRO SIGN in a
    // *   French Windows layout.
    // */
    nonushash = 50, //**< iso usb keyboards actually use this code
    //*   instead of 49 for the same key, but all
    //*   OSes I've seen treat the two codes
    //*   identically. So, as an implementor, unless
    //*   your keyboard generates both of those
    //*   codes and your OS treats them differently,
    //*   you should generate SDL_SCANCODE_BACKSLASH
    //*   instead of this code. As a user, you
    //*   should not rely on this code because SDL
    //*   will never generate it with most (all?)
    //*   keyboards.
    //*/
    semicolon = 51,
    apostrophe = 52,
    grave = 53, //**< located in the top left corner (on both ansi
    //*   and ISO keyboards). Produces GRAVE ACCENT and
    //*   TILDE in a US Windows layout and in US and UK
    //*   Mac layouts on ANSI keyboards, GRAVE ACCENT
    //*   and NOT SIGN in a UK Windows layout, SECTION
    //*   SIGN and PLUS-MINUS SIGN in US and UK Mac
    //*   layouts on ISO keyboards, SECTION SIGN and
    //*   DEGREE SIGN in a Swiss German layout (Mac:
    //*   only on ISO keyboards), CIRCUMFLEX ACCENT and
    //*   DEGREE SIGN in a German layout (Mac: only on
    //*   ISO keyboards), SUPERSCRIPT TWO and TILDE in a
    //*   French Windows layout, COMMERCIAL AT and
    //*   NUMBER SIGN in a French Mac layout on ISO
    //*   keyboards, and LESS-THAN SIGN and GREATER-THAN
    //*   SIGN in a Swiss German, German, or French Mac
    //*   layout on ANSI keyboards.
    //*/
    comma = 54,
    period = 55,
    slash = 56,

    capslock = 57,

    f1 = 58,
    f2 = 59,
    f3 = 60,
    f4 = 61,
    f5 = 62,
    f6 = 63,
    f7 = 64,
    f8 = 65,
    f9 = 66,
    f10 = 67,
    f11 = 68,
    f12 = 69,

    printscreen = 70,
    scrolllock = 71,
    pause = 72,
    insert = 73, //**< insert on pc, help on some mac keyboards (but
    //    does send code 73, not 117) */
    home = 74,
    pageup = 75,
    delete = 76,
    end = 77,
    pagedown = 78,
    right = 79,
    left = 80,
    down = 81,
    up = 82,

    numlockclear = 83, //**< num lock on pc, clear on mac keyboards
    //*/
    kp_divide = 84,
    kp_multiply = 85,
    kp_minus = 86,
    kp_plus = 87,
    kp_enter = 88,
    kp_1 = 89,
    kp_2 = 90,
    kp_3 = 91,
    kp_4 = 92,
    kp_5 = 93,
    kp_6 = 94,
    kp_7 = 95,
    kp_8 = 96,
    kp_9 = 97,
    kp_0 = 98,
    kp_period = 99,

    nonusbackslash = 100, //**< this is the additional key that iso
    //*   keyboards have over ANSI ones,
    //*   located between left shift and Y.
    //*   Produces GRAVE ACCENT and TILDE in a
    //*   US or UK Mac layout, REVERSE SOLIDUS
    //*   (backslash) and VERTICAL LINE in a
    //*   US or UK Windows layout, and
    //*   LESS-THAN SIGN and GREATER-THAN SIGN
    //*   in a Swiss German, German, or French
    //*   layout. */
    application = 101, //**< windows contextual menu, compose */
    power = 102, //**< the usb document says this is a status flag,
    // *   not a physical key - but some Mac keyboards
    // *   do have a power key. */
    kp_equals = 103,
    f13 = 104,
    f14 = 105,
    f15 = 106,
    f16 = 107,
    f17 = 108,
    f18 = 109,
    f19 = 110,
    f20 = 111,
    f21 = 112,
    f22 = 113,
    f23 = 114,
    f24 = 115,
    execute = 116,
    help = 117, //**< al integrated help center */
    menu = 118, //**< menu (show menu) */
    select = 119,
    stop = 120, //**< ac stop */
    again = 121, //**< ac redo/repeat */
    undo = 122, //**< ac undo */
    cut = 123, //**< ac cut */
    copy = 124, //**< ac copy */
    paste = 125, //**< ac paste */
    find = 126, //**< ac find */
    mute = 127,
    volumeup = 128,
    volumedown = 129,
    ///* not sure whether there's a reason to enable these */
    ///*     sdl_scancode_lockingcapslock = 130,  */
    ///*     sdl_scancode_lockingnumlock = 131, */
    ///*     sdl_scancode_lockingscrolllock = 132, */
    kp_comma = 133,
    kp_equalsas400 = 134,

    international1 = 135, // **< used on asian keyboards, see
    //     footnotes in usb doc */
    international2 = 136,
    international3 = 137, //**< yen */
    international4 = 138,
    international5 = 139,
    international6 = 140,
    international7 = 141,
    international8 = 142,
    international9 = 143,
    lang1 = 144, //**< hangul/english toggle */
    lang2 = 145, //**< hanja conversion */
    lang3 = 146, //**< katakana */
    lang4 = 147, //**< hiragana */
    lang5 = 148, //**< zenkaku/hankaku */
    lang6 = 149, //**< reserved */
    lang7 = 150, //**< reserved */
    lang8 = 151, //**< reserved */
    lang9 = 152, //**< reserved */

    alterase = 153, //**< erase-eaze */
    sysreq = 154,
    cancel = 155, //**< ac cancel */
    clear = 156,
    prior = 157,
    return2 = 158,
    separator = 159,
    out = 160,
    oper = 161,
    clearagain = 162,
    crsel = 163,
    exsel = 164,

    kp_00 = 176,
    kp_000 = 177,
    thousandsseparator = 178,
    decimalseparator = 179,
    currencyunit = 180,
    currencysubunit = 181,
    kp_leftparen = 182,
    kp_rightparen = 183,
    kp_leftbrace = 184,
    kp_rightbrace = 185,
    kp_tab = 186,
    kp_backspace = 187,
    kp_a = 188,
    kp_b = 189,
    kp_c = 190,
    kp_d = 191,
    kp_e = 192,
    kp_f = 193,
    kp_xor = 194,
    kp_power = 195,
    kp_percent = 196,
    kp_less = 197,
    kp_greater = 198,
    kp_ampersand = 199,
    kp_dblampersand = 200,
    kp_verticalbar = 201,
    kp_dblverticalbar = 202,
    kp_colon = 203,
    kp_hash = 204,
    kp_space = 205,
    kp_at = 206,
    kp_exclam = 207,
    kp_memstore = 208,
    kp_memrecall = 209,
    kp_memclear = 210,
    kp_memadd = 211,
    kp_memsubtract = 212,
    kp_memmultiply = 213,
    kp_memdivide = 214,
    kp_plusminus = 215,
    kp_clear = 216,
    kp_clearentry = 217,
    kp_binary = 218,
    kp_octal = 219,
    kp_decimal = 220,
    kp_hexadecimal = 221,

    lctrl = 224,
    lshift = 225,
    lalt = 226, //**< alt, option */
    lgui = 227, //**< windows, command (apple), meta */
    rctrl = 228,
    rshift = 229,
    ralt = 230, //**< alt gr, option */
    rgui = 231, //**< windows, command (apple), meta */

    mode = 257, //**< i'm not sure if this is really not covered
    //*   by any of the above, but since there's a
    //*   special sdl_kmod_mode for it i'm adding it here
    //*/

    //* @} *//* Usage page 0x07 */

    ///**
    // *  \name Usage page 0x0C
    // *
    // *  These values are mapped from usage page 0x0C (USB consumer page).
    // *
    // *  There are way more keys in the spec than we can represent in the
    // *  current scancode range, so pick the ones that commonly come up in
    // *  real world usage.
    // */
    ///* @{ */
    sleep = 258, //**< sleep */
    wake = 259, //**< wake */

    channel_increment = 260, //**< channel increment */
    channel_decrement = 261, //**< channel decrement */

    media_play = 262, //**< play */
    media_pause = 263, //**< pause */
    media_record = 264, //**< record */
    media_fast_forward = 265, //**< fast forward */
    media_rewind = 266, //**< rewind */
    media_next_track = 267, //**< next track */
    media_previous_track = 268, //**< previous track */
    media_stop = 269, //**< stop */
    media_eject = 270, //**< eject */
    media_play_pause = 271, //**< play / pause */
    media_select = 272, //* media select */

    ac_new = 273, //**< ac new */
    ac_open = 274, //**< ac open */
    ac_close = 275, //**< ac close */
    ac_exit = 276, //**< ac exit */
    ac_save = 277, //**< ac save */
    ac_print = 278, //**< ac print */
    ac_properties = 279, //**< ac properties */

    ac_search = 280, //**< ac search */
    ac_home = 281, //**< ac home */
    ac_back = 282, //**< ac back */
    ac_forward = 283, //**< ac forward */
    ac_stop = 284, //**< ac stop */
    ac_refresh = 285, //**< ac refresh */
    ac_bookmarks = 286, //**< ac bookmarks */

    //* @} *//* Usage page 0x0C */

    //**
    //*  \name Mobile keys
    //*
    //*  These are values that are often used on mobile phones.
    //*/
    //* @{ */

    softleft = 287, //**< usually situated below the display on phones and
    //    used as a multi-function feature key for selecting
    //    a software defined function shown on the bottom left
    //    of the display. */
    softright = 288, //**< usually situated below the display on phones and
    //    used as a multi-function feature key for selecting
    //    a software defined function shown on the bottom right
    //    of the display. */
    call = 289, //**< used for accepting phone calls. */
    endcall = 290, //**< used for rejecting phone calls. */

    //* @} *//* Mobile keys */
    //* Add any other keys here. */

    reserved = 400, //**< 400-500 reserved for dynamic keycodes */

    count = 512, //**< not a key, just marks the number of scancodes for array bounds */
};
