SDL Wiki

SDL_HINT_MAC_OPTION_AS_ALT

A variable controlling whether the Option key on macOS should be remapped to act as the Alt key.

Header File

Defined in <SDL3/SDL_hints.h>

Syntax

#define SDL_HINT_MAC_OPTION_AS_ALT "SDL_MAC_OPTION_AS_ALT"

Remarks

The variable can be set to the following values:

This will prevent the triggering of key compositions that rely on the Option key, but will still send the Alt modifier for keyboard events. In the case that both Alt and Option are pressed, the Option key will be ignored. This is particularly useful for applications like terminal emulators and graphical user interfaces (GUIs) that rely on Alt key functionality for shortcuts or navigation. This does not apply to SDL_GetKeyFromScancode and only has an effect if IME is enabled.

This hint can be set anytime.

Version

This hint is available since SDL 3.2.0.


CategoryAPI, CategoryAPIMacro, CategoryHints


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.