The keycode in key events is the base, unmodified, keycode for the current keyboard layout

This commit is contained in:
Sam Lantinga 2024-06-30 19:58:48 -07:00
parent 5755bde3b8
commit d9dc4b320a
15 changed files with 125 additions and 160 deletions

View file

@ -1999,11 +1999,7 @@ extern "C" {
* 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, 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, or 'A'.
* - "none": Keycode options are cleared, this overrides other options.
* - "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 '&'
@ -2012,7 +2008,7 @@ extern "C" {
* layout. e.g. pressing the key associated with SDL_SCANCODE_A on a Russian
* keyboard would yield 'a' instead of 'ф'.
*
* The default value for this hint is equivalent to "modified,french_numbers"
* The default value for this hint is "french_numbers"
*
* Some platforms like Emscripten only provide modified keycodes and the
* options are not used.