Skip to content

Key presses happen twice on Windows #514

Open
@sunrosa

Description

@sunrosa

What crate(s) in this repo are involved in the problem?

tokio-console

What is the issue?

Whenever pressing a key in the tokio-console ui, it presses twice. Pressing j goes down two elements. Pressing space pauses then unpauses. Both keys press instantly. It doesn't matter when I release the key.

How can the bug be reproduced?

Run tokio-console on Windows 10 (or Windows 11, apparently) on Powershell or Git Bash. The bug happened on the Tabby terminal emulator and on the VSCode terminal emulator.

Logs, error output, etc

No response

Versions

console-subscriber v0.2.0
console-api v0.6.0

tokio-console 0.1.10

Possible solution

I remember seeing somewhere that Windows key events fire on both key pressed and key released, while Unix key events only fire on key pressed. It may be the other way around.

Additional context

No response

Would you like to work on fixing this bug?

maybe

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-bugSeverity: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions