Skip to content

Windows: Unreliable keyboard input - random keystrokes dropped during fast typing #5

@alejandroqh

Description

@alejandroqh

Description

When typing rapidly in terminal windows on Windows, random keystrokes are dropped/missed. The issue does not occur on macOS
or Linux.

Steps to Reproduce

  1. Open a terminal window in term39 on Windows
  2. Type a sequence rapidly at constant tempo, e.g., 12345678901234567890
  3. Observe that random characters are missing

Expected Behavior

All keystrokes should be captured: 12345678901234567890

Actual Behavior

Random characters are dropped:

  • 12467890123567890 (missing: 3, 5, 4)
  • 124567901234567890 (missing: 3, 8)

The issue affects all characters, not just numbers.

Additional Observations

  • For a brief moment, the cursor appears to jump outside the terminal window and then returns, as if something momentarily
    takes focus
  • This behavior was not present in v0.13.0 - keyboard input was reliable
  • Issue appeared after v0.13.0, possibly related to changes in event loop batch processing or key event filtering

Environment

  • OS: Windows 10/11
  • term39 version: v0.16.7
  • Working version: v0.11.0 (not confirmed)

Potential Causes Investigated

  1. Event loop batch processing (introduced post-v0.11.0)
  2. KeyEventKind filtering change (!= Press== Release)
  3. Poll timeout values
  4. PTY flush timing

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions