mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-14 13:56:00 +00:00
Restore default behavior for keypad keycodes
Added a hint to translate numpad keycodes into their non-numpad versions based on the NumLock state
This commit is contained in:
@@ -502,7 +502,7 @@ static EM_BOOL Emscripten_HandleKey(int eventType, const EmscriptenKeyboardEvent
|
||||
}
|
||||
}
|
||||
|
||||
if (SDL_utf8strlen(keyEvent->key) == 1) {
|
||||
if (keyEvent->location == 0 && SDL_utf8strlen(keyEvent->key) == 1) {
|
||||
const char *key = keyEvent->key;
|
||||
keycode = SDL_StepUTF8(&key, NULL);
|
||||
if (keycode == SDL_INVALID_UNICODE_CODEPOINT) {
|
||||
|
Reference in New Issue
Block a user