Skip to main content

SDL_Keycode

Type Alias SDL_Keycode 

Source
pub type SDL_Keycode = Uint32;
Expand description

The SDL virtual key representation.

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 an SDLK_* constant for those keys that do not generate characters.

A special exception is the number keys at the top of the keyboard which map by default to SDLK_0…SDLK_9 on AZERTY layouts.

Keys with the SDLK_EXTENDED_MASK bit set do not map to a scancode or Unicode code point.

Many common keycodes are listed below, but this list is not exhaustive.

Available Since: This datatype is available since SDL 3.2.0.

See Also: SDL_HINT_KEYCODE_OPTIONS