emscripten: Fix alt key being a nav key

This commit is contained in:
Stephan Vedder 2020-11-24 10:56:50 +01:00 committed by Ryan C. Gordon
parent 20be1d634b
commit fa367cdd5c
1 changed files with 1 additions and 2 deletions

View File

@ -578,8 +578,7 @@ Emscripten_HandleKey(int eventType, const EmscriptenKeyboardEvent *keyEvent, voi
keyEvent->keyCode == 39 /* right */ ||
keyEvent->keyCode == 40 /* down */ ||
(keyEvent->keyCode >= 112 && keyEvent->keyCode <= 135) /* F keys*/ ||
keyEvent->ctrlKey ||
keyEvent->altKey;
keyEvent->ctrlKey;
if (eventType == EMSCRIPTEN_EVENT_KEYDOWN && SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE && !is_nav_key)
prevent_default = SDL_FALSE;