Skip to content

Duplicate Key Events on Windows #1

Closed

Activity

  1. leboiko commented on Apr 17, 2026

    @leboiko
    Owner

    Fixed in v1.6.2, just published to crates.io — cargo install markdown-tui-explorer to update.

    Root cause: The event loop was forwarding all Event::Key(key) events to the handler without checking key.kind. On Windows, crossterm emits both KeyEventKind::Press (key down) and KeyEventKind::Release (key up) per keystroke, so every action fired twice. macOS and Linux only emit Press, which is why this was invisible during development.

    Fix: Guard the key event with key.kind == KeyEventKind::Press so only key-down events are forwarded — the canonical fix from the ratatui FAQ you linked. Thanks for pointing us to the right resource.

    Relevant commit: 27df03f

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions