Feature add hint to remap option as alt key (#12021)
This commit is contained in:
parent
53a5350292
commit
7133969e3a
3 changed files with 105 additions and 0 deletions
|
@ -2348,6 +2348,31 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH "SDL_MAC_OPENGL_ASYNC_DISPATCH"
|
||||
|
||||
/**
|
||||
* A variable controlling whether the Option (⌥) key on macOS should be remapped
|
||||
* to act as the Alt key.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "none": The Option key is not remapped to Alt. (default)
|
||||
* - "only_left": Only the left Option key is remapped to Alt.
|
||||
* - "only_right": Only the right Option key is remapped to Alt.
|
||||
* - "both": Both Option keys are remapped to Alt.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* \since This hint is available since 3.2.0
|
||||
*/
|
||||
#define SDL_HINT_MAC_OPTION_AS_ALT "SDL_MAC_OPTION_AS_ALT"
|
||||
|
||||
/**
|
||||
* A variable controlling whether SDL_EVENT_MOUSE_WHEEL event values will have
|
||||
* momentum on macOS.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue