Skip to content

Commit b1fa88d

Browse files
Push char one by one in windows_console
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
1 parent a2fb7ee commit b1fa88d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/_pyrepl/windows_console.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ def get_event(self, block: bool = True) -> Event | None:
468468
return None
469469
elif self.__vt_support:
470470
# If virtual terminal is enabled, scanning VT sequences
471-
key_bytes = raw_key.encode(self.event_queue.encoding)
472-
self.event_queue.push(key_bytes)
471+
for char in raw_key.encode(self.event_queue.encoding, "replace"):
472+
self.event_queue.push(char)
473473
continue
474474

475475
if key_event.dwControlKeyState & ALT_ACTIVE:

0 commit comments

Comments
 (0)