---
name: "SDL_SetScancodeName"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_SetScancodeName"
---

# SDL\_SetScancodeName(3)

Set a human-readable name for a scancode.

## NAME

SDL\_SetScancodeName - Set a human-readable name for a scancode.

## HEADER FILE

Defined in SDL3/SDL\_keyboard.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**bool SDL\_SetScancodeName(SDL\_Scancode scancode, const char \*name);**

## FUNCTION PARAMETERS

- *scancode*

  the desired  **SDL\_Scancode** .

- *name*

  the name to use for the scancode, encoded as UTF-8. The string is not copied, so the pointer given to this function must stay valid while SDL is being used.

## RETURN VALUE

Returns true on success or false on failure; call

**SDL\_GetError** () for more information.

## THREAD SAFETY

This function is not thread safe.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_GetScancodeName**(3)](/SDL_GetScancodeName/3.md)
