---
name: "SDL_HINT_KEYCODE_OPTIONS"
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_HINT_KEYCODE_OPTIONS"
---

# SDL\_HINT\_KEYCODE\_OPTIONS(3)

A variable that controls keycode representation in keyboard events.

## NAME

SDL\_HINT\_KEYCODE\_OPTIONS - A variable that controls keycode representation in keyboard events.

## HEADER FILE

Defined in SDL3/SDL\_hints.h

## SYNOPSIS

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

**#define SDL\_HINT\_KEYCODE\_OPTIONS** *SDL\_KEYCODE\_OPTIONS"*

## DESCRIPTION

This variable is a comma separated set of options for translating keycodes in events:

• "none": Keycode options are cleared, this overrides other options.

• "hide\_numpad": The numpad keysyms will be translated into their\
   non-numpad versions based on the current NumLock state. For example,

**SDLK\_KP\_4**\
  would become  **SDLK\_4**\
  if

**SDL\_KMOD\_NUM**\
  is set in the event modifiers, and

**SDLK\_LEFT**\
  if it is unset.

• "french\_numbers": The number row on French keyboards is inverted, so\
   pressing the 1 key would yield the keycode  **SDLK\_1** , or '1',\
   instead of  **SDLK\_AMPERSAND** , or '&'

• "latin\_letters": For keyboards using non-Latin letters, such as Russian\
   or Thai, the letter keys generate keycodes as though it had an en\_US\
   layout. e.g. pressing the key associated with

**SDL\_SCANCODE\_A**\
  on a Russian keyboard would yield 'a'\
   instead of a Cyrillic letter.

The default value for this hint is "french\_numbers,latin\_letters"

Some platforms like Emscripten only provide modified keycodes and the options are not used.

These options do not affect the return value of

**SDL\_GetKeyFromScancode** () or

**SDL\_GetScancodeFromKey** (), they just apply to the keycode included in key events.

This hint can be set anytime.

## AVAILABILITY

This hint is available since SDL 3.2.0.
