| Value | Meaning |
|---|
| SDL_SCANCODE_UNKNOWN0 | |
| SDL_SCANCODE_A4 | |
| SDL_SCANCODE_B5 | |
| SDL_SCANCODE_C6 | |
| SDL_SCANCODE_D7 | |
| SDL_SCANCODE_E8 | |
| SDL_SCANCODE_F9 | |
| SDL_SCANCODE_G10 | |
| SDL_SCANCODE_H11 | |
| SDL_SCANCODE_I12 | |
| SDL_SCANCODE_J13 | |
| SDL_SCANCODE_K14 | |
| SDL_SCANCODE_L15 | |
| SDL_SCANCODE_M16 | |
| SDL_SCANCODE_N17 | |
| SDL_SCANCODE_O18 | |
| SDL_SCANCODE_P19 | |
| SDL_SCANCODE_Q20 | |
| SDL_SCANCODE_R21 | |
| SDL_SCANCODE_S22 | |
| SDL_SCANCODE_T23 | |
| SDL_SCANCODE_U24 | |
| SDL_SCANCODE_V25 | |
| SDL_SCANCODE_W26 | |
| SDL_SCANCODE_X27 | |
| SDL_SCANCODE_Y28 | |
| SDL_SCANCODE_Z29 | |
| SDL_SCANCODE_130 | |
| SDL_SCANCODE_231 | |
| SDL_SCANCODE_332 | |
| SDL_SCANCODE_433 | |
| SDL_SCANCODE_534 | |
| SDL_SCANCODE_635 | |
| SDL_SCANCODE_736 | |
| SDL_SCANCODE_837 | |
| SDL_SCANCODE_938 | |
| SDL_SCANCODE_039 | |
| SDL_SCANCODE_RETURN40 | |
| SDL_SCANCODE_ESCAPE41 | |
| SDL_SCANCODE_BACKSPACE42 | |
| SDL_SCANCODE_TAB43 | |
| SDL_SCANCODE_SPACE44 | |
| SDL_SCANCODE_MINUS45 | |
| SDL_SCANCODE_EQUALS46 | |
| SDL_SCANCODE_LEFTBRACKET47 | |
| SDL_SCANCODE_RIGHTBRACKET48 | |
| SDL_SCANCODE_BACKSLASH49 | < 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. |
| SDL_SCANCODE_NONUSHASH50 | < 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. |
| SDL_SCANCODE_SEMICOLON51 | |
| SDL_SCANCODE_APOSTROPHE52 | |
| SDL_SCANCODE_GRAVE53 | < 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. |
| SDL_SCANCODE_COMMA54 | |
| SDL_SCANCODE_PERIOD55 | |
| SDL_SCANCODE_SLASH56 | |
| SDL_SCANCODE_CAPSLOCK57 | |
| SDL_SCANCODE_F158 | |
| SDL_SCANCODE_F259 | |
| SDL_SCANCODE_F360 | |
| SDL_SCANCODE_F461 | |
| SDL_SCANCODE_F562 | |
| SDL_SCANCODE_F663 | |
| SDL_SCANCODE_F764 | |
| SDL_SCANCODE_F865 | |
| SDL_SCANCODE_F966 | |
| SDL_SCANCODE_F1067 | |
| SDL_SCANCODE_F1168 | |
| SDL_SCANCODE_F1269 | |
| SDL_SCANCODE_PRINTSCREEN70 | |
| SDL_SCANCODE_SCROLLLOCK71 | |
| SDL_SCANCODE_PAUSE72 | |
| SDL_SCANCODE_INSERT73 | < insert on PC, help on some Mac keyboards (but
does send code 73, not 117) |
| SDL_SCANCODE_HOME74 | |
| SDL_SCANCODE_PAGEUP75 | |
| SDL_SCANCODE_DELETE76 | |
| SDL_SCANCODE_END77 | |
| SDL_SCANCODE_PAGEDOWN78 | |
| SDL_SCANCODE_RIGHT79 | |
| SDL_SCANCODE_LEFT80 | |
| SDL_SCANCODE_DOWN81 | |
| SDL_SCANCODE_UP82 | |
| SDL_SCANCODE_NUMLOCKCLEAR83 | < num lock on PC, clear on Mac keyboards |
| SDL_SCANCODE_KP_DIVIDE84 | |
| SDL_SCANCODE_KP_MULTIPLY85 | |
| SDL_SCANCODE_KP_MINUS86 | |
| SDL_SCANCODE_KP_PLUS87 | |
| SDL_SCANCODE_KP_ENTER88 | |
| SDL_SCANCODE_KP_189 | |
| SDL_SCANCODE_KP_290 | |
| SDL_SCANCODE_KP_391 | |
| SDL_SCANCODE_KP_492 | |
| SDL_SCANCODE_KP_593 | |
| SDL_SCANCODE_KP_694 | |
| SDL_SCANCODE_KP_795 | |
| SDL_SCANCODE_KP_896 | |
| SDL_SCANCODE_KP_997 | |
| SDL_SCANCODE_KP_098 | |
| SDL_SCANCODE_KP_PERIOD99 | |
| SDL_SCANCODE_NONUSBACKSLASH100 | < 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. |
| SDL_SCANCODE_APPLICATION101 | < windows contextual menu, compose |
| SDL_SCANCODE_POWER102 | < The USB document says this is a status flag,
* not a physical key - but some Mac keyboards
* do have a power key. |
| SDL_SCANCODE_KP_EQUALS103 | |
| SDL_SCANCODE_F13104 | |
| SDL_SCANCODE_F14105 | |
| SDL_SCANCODE_F15106 | |
| SDL_SCANCODE_F16107 | |
| SDL_SCANCODE_F17108 | |
| SDL_SCANCODE_F18109 | |
| SDL_SCANCODE_F19110 | |
| SDL_SCANCODE_F20111 | |
| SDL_SCANCODE_F21112 | |
| SDL_SCANCODE_F22113 | |
| SDL_SCANCODE_F23114 | |
| SDL_SCANCODE_F24115 | |
| SDL_SCANCODE_EXECUTE116 | |
| SDL_SCANCODE_HELP117 | < AL Integrated Help Center |
| SDL_SCANCODE_SELECT119 | |
| SDL_SCANCODE_STOP120 | |
| SDL_SCANCODE_AGAIN121 | |
| SDL_SCANCODE_UNDO122 | |
| SDL_SCANCODE_CUT123 | |
| SDL_SCANCODE_COPY124 | |
| SDL_SCANCODE_PASTE125 | |
| SDL_SCANCODE_FIND126 | |
| SDL_SCANCODE_MUTE127 | |
| SDL_SCANCODE_VOLUMEUP128 | |
| SDL_SCANCODE_VOLUMEDOWN129 | |
| SDL_SCANCODE_KP_COMMA133 | |
| SDL_SCANCODE_KP_EQUALSAS400134 | |
| SDL_SCANCODE_INTERNATIONAL1135 | < used on Asian keyboards, see
footnotes in USB doc |
| SDL_SCANCODE_INTERNATIONAL2136 | |
| SDL_SCANCODE_INTERNATIONAL3137 | |
| SDL_SCANCODE_INTERNATIONAL4138 | |
| SDL_SCANCODE_INTERNATIONAL5139 | |
| SDL_SCANCODE_INTERNATIONAL6140 | |
| SDL_SCANCODE_INTERNATIONAL7141 | |
| SDL_SCANCODE_INTERNATIONAL8142 | |
| SDL_SCANCODE_INTERNATIONAL9143 | |
| SDL_SCANCODE_LANG1144 | |
| SDL_SCANCODE_LANG2145 | |
| SDL_SCANCODE_LANG3146 | |
| SDL_SCANCODE_LANG4147 | |
| SDL_SCANCODE_LANG5148 | |
| SDL_SCANCODE_LANG6149 | |
| SDL_SCANCODE_LANG7150 | |
| SDL_SCANCODE_LANG8151 | |
| SDL_SCANCODE_LANG9152 | |
| SDL_SCANCODE_ALTERASE153 | |
| SDL_SCANCODE_SYSREQ154 | |
| SDL_SCANCODE_CANCEL155 | |
| SDL_SCANCODE_CLEAR156 | |
| SDL_SCANCODE_PRIOR157 | |
| SDL_SCANCODE_RETURN2158 | |
| SDL_SCANCODE_SEPARATOR159 | |
| SDL_SCANCODE_OUT160 | |
| SDL_SCANCODE_OPER161 | |
| SDL_SCANCODE_CLEARAGAIN162 | |
| SDL_SCANCODE_CRSEL163 | |
| SDL_SCANCODE_EXSEL164 | |
| SDL_SCANCODE_KP_00176 | |
| SDL_SCANCODE_KP_000177 | |
| SDL_SCANCODE_THOUSANDSSEPARATOR178 | |
| SDL_SCANCODE_DECIMALSEPARATOR179 | |
| SDL_SCANCODE_CURRENCYUNIT180 | |
| SDL_SCANCODE_CURRENCYSUBUNIT181 | |
| SDL_SCANCODE_KP_LEFTPAREN182 | |
| SDL_SCANCODE_KP_RIGHTPAREN183 | |
| SDL_SCANCODE_KP_LEFTBRACE184 | |
| SDL_SCANCODE_KP_RIGHTBRACE185 | |
| SDL_SCANCODE_KP_TAB186 | |
| SDL_SCANCODE_KP_BACKSPACE187 | |
| SDL_SCANCODE_KP_A188 | |
| SDL_SCANCODE_KP_B189 | |
| SDL_SCANCODE_KP_C190 | |
| SDL_SCANCODE_KP_D191 | |
| SDL_SCANCODE_KP_E192 | |
| SDL_SCANCODE_KP_F193 | |
| SDL_SCANCODE_KP_XOR194 | |
| SDL_SCANCODE_KP_POWER195 | |
| SDL_SCANCODE_KP_PERCENT196 | |
| SDL_SCANCODE_KP_LESS197 | |
| SDL_SCANCODE_KP_GREATER198 | |
| SDL_SCANCODE_KP_AMPERSAND199 | |
| SDL_SCANCODE_KP_DBLAMPERSAND200 | |
| SDL_SCANCODE_KP_VERTICALBAR201 | |
| SDL_SCANCODE_KP_DBLVERTICALBAR202 | |
| SDL_SCANCODE_KP_COLON203 | |
| SDL_SCANCODE_KP_HASH204 | |
| SDL_SCANCODE_KP_SPACE205 | |
| SDL_SCANCODE_KP_AT206 | |
| SDL_SCANCODE_KP_EXCLAM207 | |
| SDL_SCANCODE_KP_MEMSTORE208 | |
| SDL_SCANCODE_KP_MEMRECALL209 | |
| SDL_SCANCODE_KP_MEMCLEAR210 | |
| SDL_SCANCODE_KP_MEMADD211 | |
| SDL_SCANCODE_KP_MEMSUBTRACT212 | |
| SDL_SCANCODE_KP_MEMMULTIPLY213 | |
| SDL_SCANCODE_KP_MEMDIVIDE214 | |
| SDL_SCANCODE_KP_PLUSMINUS215 | |
| SDL_SCANCODE_KP_CLEAR216 | |
| SDL_SCANCODE_KP_CLEARENTRY217 | |
| SDL_SCANCODE_KP_BINARY218 | |
| SDL_SCANCODE_KP_OCTAL219 | |
| SDL_SCANCODE_KP_DECIMAL220 | |
| SDL_SCANCODE_KP_HEXADECIMAL221 | |
| SDL_SCANCODE_LCTRL224 | |
| SDL_SCANCODE_LSHIFT225 | |
| SDL_SCANCODE_LALT226 | |
| SDL_SCANCODE_LGUI227 | < windows, command (apple), meta |
| SDL_SCANCODE_RCTRL228 | |
| SDL_SCANCODE_RSHIFT229 | |
| SDL_SCANCODE_RALT230 | |
| SDL_SCANCODE_RGUI231 | < windows, command (apple), meta |
| SDL_SCANCODE_MODE257 | < 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 |
| SDL_SCANCODE_SLEEP258 | |
| SDL_SCANCODE_WAKE259 | |
| SDL_SCANCODE_CHANNEL_INCREMENT260 | |
| SDL_SCANCODE_CHANNEL_DECREMENT261 | |
| SDL_SCANCODE_MEDIA_PLAY262 | |
| SDL_SCANCODE_MEDIA_PAUSE263 | |
| SDL_SCANCODE_MEDIA_RECORD264 | |
| SDL_SCANCODE_MEDIA_FAST_FORWARD265 | |
| SDL_SCANCODE_MEDIA_REWIND266 | |
| SDL_SCANCODE_MEDIA_NEXT_TRACK267 | |
| SDL_SCANCODE_MEDIA_PREVIOUS_TRACK268 | |
| SDL_SCANCODE_MEDIA_STOP269 | |
| SDL_SCANCODE_MEDIA_EJECT270 | |
| SDL_SCANCODE_MEDIA_PLAY_PAUSE271 | |
| SDL_SCANCODE_MEDIA_SELECT272 | |
| SDL_SCANCODE_AC_NEW273 | |
| SDL_SCANCODE_AC_OPEN274 | |
| SDL_SCANCODE_AC_CLOSE275 | |
| SDL_SCANCODE_AC_EXIT276 | |
| SDL_SCANCODE_AC_SAVE277 | |
| SDL_SCANCODE_AC_PRINT278 | |
| SDL_SCANCODE_AC_PROPERTIES279 | |
| SDL_SCANCODE_AC_SEARCH280 | |
| SDL_SCANCODE_AC_HOME281 | |
| SDL_SCANCODE_AC_BACK282 | |
| SDL_SCANCODE_AC_FORWARD283 | |
| SDL_SCANCODE_AC_STOP284 | |
| SDL_SCANCODE_AC_REFRESH285 | |
| SDL_SCANCODE_AC_BOOKMARKS286 | |
| SDL_SCANCODE_SOFTLEFT287 | < 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. |
| SDL_SCANCODE_SOFTRIGHT288 | < 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. |
| SDL_SCANCODE_CALL289 | < Used for accepting phone calls. |
| SDL_SCANCODE_ENDCALL290 | < Used for rejecting phone calls. |
| SDL_SCANCODE_RESERVED400 | < 400-500 reserved for dynamic keycodes |
| SDL_SCANCODE_COUNT512 | < not a key, just marks the number of scancodes for array bounds |
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.