SDL_GetKeyName(3)

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

HEADER FILE
Defined in SDL3/SDL_keyboard.h

SYNOPSIS
#include "SDL3/SDL.h"

const char* SDL_GetKeyName(SDL_Keycode key);

DESCRIPTION
See SDL_Scancode
 and SDL_Keycode
 for details.

FUNCTION PARAMETERS

key the desired SDL_Keycode
     to query

RETURN VALUE
Returns a pointer to a UTF-8 string that stays valid at least until the next call to this function. If you need it around any longer, you must copy it. If the key doesn't have a name, this function returns an empty string ("").

AVAILABILITY
This function is available since SDL 3.0.0.

SEE ALSO
SDL_GetKeyFromName(3), SDL_GetKeyFromScancode(3), SDL_GetScancodeFromKey(3)