Wiki Page Content

Differences between revisions 3 and 4
Revision 3 as of 2011-02-07 20:48:59
Size: 1679
Editor: SheenaSmith
Comment: update contents - add links to lookup tables
Revision 4 as of 2011-02-07 20:58:14
Size: 1767
Editor: SheenaSmith
Comment: minor change
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
##Include will begin here at a later date.
Line 18: Line 19:
##Include will end here at a later date.
Line 29: Line 31:

DRAFT

SDL_Scancode and SDL_Keycode

Enumerations of the SDL physical (scancode) and virtual (keycode) key representations.

Values

SDL_Scancode Value

SDL_Keycode Value

Key Name

scancode

keycode

name (description if necessary)

scancode

keycode

name (description)

scancode

keycode

name (description)

SDL_SCANCODE_SPACE

SDLK_SPACE

Space (space bar)

green

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",
      SDL_GetScancodeName(event->key.keysym.scancode),
      SDL_GetKeyName(event->key.keysym.sym));

Remarks

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

None: SDL_ScancodeAndKeycode (last edited 2016-06-10 19:52:22 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit