We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c70c45 commit 4d7ae36Copy full SHA for 4d7ae36
1 file changed
Lib/_pyrepl/windows_console.py
@@ -521,7 +521,17 @@ def forgetinput(self) -> None:
521
def getpending(self) -> Event:
522
"""Return the characters that have been typed but not yet
523
processed."""
524
- return Event("key", "", b"")
+ e = Event("key", "", b"")
525
+
526
+ while not self.event_queue.empty():
527
+ e2 = self.event_queue.get()
528
+ e.data += e2.data
529
530
+ rec = self._read_input(False)
531
+ if rec and rec.EventType == KEY_EVENT:
532
+ key_event = rec.Event.KeyEvent
533
+ e.data += key_event.uChar.UnicodeChar
534
+ return e
535
536
def wait(self, timeout: float | None) -> bool:
537
"""Wait for an event."""
0 commit comments