Class SDL_Scancode

  • All Implemented Interfaces:
    JnaEnum

    public final class SDL_Scancode
    extends Object
    implements JnaEnum
    The SDL keyboard scancode representation.

    Values of this type are used to represent keyboard keys, among other places in the SDL_Keysym.scancode and SDL_Event.key.keysym.scancode field.

    The values in this enumeration are based on the USB usage page standard: https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf

    • Field Detail

      • SDL_SCANCODE_LEFTBRACKET

        public static final int SDL_SCANCODE_LEFTBRACKET
        See Also:
        Constant Field Values
      • SDL_SCANCODE_RIGHTBRACKET

        public static final int SDL_SCANCODE_RIGHTBRACKET
        See Also:
        Constant Field Values
      • SDL_SCANCODE_BACKSLASH

        public static final int SDL_SCANCODE_BACKSLASH
        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.
        See Also:
        Constant Field Values
      • SDL_SCANCODE_NONUSHASH

        public static final int SDL_SCANCODE_NONUSHASH
        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.
        See Also:
        Constant Field Values
      • SDL_SCANCODE_APOSTROPHE

        public static final int SDL_SCANCODE_APOSTROPHE
        See Also:
        Constant Field Values
      • SDL_SCANCODE_GRAVE

        public static final int SDL_SCANCODE_GRAVE
        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.
        See Also:
        Constant Field Values
      • SDL_SCANCODE_PRINTSCREEN

        public static final int SDL_SCANCODE_PRINTSCREEN
        See Also:
        Constant Field Values
      • SDL_SCANCODE_SCROLLLOCK

        public static final int SDL_SCANCODE_SCROLLLOCK
        See Also:
        Constant Field Values
      • SDL_SCANCODE_INSERT

        public static final int SDL_SCANCODE_INSERT
        insert on PC, help on some Mac keyboards (but does send code 73, not 117)
        See Also:
        Constant Field Values
      • SDL_SCANCODE_NUMLOCKCLEAR

        public static final int SDL_SCANCODE_NUMLOCKCLEAR
        num lock on PC, clear on Mac keyboards
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_MULTIPLY

        public static final int SDL_SCANCODE_KP_MULTIPLY
        See Also:
        Constant Field Values
      • SDL_SCANCODE_NONUSBACKSLASH

        public static final int SDL_SCANCODE_NONUSBACKSLASH
        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.
        See Also:
        Constant Field Values
      • SDL_SCANCODE_APPLICATION

        public static final int SDL_SCANCODE_APPLICATION
        windows contextual menu, compose
        See Also:
        Constant Field Values
      • SDL_SCANCODE_POWER

        public static final int SDL_SCANCODE_POWER
        The USB document says this is a status flag, not a physical key - but some Mac keyboards do have a power key.
        See Also:
        Constant Field Values
      • SDL_SCANCODE_HELP

        public static final int SDL_SCANCODE_HELP
        AL Integrated Help Center
        See Also:
        Constant Field Values
      • SDL_SCANCODE_MENU

        public static final int SDL_SCANCODE_MENU
        Menu (show menu)
        See Also:
        Constant Field Values
      • SDL_SCANCODE_AGAIN

        public static final int SDL_SCANCODE_AGAIN
        AC Redo/Repeat
        See Also:
        Constant Field Values
      • SDL_SCANCODE_PASTE

        public static final int SDL_SCANCODE_PASTE
        AC Paste
        See Also:
        Constant Field Values
      • SDL_SCANCODE_VOLUMEDOWN

        public static final int SDL_SCANCODE_VOLUMEDOWN
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_EQUALSAS400

        public static final int SDL_SCANCODE_KP_EQUALSAS400
        See Also:
        Constant Field Values
      • SDL_SCANCODE_INTERNATIONAL1

        public static final int SDL_SCANCODE_INTERNATIONAL1
        used on Asian keyboards, see footnotes in USB doc
        See Also:
        Constant Field Values
      • SDL_SCANCODE_INTERNATIONAL2

        public static final int SDL_SCANCODE_INTERNATIONAL2
        See Also:
        Constant Field Values
      • SDL_SCANCODE_INTERNATIONAL3

        public static final int SDL_SCANCODE_INTERNATIONAL3
        Yen
        See Also:
        Constant Field Values
      • SDL_SCANCODE_INTERNATIONAL4

        public static final int SDL_SCANCODE_INTERNATIONAL4
        See Also:
        Constant Field Values
      • SDL_SCANCODE_INTERNATIONAL5

        public static final int SDL_SCANCODE_INTERNATIONAL5
        See Also:
        Constant Field Values
      • SDL_SCANCODE_INTERNATIONAL6

        public static final int SDL_SCANCODE_INTERNATIONAL6
        See Also:
        Constant Field Values
      • SDL_SCANCODE_INTERNATIONAL7

        public static final int SDL_SCANCODE_INTERNATIONAL7
        See Also:
        Constant Field Values
      • SDL_SCANCODE_INTERNATIONAL8

        public static final int SDL_SCANCODE_INTERNATIONAL8
        See Also:
        Constant Field Values
      • SDL_SCANCODE_INTERNATIONAL9

        public static final int SDL_SCANCODE_INTERNATIONAL9
        See Also:
        Constant Field Values
      • SDL_SCANCODE_LANG1

        public static final int SDL_SCANCODE_LANG1
        Hangul/English toggle
        See Also:
        Constant Field Values
      • SDL_SCANCODE_LANG2

        public static final int SDL_SCANCODE_LANG2
        Hanja conversion
        See Also:
        Constant Field Values
      • SDL_SCANCODE_LANG3

        public static final int SDL_SCANCODE_LANG3
        Katakana
        See Also:
        Constant Field Values
      • SDL_SCANCODE_LANG4

        public static final int SDL_SCANCODE_LANG4
        Hiragana
        See Also:
        Constant Field Values
      • SDL_SCANCODE_LANG5

        public static final int SDL_SCANCODE_LANG5
        Zenkaku/Hankaku
        See Also:
        Constant Field Values
      • SDL_SCANCODE_LANG6

        public static final int SDL_SCANCODE_LANG6
        reserved
        See Also:
        Constant Field Values
      • SDL_SCANCODE_LANG7

        public static final int SDL_SCANCODE_LANG7
        reserved
        See Also:
        Constant Field Values
      • SDL_SCANCODE_LANG8

        public static final int SDL_SCANCODE_LANG8
        reserved
        See Also:
        Constant Field Values
      • SDL_SCANCODE_LANG9

        public static final int SDL_SCANCODE_LANG9
        reserved
        See Also:
        Constant Field Values
      • SDL_SCANCODE_ALTERASE

        public static final int SDL_SCANCODE_ALTERASE
        Erase-Eaze
        See Also:
        Constant Field Values
      • SDL_SCANCODE_CANCEL

        public static final int SDL_SCANCODE_CANCEL
        AC Cancel
        See Also:
        Constant Field Values
      • SDL_SCANCODE_CLEARAGAIN

        public static final int SDL_SCANCODE_CLEARAGAIN
        See Also:
        Constant Field Values
      • SDL_SCANCODE_THOUSANDSSEPARATOR

        public static final int SDL_SCANCODE_THOUSANDSSEPARATOR
        See Also:
        Constant Field Values
      • SDL_SCANCODE_DECIMALSEPARATOR

        public static final int SDL_SCANCODE_DECIMALSEPARATOR
        See Also:
        Constant Field Values
      • SDL_SCANCODE_CURRENCYUNIT

        public static final int SDL_SCANCODE_CURRENCYUNIT
        See Also:
        Constant Field Values
      • SDL_SCANCODE_CURRENCYSUBUNIT

        public static final int SDL_SCANCODE_CURRENCYSUBUNIT
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_LEFTPAREN

        public static final int SDL_SCANCODE_KP_LEFTPAREN
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_RIGHTPAREN

        public static final int SDL_SCANCODE_KP_RIGHTPAREN
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_LEFTBRACE

        public static final int SDL_SCANCODE_KP_LEFTBRACE
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_RIGHTBRACE

        public static final int SDL_SCANCODE_KP_RIGHTBRACE
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_BACKSPACE

        public static final int SDL_SCANCODE_KP_BACKSPACE
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_PERCENT

        public static final int SDL_SCANCODE_KP_PERCENT
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_GREATER

        public static final int SDL_SCANCODE_KP_GREATER
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_AMPERSAND

        public static final int SDL_SCANCODE_KP_AMPERSAND
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_DBLAMPERSAND

        public static final int SDL_SCANCODE_KP_DBLAMPERSAND
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_VERTICALBAR

        public static final int SDL_SCANCODE_KP_VERTICALBAR
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_DBLVERTICALBAR

        public static final int SDL_SCANCODE_KP_DBLVERTICALBAR
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_MEMSTORE

        public static final int SDL_SCANCODE_KP_MEMSTORE
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_MEMRECALL

        public static final int SDL_SCANCODE_KP_MEMRECALL
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_MEMCLEAR

        public static final int SDL_SCANCODE_KP_MEMCLEAR
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_MEMSUBTRACT

        public static final int SDL_SCANCODE_KP_MEMSUBTRACT
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_MEMMULTIPLY

        public static final int SDL_SCANCODE_KP_MEMMULTIPLY
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_MEMDIVIDE

        public static final int SDL_SCANCODE_KP_MEMDIVIDE
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_PLUSMINUS

        public static final int SDL_SCANCODE_KP_PLUSMINUS
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_CLEARENTRY

        public static final int SDL_SCANCODE_KP_CLEARENTRY
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_DECIMAL

        public static final int SDL_SCANCODE_KP_DECIMAL
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KP_HEXADECIMAL

        public static final int SDL_SCANCODE_KP_HEXADECIMAL
        See Also:
        Constant Field Values
      • SDL_SCANCODE_LALT

        public static final int SDL_SCANCODE_LALT
        alt, option
        See Also:
        Constant Field Values
      • SDL_SCANCODE_LGUI

        public static final int SDL_SCANCODE_LGUI
        windows, command (apple), meta
        See Also:
        Constant Field Values
      • SDL_SCANCODE_RALT

        public static final int SDL_SCANCODE_RALT
        alt gr, option
        See Also:
        Constant Field Values
      • SDL_SCANCODE_RGUI

        public static final int SDL_SCANCODE_RGUI
        windows, command (apple), meta
        See Also:
        Constant Field Values
      • SDL_SCANCODE_MODE

        public static final int SDL_SCANCODE_MODE
        I'm not sure if this is really not covered by any of the above, but since there's a special KMOD_MODE for it I'm adding it here
        See Also:
        Constant Field Values
      • SDL_SCANCODE_MEDIASELECT

        public static final int SDL_SCANCODE_MEDIASELECT
        See Also:
        Constant Field Values
      • SDL_SCANCODE_WWW

        public static final int SDL_SCANCODE_WWW
        AL Internet Browser
        See Also:
        Constant Field Values
      • SDL_SCANCODE_CALCULATOR

        public static final int SDL_SCANCODE_CALCULATOR
        AL Calculator
        See Also:
        Constant Field Values
      • SDL_SCANCODE_AC_SEARCH

        public static final int SDL_SCANCODE_AC_SEARCH
        AC Search
        See Also:
        Constant Field Values
      • SDL_SCANCODE_AC_HOME

        public static final int SDL_SCANCODE_AC_HOME
        AC Home
        See Also:
        Constant Field Values
      • SDL_SCANCODE_AC_BACK

        public static final int SDL_SCANCODE_AC_BACK
        AC Back
        See Also:
        Constant Field Values
      • SDL_SCANCODE_AC_FORWARD

        public static final int SDL_SCANCODE_AC_FORWARD
        AC Forward
        See Also:
        Constant Field Values
      • SDL_SCANCODE_AC_STOP

        public static final int SDL_SCANCODE_AC_STOP
        AC Stop
        See Also:
        Constant Field Values
      • SDL_SCANCODE_AC_REFRESH

        public static final int SDL_SCANCODE_AC_REFRESH
        AC Refresh
        See Also:
        Constant Field Values
      • SDL_SCANCODE_AC_BOOKMARKS

        public static final int SDL_SCANCODE_AC_BOOKMARKS
        AC Bookmarks
        See Also:
        Constant Field Values
      • SDL_SCANCODE_BRIGHTNESSDOWN

        public static final int SDL_SCANCODE_BRIGHTNESSDOWN
        See Also:
        Constant Field Values
      • SDL_SCANCODE_BRIGHTNESSUP

        public static final int SDL_SCANCODE_BRIGHTNESSUP
        See Also:
        Constant Field Values
      • SDL_SCANCODE_DISPLAYSWITCH

        public static final int SDL_SCANCODE_DISPLAYSWITCH
        display mirroring/dual display switch, video mode switch
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KBDILLUMTOGGLE

        public static final int SDL_SCANCODE_KBDILLUMTOGGLE
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KBDILLUMDOWN

        public static final int SDL_SCANCODE_KBDILLUMDOWN
        See Also:
        Constant Field Values
      • SDL_SCANCODE_KBDILLUMUP

        public static final int SDL_SCANCODE_KBDILLUMUP
        See Also:
        Constant Field Values
      • SDL_SCANCODE_SLEEP

        public static final int SDL_SCANCODE_SLEEP
        SC System Sleep
        See Also:
        Constant Field Values
      • SDL_SCANCODE_AUDIOREWIND

        public static final int SDL_SCANCODE_AUDIOREWIND
        See Also:
        Constant Field Values
      • SDL_SCANCODE_AUDIOFASTFORWARD

        public static final int SDL_SCANCODE_AUDIOFASTFORWARD
        See Also:
        Constant Field Values
      • SDL_SCANCODE_SOFTLEFT

        public static final int SDL_SCANCODE_SOFTLEFT
        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.
        See Also:
        Constant Field Values
      • SDL_SCANCODE_SOFTRIGHT

        public static final int SDL_SCANCODE_SOFTRIGHT
        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.
        See Also:
        Constant Field Values
      • SDL_SCANCODE_CALL

        public static final int SDL_SCANCODE_CALL
        Used for accepting phone calls.
        See Also:
        Constant Field Values
      • SDL_SCANCODE_ENDCALL

        public static final int SDL_SCANCODE_ENDCALL
        Used for rejecting phone calls.
        See Also:
        Constant Field Values