Skip to content

Sometimes keystrokes are swallowed in the new REPL on Windows #139262

Closed

Description

@chris-eibl

Bug report

Bug description:

Especially when using the meta (ALT) key.

For instance, Alt + b for

(r"\M-b", "backward-word"),

the first hit is swallowed in a Windwos Terminal.

It happens, when there is nothing to be read from the console, i.e.

def wait(self, timeout: float | None) -> bool:

returns False but there is data in self.event_queue. The fix is easy and brings us in sync with
def wait(self, timeout: float | None = None) -> bool:
"""
Wait for events on the console.
"""
return (
not self.event_queue.empty()
or bool(self.pollob.poll(timeout))
)
.

CPython versions tested on:

3.14, CPython main branch

Operating systems tested on:

Windows

Linked PRs

Activity

  1. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Sep 23, 2025
  2. added a commit that references this issue on Jan 2, 2026
  3. added 2 commits that reference this issue on Jan 2, 2026
  4. added 2 commits that reference this issue on Jan 2, 2026
  5. ambv commented on Jan 2, 2026

    @ambv
    Contributor

    Fixed! Thanks for your contribution.

  6. added a commit that references this issue on Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsstdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions