SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SDL::Scancode Class Reference

The SDL keyboard scancode representation. More...

Public Member Functions

constexpr Scancode (ScancodeRaw scancode={})
 Wraps Scancode. More...
 
 Scancode (StringParam name)
 Get a scancode from a human-readable name. More...
 
constexpr bool operator== (ScancodeRaw scancode) const
 Default comparison operator.
 
constexpr auto operator<=> (ScancodeRaw scancode) const
 Default comparison operator.
 
constexpr operator ScancodeRaw () const
 Unwraps to the underlying Scancode. More...
 
void SetName (StringParam name)
 Set a human-readable name for a scancode. More...
 
const char * GetName () const
 Get a human-readable name for a scancode. More...
 

Detailed Description

An SDL scancode is the physical representation of a key on the keyboard, independent of language and keyboard mapping.

Values of this type are used to represent keyboard keys, among other places in the scancode field of the KeyboardEvent structure.

The values in this enumeration are based on the USB usage page standard: https://usb.org/sites/default/files/hut1_5.pdf

Since
This enum is available since SDL 3.2.0.

Constructor & Destructor Documentation

◆ Scancode()

constexpr SDL::Scancode::Scancode ( ScancodeRaw  scancode = {})
inlineconstexpr
Parameters
scancodethe value to be wrapped

Member Function Documentation

◆ operator ScancodeRaw()

constexpr SDL::Scancode::operator ScancodeRaw ( ) const
inlineconstexpr
Returns
the underlying ScancodeRaw.

The documentation for this class was generated from the following files: