From 81e7573a64b0544da7172966b88e797033b1eae6 Mon Sep 17 00:00:00 2001 From: YO4 Date: Sat, 3 Sep 2022 01:03:10 +0900 Subject: win32.c additional fix: is_readable_console classic console(conhost.exe) reports an input with ALT+NUMPAD as VK_MENU, KeyUp, and uChar!=0. additional fix for #5634 --- win32/win32.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'win32') diff --git a/win32/win32.c b/win32/win32.c index 6f1ee51206..24990a00d3 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3105,6 +3105,11 @@ is_readable_console(SOCKET sock) /* call this for console only */ ir.Event.KeyEvent.uChar.UnicodeChar) { ret = 1; } + else if (ir.EventType == KEY_EVENT && !ir.Event.KeyEvent.bKeyDown && + ir.Event.KeyEvent.wVirtualKeyCode == 18 /* VK_MENU */ && + ir.Event.KeyEvent.uChar.UnicodeChar) { + ret = 1; + } else { ReadConsoleInputW((HANDLE)sock, &ir, 1, &n); } -- cgit v1.2.3