#pragma section-numbers off #pragma camelcase off || DRAFT|| = SDL_Keycode = The SDL virtual key representation. <> == Values == <> == Code Examples == {{{#!highlight cpp //checks if a key is being remapped and prints what the remapping is if(event->key.keysym.scancode != SDL_GetScancodeFromKey(event->key.keysym.sym)) printf("Physical %s key acting as %s key", SDL_GetScancodeName(event->key.keysym.scancode), SDL_GetKeyName(event->key.keysym.sym)); }}} == Remarks == Values of this type (also known as keycodes or keysyms) are mapped to the current layout of the keyboard and correlate to an [[SDL_Scancode]]. The scancode identifies the location of a key press and the corresponding [[SDL_Keycode]] gives that key press meaning in the context of the current keyboard layout. Values of this type are used to represent keyboard keys using the current layout of the keyboard. These values include Unicode values representing the unmodified character that would be generated by pressing the key, or other constants for those keys that do not generate characters. /* Does SDL use a default layout for SDL_Keycode? Is it platform-specific? Are other layouts available or do they have to be created by the user/programmer? Are they automatically detected or manually set?)>> <> */ To look up a scancode or keycode by decimal or hexadecimal value you can use the following tables: .[[SDLScancodeLookup|SDL Scancode Lookup Table]] .[[SDLKeycodeLookup|SDL Keycode Lookup Table]] == Related Enumerations == .[[SDL_Scancode]] == Related Functions == .[[SDL_GetKeyFromScancode]] .[[SDL_GetKeyName]] .[[SDL_GetScancodeFromKey]] ---- [[CategoryEnum]], [[CategoryKeyboard]]