logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Availability

       This function is available since SDL 3.2.0.

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.

Header File

       Defined in SDL3/SDL_keyboard.h

Name

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

Return Value

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

See Also

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

Simple Directmedia Layer                           SDL 3.2.10                                  SDL_GetKeyName(3)

Synopsis

#include"SDL3/SDL.h"constchar*SDL_GetKeyName(SDL_Keycodekey);

Thread Safety

       This function is not thread safe.

See Also