SDL_GetKeyFromName(3)

SDL_GetKeyFromName3

Get a key code from a human-readable name.

Usage

#include "SDL3/SDL.h"

SDL_Keycode SDL_GetKeyFromName(const char *name);

Header file

Defined in SDL3/SDL_keyboard.h

Function parameters

name

the human-readable key name.

Return value

( SDL_Keycode ) Returns key code, or

SDLK_UNKNOWN if the name wasn't recognized; call

SDL_GetError () for more information.

Thread safety

This function is not thread safe.

Availability

This function is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.