SDL_Scancode

Struct SDL_Scancode 

Source
#[repr(transparent)]
pub struct SDL_Scancode(pub c_int);
Expand description

The SDL keyboard scancode representation.

An SDL scancode is the physical representation of a key on the keyboard, independent of language and keyboard mapping.

Values of this type are used to represent keyboard keys, among other places in the scancode field of the SDL_KeyboardEvent structure.

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

§Availability

This enum is available since SDL 3.2.0.

§Known values (sdl3-sys)

Associated constantGlobal constantDescription
UNKNOWNSDL_SCANCODE_UNKNOWN
ASDL_SCANCODE_A
BSDL_SCANCODE_B
CSDL_SCANCODE_C
DSDL_SCANCODE_D
ESDL_SCANCODE_E
FSDL_SCANCODE_F
GSDL_SCANCODE_G
HSDL_SCANCODE_H
ISDL_SCANCODE_I
JSDL_SCANCODE_J
KSDL_SCANCODE_K
LSDL_SCANCODE_L
MSDL_SCANCODE_M
NSDL_SCANCODE_N
OSDL_SCANCODE_O
PSDL_SCANCODE_P
QSDL_SCANCODE_Q
RSDL_SCANCODE_R
SSDL_SCANCODE_S
TSDL_SCANCODE_T
USDL_SCANCODE_U
VSDL_SCANCODE_V
WSDL_SCANCODE_W
XSDL_SCANCODE_X
YSDL_SCANCODE_Y
ZSDL_SCANCODE_Z
_1SDL_SCANCODE_1
_2SDL_SCANCODE_2
_3SDL_SCANCODE_3
_4SDL_SCANCODE_4
_5SDL_SCANCODE_5
_6SDL_SCANCODE_6
_7SDL_SCANCODE_7
_8SDL_SCANCODE_8
_9SDL_SCANCODE_9
_0SDL_SCANCODE_0
RETURNSDL_SCANCODE_RETURN
ESCAPESDL_SCANCODE_ESCAPE
BACKSPACESDL_SCANCODE_BACKSPACE
TABSDL_SCANCODE_TAB
SPACESDL_SCANCODE_SPACE
MINUSSDL_SCANCODE_MINUS
EQUALSSDL_SCANCODE_EQUALS
LEFTBRACKETSDL_SCANCODE_LEFTBRACKET
RIGHTBRACKETSDL_SCANCODE_RIGHTBRACKET
BACKSLASHSDL_SCANCODE_BACKSLASHLocated 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.
NONUSHASHSDL_SCANCODE_NONUSHASHISO 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.
SEMICOLONSDL_SCANCODE_SEMICOLON
APOSTROPHESDL_SCANCODE_APOSTROPHE
GRAVESDL_SCANCODE_GRAVELocated 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.
COMMASDL_SCANCODE_COMMA
PERIODSDL_SCANCODE_PERIOD
SLASHSDL_SCANCODE_SLASH
CAPSLOCKSDL_SCANCODE_CAPSLOCK
F1SDL_SCANCODE_F1
F2SDL_SCANCODE_F2
F3SDL_SCANCODE_F3
F4SDL_SCANCODE_F4
F5SDL_SCANCODE_F5
F6SDL_SCANCODE_F6
F7SDL_SCANCODE_F7
F8SDL_SCANCODE_F8
F9SDL_SCANCODE_F9
F10SDL_SCANCODE_F10
F11SDL_SCANCODE_F11
F12SDL_SCANCODE_F12
PRINTSCREENSDL_SCANCODE_PRINTSCREEN
SCROLLLOCKSDL_SCANCODE_SCROLLLOCK
PAUSESDL_SCANCODE_PAUSE
INSERTSDL_SCANCODE_INSERTinsert on PC, help on some Mac keyboards (but does send code 73, not 117)
HOMESDL_SCANCODE_HOME
PAGEUPSDL_SCANCODE_PAGEUP
DELETESDL_SCANCODE_DELETE
ENDSDL_SCANCODE_END
PAGEDOWNSDL_SCANCODE_PAGEDOWN
RIGHTSDL_SCANCODE_RIGHT
LEFTSDL_SCANCODE_LEFT
DOWNSDL_SCANCODE_DOWN
UPSDL_SCANCODE_UP
NUMLOCKCLEARSDL_SCANCODE_NUMLOCKCLEARnum lock on PC, clear on Mac keyboards
KP_DIVIDESDL_SCANCODE_KP_DIVIDE
KP_MULTIPLYSDL_SCANCODE_KP_MULTIPLY
KP_MINUSSDL_SCANCODE_KP_MINUS
KP_PLUSSDL_SCANCODE_KP_PLUS
KP_ENTERSDL_SCANCODE_KP_ENTER
KP_1SDL_SCANCODE_KP_1
KP_2SDL_SCANCODE_KP_2
KP_3SDL_SCANCODE_KP_3
KP_4SDL_SCANCODE_KP_4
KP_5SDL_SCANCODE_KP_5
KP_6SDL_SCANCODE_KP_6
KP_7SDL_SCANCODE_KP_7
KP_8SDL_SCANCODE_KP_8
KP_9SDL_SCANCODE_KP_9
KP_0SDL_SCANCODE_KP_0
KP_PERIODSDL_SCANCODE_KP_PERIOD
NONUSBACKSLASHSDL_SCANCODE_NONUSBACKSLASHThis is the additional key that ISO keyboards have over ANSI ones, located between left shift and Z. 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.
APPLICATIONSDL_SCANCODE_APPLICATIONwindows contextual menu, compose
POWERSDL_SCANCODE_POWERThe USB document says this is a status flag, not a physical key - but some Mac keyboards do have a power key.
KP_EQUALSSDL_SCANCODE_KP_EQUALS
F13SDL_SCANCODE_F13
F14SDL_SCANCODE_F14
F15SDL_SCANCODE_F15
F16SDL_SCANCODE_F16
F17SDL_SCANCODE_F17
F18SDL_SCANCODE_F18
F19SDL_SCANCODE_F19
F20SDL_SCANCODE_F20
F21SDL_SCANCODE_F21
F22SDL_SCANCODE_F22
F23SDL_SCANCODE_F23
F24SDL_SCANCODE_F24
EXECUTESDL_SCANCODE_EXECUTE
HELPSDL_SCANCODE_HELPAL Integrated Help Center
MENUSDL_SCANCODE_MENUMenu (show menu)
SELECTSDL_SCANCODE_SELECT
STOPSDL_SCANCODE_STOPAC Stop
AGAINSDL_SCANCODE_AGAINAC Redo/Repeat
UNDOSDL_SCANCODE_UNDOAC Undo
CUTSDL_SCANCODE_CUTAC Cut
COPYSDL_SCANCODE_COPYAC Copy
PASTESDL_SCANCODE_PASTEAC Paste
FINDSDL_SCANCODE_FINDAC Find
MUTESDL_SCANCODE_MUTE
VOLUMEUPSDL_SCANCODE_VOLUMEUP
VOLUMEDOWNSDL_SCANCODE_VOLUMEDOWN
KP_COMMASDL_SCANCODE_KP_COMMA
KP_EQUALSAS400SDL_SCANCODE_KP_EQUALSAS400
INTERNATIONAL1SDL_SCANCODE_INTERNATIONAL1used on Asian keyboards, see footnotes in USB doc
INTERNATIONAL2SDL_SCANCODE_INTERNATIONAL2
INTERNATIONAL3SDL_SCANCODE_INTERNATIONAL3Yen
INTERNATIONAL4SDL_SCANCODE_INTERNATIONAL4
INTERNATIONAL5SDL_SCANCODE_INTERNATIONAL5
INTERNATIONAL6SDL_SCANCODE_INTERNATIONAL6
INTERNATIONAL7SDL_SCANCODE_INTERNATIONAL7
INTERNATIONAL8SDL_SCANCODE_INTERNATIONAL8
INTERNATIONAL9SDL_SCANCODE_INTERNATIONAL9
LANG1SDL_SCANCODE_LANG1Hangul/English toggle
LANG2SDL_SCANCODE_LANG2Hanja conversion
LANG3SDL_SCANCODE_LANG3Katakana
LANG4SDL_SCANCODE_LANG4Hiragana
LANG5SDL_SCANCODE_LANG5Zenkaku/Hankaku
LANG6SDL_SCANCODE_LANG6reserved
LANG7SDL_SCANCODE_LANG7reserved
LANG8SDL_SCANCODE_LANG8reserved
LANG9SDL_SCANCODE_LANG9reserved
ALTERASESDL_SCANCODE_ALTERASEErase-Eaze
SYSREQSDL_SCANCODE_SYSREQ
CANCELSDL_SCANCODE_CANCELAC Cancel
CLEARSDL_SCANCODE_CLEAR
PRIORSDL_SCANCODE_PRIOR
RETURN2SDL_SCANCODE_RETURN2
SEPARATORSDL_SCANCODE_SEPARATOR
OUTSDL_SCANCODE_OUT
OPERSDL_SCANCODE_OPER
CLEARAGAINSDL_SCANCODE_CLEARAGAIN
CRSELSDL_SCANCODE_CRSEL
EXSELSDL_SCANCODE_EXSEL
KP_00SDL_SCANCODE_KP_00
KP_000SDL_SCANCODE_KP_000
THOUSANDSSEPARATORSDL_SCANCODE_THOUSANDSSEPARATOR
DECIMALSEPARATORSDL_SCANCODE_DECIMALSEPARATOR
CURRENCYUNITSDL_SCANCODE_CURRENCYUNIT
CURRENCYSUBUNITSDL_SCANCODE_CURRENCYSUBUNIT
KP_LEFTPARENSDL_SCANCODE_KP_LEFTPAREN
KP_RIGHTPARENSDL_SCANCODE_KP_RIGHTPAREN
KP_LEFTBRACESDL_SCANCODE_KP_LEFTBRACE
KP_RIGHTBRACESDL_SCANCODE_KP_RIGHTBRACE
KP_TABSDL_SCANCODE_KP_TAB
KP_BACKSPACESDL_SCANCODE_KP_BACKSPACE
KP_ASDL_SCANCODE_KP_A
KP_BSDL_SCANCODE_KP_B
KP_CSDL_SCANCODE_KP_C
KP_DSDL_SCANCODE_KP_D
KP_ESDL_SCANCODE_KP_E
KP_FSDL_SCANCODE_KP_F
KP_XORSDL_SCANCODE_KP_XOR
KP_POWERSDL_SCANCODE_KP_POWER
KP_PERCENTSDL_SCANCODE_KP_PERCENT
KP_LESSSDL_SCANCODE_KP_LESS
KP_GREATERSDL_SCANCODE_KP_GREATER
KP_AMPERSANDSDL_SCANCODE_KP_AMPERSAND
KP_DBLAMPERSANDSDL_SCANCODE_KP_DBLAMPERSAND
KP_VERTICALBARSDL_SCANCODE_KP_VERTICALBAR
KP_DBLVERTICALBARSDL_SCANCODE_KP_DBLVERTICALBAR
KP_COLONSDL_SCANCODE_KP_COLON
KP_HASHSDL_SCANCODE_KP_HASH
KP_SPACESDL_SCANCODE_KP_SPACE
KP_ATSDL_SCANCODE_KP_AT
KP_EXCLAMSDL_SCANCODE_KP_EXCLAM
KP_MEMSTORESDL_SCANCODE_KP_MEMSTORE
KP_MEMRECALLSDL_SCANCODE_KP_MEMRECALL
KP_MEMCLEARSDL_SCANCODE_KP_MEMCLEAR
KP_MEMADDSDL_SCANCODE_KP_MEMADD
KP_MEMSUBTRACTSDL_SCANCODE_KP_MEMSUBTRACT
KP_MEMMULTIPLYSDL_SCANCODE_KP_MEMMULTIPLY
KP_MEMDIVIDESDL_SCANCODE_KP_MEMDIVIDE
KP_PLUSMINUSSDL_SCANCODE_KP_PLUSMINUS
KP_CLEARSDL_SCANCODE_KP_CLEAR
KP_CLEARENTRYSDL_SCANCODE_KP_CLEARENTRY
KP_BINARYSDL_SCANCODE_KP_BINARY
KP_OCTALSDL_SCANCODE_KP_OCTAL
KP_DECIMALSDL_SCANCODE_KP_DECIMAL
KP_HEXADECIMALSDL_SCANCODE_KP_HEXADECIMAL
LCTRLSDL_SCANCODE_LCTRL
LSHIFTSDL_SCANCODE_LSHIFT
LALTSDL_SCANCODE_LALTalt, option
LGUISDL_SCANCODE_LGUIwindows, command (apple), meta
RCTRLSDL_SCANCODE_RCTRL
RSHIFTSDL_SCANCODE_RSHIFT
RALTSDL_SCANCODE_RALTalt gr, option
RGUISDL_SCANCODE_RGUIwindows, command (apple), meta
MODESDL_SCANCODE_MODEI’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
SLEEPSDL_SCANCODE_SLEEPSleep
WAKESDL_SCANCODE_WAKEWake
CHANNEL_INCREMENTSDL_SCANCODE_CHANNEL_INCREMENTChannel Increment
CHANNEL_DECREMENTSDL_SCANCODE_CHANNEL_DECREMENTChannel Decrement
MEDIA_PLAYSDL_SCANCODE_MEDIA_PLAYPlay
MEDIA_PAUSESDL_SCANCODE_MEDIA_PAUSEPause
MEDIA_RECORDSDL_SCANCODE_MEDIA_RECORDRecord
MEDIA_FAST_FORWARDSDL_SCANCODE_MEDIA_FAST_FORWARDFast Forward
MEDIA_REWINDSDL_SCANCODE_MEDIA_REWINDRewind
MEDIA_NEXT_TRACKSDL_SCANCODE_MEDIA_NEXT_TRACKNext Track
MEDIA_PREVIOUS_TRACKSDL_SCANCODE_MEDIA_PREVIOUS_TRACKPrevious Track
MEDIA_STOPSDL_SCANCODE_MEDIA_STOPStop
MEDIA_EJECTSDL_SCANCODE_MEDIA_EJECTEject
MEDIA_PLAY_PAUSESDL_SCANCODE_MEDIA_PLAY_PAUSEPlay / Pause
MEDIA_SELECTSDL_SCANCODE_MEDIA_SELECT
AC_NEWSDL_SCANCODE_AC_NEWAC New
AC_OPENSDL_SCANCODE_AC_OPENAC Open
AC_CLOSESDL_SCANCODE_AC_CLOSEAC Close
AC_EXITSDL_SCANCODE_AC_EXITAC Exit
AC_SAVESDL_SCANCODE_AC_SAVEAC Save
AC_PRINTSDL_SCANCODE_AC_PRINTAC Print
AC_PROPERTIESSDL_SCANCODE_AC_PROPERTIESAC Properties
AC_SEARCHSDL_SCANCODE_AC_SEARCHAC Search
AC_HOMESDL_SCANCODE_AC_HOMEAC Home
AC_BACKSDL_SCANCODE_AC_BACKAC Back
AC_FORWARDSDL_SCANCODE_AC_FORWARDAC Forward
AC_STOPSDL_SCANCODE_AC_STOPAC Stop
AC_REFRESHSDL_SCANCODE_AC_REFRESHAC Refresh
AC_BOOKMARKSSDL_SCANCODE_AC_BOOKMARKSAC Bookmarks
SOFTLEFTSDL_SCANCODE_SOFTLEFTUsually 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.
SOFTRIGHTSDL_SCANCODE_SOFTRIGHTUsually 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.
CALLSDL_SCANCODE_CALLUsed for accepting phone calls.
ENDCALLSDL_SCANCODE_ENDCALLUsed for rejecting phone calls.
RESERVEDSDL_SCANCODE_RESERVED400-500 reserved for dynamic keycodes
COUNTSDL_SCANCODE_COUNTnot a key, just marks the number of scancodes for array bounds

Tuple Fields§

§0: c_int

Implementations§

Source§

impl SDL_Scancode

Source

pub const UNKNOWN: Self

Source

pub const A: Self

Source

pub const B: Self

Source

pub const C: Self

Source

pub const D: Self

Source

pub const E: Self

Source

pub const F: Self

Source

pub const G: Self

Source

pub const H: Self

Source

pub const I: Self

Source

pub const J: Self

Source

pub const K: Self

Source

pub const L: Self

Source

pub const M: Self

Source

pub const N: Self

Source

pub const O: Self

Source

pub const P: Self

Source

pub const Q: Self

Source

pub const R: Self

Source

pub const S: Self

Source

pub const T: Self

Source

pub const U: Self

Source

pub const V: Self

Source

pub const W: Self

Source

pub const X: Self

Source

pub const Y: Self

Source

pub const Z: Self

Source

pub const _1: Self

Source

pub const _2: Self

Source

pub const _3: Self

Source

pub const _4: Self

Source

pub const _5: Self

Source

pub const _6: Self

Source

pub const _7: Self

Source

pub const _8: Self

Source

pub const _9: Self

Source

pub const _0: Self

Source

pub const RETURN: Self

Source

pub const ESCAPE: Self

Source

pub const BACKSPACE: Self

Source

pub const TAB: Self

Source

pub const SPACE: Self

Source

pub const MINUS: Self

Source

pub const EQUALS: Self

Source

pub const LEFTBRACKET: Self

Source

pub const RIGHTBRACKET: Self

Source

pub const BACKSLASH: Self

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.

Source

pub const NONUSHASH: Self

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.

Source

pub const SEMICOLON: Self

Source

pub const APOSTROPHE: Self

Source

pub const GRAVE: Self

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.

Source

pub const COMMA: Self

Source

pub const PERIOD: Self

Source

pub const SLASH: Self

Source

pub const CAPSLOCK: Self

Source

pub const F1: Self

Source

pub const F2: Self

Source

pub const F3: Self

Source

pub const F4: Self

Source

pub const F5: Self

Source

pub const F6: Self

Source

pub const F7: Self

Source

pub const F8: Self

Source

pub const F9: Self

Source

pub const F10: Self

Source

pub const F11: Self

Source

pub const F12: Self

Source

pub const PRINTSCREEN: Self

Source

pub const SCROLLLOCK: Self

Source

pub const PAUSE: Self

Source

pub const INSERT: Self

insert on PC, help on some Mac keyboards (but does send code 73, not 117)

Source

pub const HOME: Self

Source

pub const PAGEUP: Self

Source

pub const DELETE: Self

Source

pub const END: Self

Source

pub const PAGEDOWN: Self

Source

pub const RIGHT: Self

Source

pub const LEFT: Self

Source

pub const DOWN: Self

Source

pub const UP: Self

Source

pub const NUMLOCKCLEAR: Self

num lock on PC, clear on Mac keyboards

Source

pub const KP_DIVIDE: Self

Source

pub const KP_MULTIPLY: Self

Source

pub const KP_MINUS: Self

Source

pub const KP_PLUS: Self

Source

pub const KP_ENTER: Self

Source

pub const KP_1: Self

Source

pub const KP_2: Self

Source

pub const KP_3: Self

Source

pub const KP_4: Self

Source

pub const KP_5: Self

Source

pub const KP_6: Self

Source

pub const KP_7: Self

Source

pub const KP_8: Self

Source

pub const KP_9: Self

Source

pub const KP_0: Self

Source

pub const KP_PERIOD: Self

Source

pub const NONUSBACKSLASH: Self

This is the additional key that ISO keyboards have over ANSI ones, located between left shift and Z. 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.

Source

pub const APPLICATION: Self

windows contextual menu, compose

Source

pub const POWER: Self

The USB document says this is a status flag, not a physical key - but some Mac keyboards do have a power key.

Source

pub const KP_EQUALS: Self

Source

pub const F13: Self

Source

pub const F14: Self

Source

pub const F15: Self

Source

pub const F16: Self

Source

pub const F17: Self

Source

pub const F18: Self

Source

pub const F19: Self

Source

pub const F20: Self

Source

pub const F21: Self

Source

pub const F22: Self

Source

pub const F23: Self

Source

pub const F24: Self

Source

pub const EXECUTE: Self

Source

pub const HELP: Self

AL Integrated Help Center

Source

pub const MENU: Self

Menu (show menu)

Source

pub const SELECT: Self

Source

pub const STOP: Self

AC Stop

Source

pub const AGAIN: Self

AC Redo/Repeat

Source

pub const UNDO: Self

AC Undo

Source

pub const CUT: Self

AC Cut

Source

pub const COPY: Self

AC Copy

Source

pub const PASTE: Self

AC Paste

Source

pub const FIND: Self

AC Find

Source

pub const MUTE: Self

Source

pub const VOLUMEUP: Self

Source

pub const VOLUMEDOWN: Self

Source

pub const KP_COMMA: Self

Source

pub const KP_EQUALSAS400: Self

Source

pub const INTERNATIONAL1: Self

used on Asian keyboards, see footnotes in USB doc

Source

pub const INTERNATIONAL2: Self

Source

pub const INTERNATIONAL3: Self

Yen

Source

pub const INTERNATIONAL4: Self

Source

pub const INTERNATIONAL5: Self

Source

pub const INTERNATIONAL6: Self

Source

pub const INTERNATIONAL7: Self

Source

pub const INTERNATIONAL8: Self

Source

pub const INTERNATIONAL9: Self

Source

pub const LANG1: Self

Hangul/English toggle

Source

pub const LANG2: Self

Hanja conversion

Source

pub const LANG3: Self

Katakana

Source

pub const LANG4: Self

Hiragana

Source

pub const LANG5: Self

Zenkaku/Hankaku

Source

pub const LANG6: Self

reserved

Source

pub const LANG7: Self

reserved

Source

pub const LANG8: Self

reserved

Source

pub const LANG9: Self

reserved

Source

pub const ALTERASE: Self

Erase-Eaze

Source

pub const SYSREQ: Self

Source

pub const CANCEL: Self

AC Cancel

Source

pub const CLEAR: Self

Source

pub const PRIOR: Self

Source

pub const RETURN2: Self

Source

pub const SEPARATOR: Self

Source

pub const OUT: Self

Source

pub const OPER: Self

Source

pub const CLEARAGAIN: Self

Source

pub const CRSEL: Self

Source

pub const EXSEL: Self

Source

pub const KP_00: Self

Source

pub const KP_000: Self

Source

pub const THOUSANDSSEPARATOR: Self

Source

pub const DECIMALSEPARATOR: Self

Source

pub const CURRENCYUNIT: Self

Source

pub const CURRENCYSUBUNIT: Self

Source

pub const KP_LEFTPAREN: Self

Source

pub const KP_RIGHTPAREN: Self

Source

pub const KP_LEFTBRACE: Self

Source

pub const KP_RIGHTBRACE: Self

Source

pub const KP_TAB: Self

Source

pub const KP_BACKSPACE: Self

Source

pub const KP_A: Self

Source

pub const KP_B: Self

Source

pub const KP_C: Self

Source

pub const KP_D: Self

Source

pub const KP_E: Self

Source

pub const KP_F: Self

Source

pub const KP_XOR: Self

Source

pub const KP_POWER: Self

Source

pub const KP_PERCENT: Self

Source

pub const KP_LESS: Self

Source

pub const KP_GREATER: Self

Source

pub const KP_AMPERSAND: Self

Source

pub const KP_DBLAMPERSAND: Self

Source

pub const KP_VERTICALBAR: Self

Source

pub const KP_DBLVERTICALBAR: Self

Source

pub const KP_COLON: Self

Source

pub const KP_HASH: Self

Source

pub const KP_SPACE: Self

Source

pub const KP_AT: Self

Source

pub const KP_EXCLAM: Self

Source

pub const KP_MEMSTORE: Self

Source

pub const KP_MEMRECALL: Self

Source

pub const KP_MEMCLEAR: Self

Source

pub const KP_MEMADD: Self

Source

pub const KP_MEMSUBTRACT: Self

Source

pub const KP_MEMMULTIPLY: Self

Source

pub const KP_MEMDIVIDE: Self

Source

pub const KP_PLUSMINUS: Self

Source

pub const KP_CLEAR: Self

Source

pub const KP_CLEARENTRY: Self

Source

pub const KP_BINARY: Self

Source

pub const KP_OCTAL: Self

Source

pub const KP_DECIMAL: Self

Source

pub const KP_HEXADECIMAL: Self

Source

pub const LCTRL: Self

Source

pub const LSHIFT: Self

Source

pub const LALT: Self

alt, option

Source

pub const LGUI: Self

windows, command (apple), meta

Source

pub const RCTRL: Self

Source

pub const RSHIFT: Self

Source

pub const RALT: Self

alt gr, option

Source

pub const RGUI: Self

windows, command (apple), meta

Source

pub const MODE: Self

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

Source

pub const SLEEP: Self

Sleep

Source

pub const WAKE: Self

Wake

Source

pub const CHANNEL_INCREMENT: Self

Channel Increment

Source

pub const CHANNEL_DECREMENT: Self

Channel Decrement

Source

pub const MEDIA_PLAY: Self

Play

Source

pub const MEDIA_PAUSE: Self

Pause

Source

pub const MEDIA_RECORD: Self

Record

Source

pub const MEDIA_FAST_FORWARD: Self

Fast Forward

Source

pub const MEDIA_REWIND: Self

Rewind

Source

pub const MEDIA_NEXT_TRACK: Self

Next Track

Source

pub const MEDIA_PREVIOUS_TRACK: Self

Previous Track

Source

pub const MEDIA_STOP: Self

Stop

Source

pub const MEDIA_EJECT: Self

Eject

Source

pub const MEDIA_PLAY_PAUSE: Self

Play / Pause

Source

pub const MEDIA_SELECT: Self

Source

pub const AC_NEW: Self

AC New

Source

pub const AC_OPEN: Self

AC Open

Source

pub const AC_CLOSE: Self

AC Close

Source

pub const AC_EXIT: Self

AC Exit

Source

pub const AC_SAVE: Self

AC Save

Source

pub const AC_PRINT: Self

AC Print

Source

pub const AC_PROPERTIES: Self

AC Properties

AC Search

Source

pub const AC_HOME: Self

AC Home

Source

pub const AC_BACK: Self

AC Back

Source

pub const AC_FORWARD: Self

AC Forward

Source

pub const AC_STOP: Self

AC Stop

Source

pub const AC_REFRESH: Self

AC Refresh

Source

pub const AC_BOOKMARKS: Self

AC Bookmarks

Source

pub const SOFTLEFT: Self

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.

Source

pub const SOFTRIGHT: Self

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.

Source

pub const CALL: Self

Used for accepting phone calls.

Source

pub const ENDCALL: Self

Used for rejecting phone calls.

Source

pub const RESERVED: Self

400-500 reserved for dynamic keycodes

Source

pub const COUNT: Self

not a key, just marks the number of scancodes for array bounds

Trait Implementations§

Source§

impl Clone for SDL_Scancode

Source§

fn clone(&self) -> SDL_Scancode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SDL_Scancode

Available on crate feature debug-impls only.
Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SDL_Scancode

Source§

fn default() -> SDL_Scancode

Returns the “default value” for a type. Read more
Source§

impl From<SDL_Scancode> for c_int

Source§

fn from(value: SDL_Scancode) -> Self

Converts to this type from the input type.
Source§

impl GroupMetadata for SDL_Scancode

Available on crate feature metadata only.
Source§

const GROUP_METADATA: &'static Group

Metadata for this group
Source§

impl Hash for SDL_Scancode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for SDL_Scancode

Source§

fn cmp(&self, other: &SDL_Scancode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<SDL_Scancode> for c_int

Source§

fn eq(&self, other: &SDL_Scancode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<i32> for SDL_Scancode

Source§

fn eq(&self, other: &c_int) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for SDL_Scancode

Source§

fn eq(&self, other: &SDL_Scancode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for SDL_Scancode

Source§

fn partial_cmp(&self, other: &SDL_Scancode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for SDL_Scancode

Source§

impl Eq for SDL_Scancode

Source§

impl StructuralPartialEq for SDL_Scancode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.