mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-28 04:13:44 +02:00
Don't map the top keyboard row to numbers when using the one-handed DVORAK layouts (thanks @tormol!)
Fixes https://github.com/libsdl-org/SDL/pull/5127
(cherry picked from commit a2f4783e75)
This commit is contained in:
@@ -130,10 +130,8 @@ void WIN_UpdateKeymap(SDL_bool send_event)
|
||||
}
|
||||
|
||||
/* If this key is one of the non-mappable keys, ignore it */
|
||||
/* Not mapping numbers fixes the French layout, giving numeric keycodes for the number keys, which is the expected behavior */
|
||||
if ((keymap[scancode] & SDLK_SCANCODE_MASK) ||
|
||||
/* scancode == SDL_SCANCODE_GRAVE || */ /* Uncomment this line to re-enable the behavior of not mapping the "`"(grave) key to the users actual keyboard layout */
|
||||
(scancode >= SDL_SCANCODE_1 && scancode <= SDL_SCANCODE_0)) {
|
||||
/* Uncomment the second part re-enable the behavior of not mapping the "`"(grave) key to the users actual keyboard layout */
|
||||
if ((keymap[scancode] & SDLK_SCANCODE_MASK) /*|| scancode == SDL_SCANCODE_GRAVE*/) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user