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

@@ -167,6 +167,9 @@ static void print_modifiers(char **text, size_t *maxlen, SDL_Keymod mod)
if (mod & SDL_KMOD_MODE) {
print_string(text, maxlen, " MODE");
}
if (mod & SDL_KMOD_LEVEL5) {
print_string(text, maxlen, " LEVEL5");
}
if (mod & SDL_KMOD_SCROLL) {
print_string(text, maxlen, " SCROLL");
}