This is new wiki software and old wiki content. It's a work in progress!
Here's the explanation.
Be gentle, report bugs, leave feedback on pages, or just edit them yourself! Thanks!

SDL Wiki


THIS PAGE IS A WORK IN PROGRESS ... Please make edits to this page to improve it!


The SDL virtual key representation.


<<Include(SDL_ScancodeAndKeycode, , , from="##Start include here.", to="##End include here.")>>

Code Examples

  //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",


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.

To look up a scancode or keycode by decimal or hexadecimal value you can use the following tables:

SDL Scancode Lookup Table
SDL Keycode Lookup Table

CategoryEnum, CategoryKeyboard, CategoryDraft

[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.