SDL_GetKeyName - Man Page

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

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

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

Function Parameters

key

the desired SDL_Keycode
to query.

Return Value

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

Thread Safety

This function is not thread safe.

Availability

This function is available since SDL 3.2.0.

See Also

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

Referenced By

SDL_GetKeyFromName(3), SDL_GetKeyFromScancode(3).

SDL 3.2.2 Simple Directmedia Layer SDL3 FUNCTIONS