DOKK / manpages / debian 13 / libsdl3-doc / SDL_GetKeyName.3.en
SDL_GetKeyName(3) SDL3 FUNCTIONS SDL_GetKeyName(3)

SDL_GetKeyName - Get a human-readable name for a key.

Defined in SDL3/SDL_keyboard.h

#include "SDL3/SDL.h"
const char * SDL_GetKeyName(SDL_Keycode key);

If the key doesn't have a name, this function returns an empty string ("").

Letters will be presented in their uppercase form, if applicable.

the desired SDL_Keycode
to query.

Returns a UTF-8 encoded string of the key name.

This function is not thread safe.

This function is available since SDL 3.2.0.

(3), SDL_GetKeyFromName(3), (3), SDL_GetKeyFromScancode(3), (3), SDL_GetScancodeFromKey(3)

SDL 3.2.10 Simple Directmedia Layer