-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75bdd78
commit 97bbe21
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!) | ||
# SDL_HINT_KEYCODE_OPTIONS | ||
|
||
A variable that controls keycode representation in keyboard events. | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3/SDL_hints.h>](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_hints.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
#define SDL_HINT_KEYCODE_OPTIONS "SDL_KEYCODE_OPTIONS" | ||
``` | ||
## Remarks | ||
This variable is a comma separated set of options for translating keycodes | ||
in events: | ||
- "unmodified": The keycode is the symbol generated by pressing the key | ||
without any modifiers applied. e.g. Shift+A would yield the keycode | ||
[SDLK_a](SDLK_a), or 'a'. | ||
- "modified": The keycode is the symbol generated by pressing the key with | ||
modifiers applied. e.g. Shift+A would yield the keycode [SDLK_A](SDLK_A), | ||
or 'A'. | ||
- "french_numbers": The number row on French keyboards is inverted, so | ||
pressing the 1 key would yield the keycode [SDLK_1](SDLK_1), or '1', | ||
instead of [SDLK_AMPERSAND](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](SDL_SCANCODE_A) on a Russian keyboard would yield 'a' | ||
instead of 'ф'. | ||
The default value for this hint is equivalent to "modified,french_numbers" | ||
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](SDL_GetKeyFromScancode)() or | ||
[SDL_GetScancodeFromKey](SDL_GetScancodeFromKey)(), they just apply to the | ||
keycode included in key events. | ||
This hint can be set anytime. | ||
## Version | ||
This hint is available since SDL 3.0.0. | ||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro), [CategoryHints](CategoryHints) | ||