diff --git a/input/drivers/rwebinput_input.c b/input/drivers/rwebinput_input.c index e8272f8317..f4f8e29fc8 100644 --- a/input/drivers/rwebinput_input.c +++ b/input/drivers/rwebinput_input.c @@ -636,10 +636,12 @@ static void rwebinput_process_keyboard_events(rwebinput_input_t *rwebinput, else if (translated_keycode == RETROK_TAB) character = '\t'; - input_keyboard_event(keydown, translated_keycode, character, mod, - RETRO_DEVICE_KEYBOARD); - - if (translated_keycode < RETROK_LAST) + if (translated_keycode != RETROK_UNKNOWN) { + input_keyboard_event(keydown, translated_keycode, character, mod, + RETRO_DEVICE_KEYBOARD); + } + + if (translated_keycode < RETROK_LAST && translated_keycode != RETROK_UNKNOWN) { rwebinput->keys[translated_keycode] = keydown; }