================
@@ -993,6 +996,20 @@ class IOHandlerProcessSTDIOWindows : public IOHandler {
case WAIT_FAILED:
goto exit_loop;
case WAIT_OBJECT_0: {
+ if (isConsole) {
+ INPUT_RECORD inputRecord;
+ DWORD numRead = 0;
+ if (!PeekConsoleInput(hStdin, &inputRecord, 1, &numRead) ||
+ numRead == 0)
+ goto exit_loop;
+ // We only care about text input. Ignore all non text input events
and
+ // let other IOHandlers handle them.
+ if (inputRecord.EventType != KEY_EVENT ||
+ !inputRecord.Event.KeyEvent.bKeyDown ||
+ inputRecord.Event.KeyEvent.uChar.AsciiChar == 0)
+ break;
----------------
Nerixyz wrote:
When we discard these events, we never take them out of the queue, so
`WaitForMultipleObjects` will still return immediately. We probably need to
[`ReadConsoleInput`](https://learn.microsoft.com/en-us/windows/console/readconsoleinput)
here.
https://github.com/llvm/llvm-project/pull/175812
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits