diff --git a/src/menus/transient/virtual-keyboard.c b/src/menus/transient/virtual-keyboard.c index d09480014..e6449904e 100644 --- a/src/menus/transient/virtual-keyboard.c +++ b/src/menus/transient/virtual-keyboard.c @@ -237,7 +237,7 @@ void M_MenuTypingInput(INT32 key) if (!menutyping.keyboardtyping) // controller inputs { // we pressed a keyboard input that's not any of our buttons - if (M_IsTypingKey(key) && menucmd[pid].dpad_lr == 0 && menucmd[pid].dpad_ud == 0 + if (key >= 0 && M_IsTypingKey(key) && menucmd[pid].dpad_lr == 0 && menucmd[pid].dpad_ud == 0 && !(menucmd[pid].buttons & MBT_A) && !(menucmd[pid].buttons & MBT_B) && !(menucmd[pid].buttons & MBT_C) @@ -252,7 +252,7 @@ void M_MenuTypingInput(INT32 key) else // Keyboard inputs. { // On the flipside, if we're pressing any keyboard input, switch to controller inputs. - if (!M_IsTypingKey(key) && ( + if (key >= 0 && !M_IsTypingKey(key) && ( M_MenuButtonPressed(pid, MBT_A) || M_MenuButtonPressed(pid, MBT_B) || M_MenuButtonPressed(pid, MBT_C)