Skip to content

#15 Fix double keystroke bug in Windows#82

Merged
agavra merged 1 commit intoagavra:mainfrom
imbatcat:imbatcat-fix-double-keystroke-issue-on-windows
Jan 14, 2026
Merged

#15 Fix double keystroke bug in Windows#82
agavra merged 1 commit intoagavra:mainfrom
imbatcat:imbatcat-fix-double-keystroke-issue-on-windows

Conversation

@imbatcat
Copy link
Copy Markdown
Contributor

@imbatcat imbatcat commented Jan 14, 2026

Added a check for KeyEventKind::Press to ensure that only key press events are processed, since Windows also sends KeyEventKind::Release, which will results in another keystroke.

fixes #15

Added a check for KeyEventKind::Press to ensure that only key press events are processed, since Windows also sends KeyEventKind::Release, which will results in another keystroke.
Copilot AI review requested due to automatic review settings January 14, 2026 01:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a Windows-specific bug where keystrokes were being registered twice due to both key press and key release events being processed.

Changes:

  • Added KeyEventKind import from crossterm's event module
  • Added a filter to process only KeyEventKind::Press events in the main event loop

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Owner

@agavra agavra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @imbatcat 🙏

@agavra agavra merged commit 57cbdd6 into agavra:main Jan 14, 2026
9 of 10 checks passed
@imbatcat imbatcat deleted the imbatcat-fix-double-keystroke-issue-on-windows branch January 14, 2026 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

verify this works on windows / linux + not iTerm2

3 participants