mirror of https://github.com/encounter/SDL.git
emscripten: Fix alt key being a nav key
This commit is contained in:
parent
20be1d634b
commit
fa367cdd5c
|
@ -578,8 +578,7 @@ Emscripten_HandleKey(int eventType, const EmscriptenKeyboardEvent *keyEvent, voi
|
||||||
keyEvent->keyCode == 39 /* right */ ||
|
keyEvent->keyCode == 39 /* right */ ||
|
||||||
keyEvent->keyCode == 40 /* down */ ||
|
keyEvent->keyCode == 40 /* down */ ||
|
||||||
(keyEvent->keyCode >= 112 && keyEvent->keyCode <= 135) /* F keys*/ ||
|
(keyEvent->keyCode >= 112 && keyEvent->keyCode <= 135) /* F keys*/ ||
|
||||||
keyEvent->ctrlKey ||
|
keyEvent->ctrlKey;
|
||||||
keyEvent->altKey;
|
|
||||||
|
|
||||||
if (eventType == EMSCRIPTEN_EVENT_KEYDOWN && SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE && !is_nav_key)
|
if (eventType == EMSCRIPTEN_EVENT_KEYDOWN && SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE && !is_nav_key)
|
||||||
prevent_default = SDL_FALSE;
|
prevent_default = SDL_FALSE;
|
||||||
|
|
Loading…
Reference in New Issue