keyboard: Add some SDL keycodes for common Xkb keys

Add SDL keycodes for keys found commonly found in the default Xkb layout, such as left tab and compose, and keys frequently used for custom modifiers such as Meta, Hyper, and Level5 Shift.

As these keys aren't Unicode code points and don't have associated scancodes (at least on modern keyboards), they are placed in the new extended key code space, with bit 30 set as a flag.
This commit is contained in:
Frank Praznik
2025-01-05 13:30:44 -05:00
parent e5966bbdb1
commit 6b776a9989
12 changed files with 261 additions and 124 deletions

View File

@@ -1031,6 +1031,9 @@ The following structures have been removed:
SDL_Keycode is now Uint32 and the SDLK_* constants are now defines instead of an enum, to more clearly reflect that they are a subset of the possible values of an SDL_Keycode.
In addition to the `SDLK_SCANCODE_MASK` bit found on key codes that directly map to scancodes, there is now the
`SDLK_EXTENDED_MASK` bit used to denote key codes that don't have a corresponding scancode, and aren't a unicode value.
The following symbols have been removed:
* KMOD_RESERVED - No replacement. A bit named "RESERVED" probably shouldn't be used in an app, but if you need it, this was equivalent to KMOD_SCROLL (0x8000) in SDL2.