radlinskii / donkeytype

typing test TUI app
MIT License
15 stars 16 forks source link

Windows Double KeyPress Issue #39

Closed 0Ky closed 1 year ago

0Ky commented 1 year ago

On Windows, a single keypress is mistakenly detected twice: once on KeyDown and again on KeyUp. This issue stems from crossterm, you will need to check the KeyEventKind:

if let Event::Key(key) = event {
    if key.kind == KeyEventKind::Press {
        ...
    }
}
radlinskii commented 1 year ago

Let's keep this as separate issue, but also added it as part of #37