24 sym.scancode = SDL_SCANCODE_UNKNOWN;
35 [[nodiscard]]
static std::optional<SDLKey>
fromString(std::string_view name);
39 [[nodiscard]] std::string
toString()
const;
40 [[nodiscard]]
static std::string
toString(SDL_Keycode code);
Like std::string_view, but with the extra guarantee that it refers to a zero-terminated string.
This file implemented 3 utility functions:
static SDL_Keycode keycodeFromString(zstring_view name)
static std::optional< SDLKey > fromString(std::string_view name)
static SDLKey createDown(SDL_Keycode code)
std::string toString() const
static SDLKey create(SDL_Keycode code, bool down, uint16_t mod=0)