|
constexpr | Keycode (SDL_Keycode keycode={}) |
| Wraps Keycode.
|
|
constexpr auto | operator<=> (const Keycode &other) const =default |
| Default comparison operator.
|
|
constexpr auto | operator<=> (SDL_Keycode keycode) const |
| Compares with the underlying type.
|
|
| Keycode (Scancode scancode, Keymod modstate=0, bool key_event=false) |
| Get the key code corresponding to the given scancode according to the current keyboard layout.
|
|
| Keycode (StringParam name) |
| Get a key code from a human-readable name.
|
|
constexpr | operator SDL_Keycode () const |
| Unwraps to the underlying Keycode.
|
|
constexpr | operator bool () const |
| Check if valid.
|
|
constexpr bool | IsExtended () const |
| Has Extended flag.
|
|
constexpr bool | IsScancode () const |
| Has Scancode flag.
|
|
Scancode | GetScancode (Keymod *modstate) const |
| Get the scancode corresponding to the given key code according to the current keyboard layout.
|
|
const char * | GetName () const |
| Get a human-readable name for a key.
|
|
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 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.
- Since
- This datatype is available since SDL 3.2.0.