mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-12 01:15:39 +00:00
emscripten: don't consume key down/up events if the user disabled them
This commit is contained in:
parent
3899cb1696
commit
b80f6ec05c
1 changed files with 1 additions and 1 deletions
|
|
@ -794,7 +794,7 @@ static EM_BOOL Emscripten_HandleKey(int eventType, const EmscriptenKeyboardEvent
|
|||
{
|
||||
const SDL_Keycode keycode = Emscripten_MapKeyCode(keyEvent);
|
||||
SDL_Scancode scancode = Emscripten_MapScanCode(keyEvent->code);
|
||||
SDL_bool prevent_default = SDL_TRUE;
|
||||
SDL_bool prevent_default = SDL_GetEventState(eventType == EMSCRIPTEN_EVENT_KEYDOWN ? SDL_KEYDOWN : SDL_KEYUP) == SDL_ENABLE;
|
||||
SDL_bool is_nav_key = SDL_FALSE;
|
||||
|
||||
if (scancode == SDL_SCANCODE_UNKNOWN) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue