SDL_GetKeyName(3)

SDL_GetKeyName3

Get a human-readable name for a key.

Usage

#include "SDL3/SDL.h"

const char * SDL_GetKeyName(SDL_Keycode key);

Header file

Defined in SDL3/SDL_keyboard.h

Overview

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.

Releases

12 releases since Debian 3.0 (Woody); the text changed 2 times.

  1. 3.0–5.0
  2. 6.0–12
  3. 13

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.