Repository navigation
Commit 27df03f
Release 1.6.2: fix duplicate key events on Windows
On Windows, crossterm emits both KeyEventKind::Press and
KeyEventKind::Release for every keystroke. Our event loop forwarded
both, causing every action to fire twice (double scroll, double
cursor move, etc.).
Guard the Event::Key match arm with `key.kind == KeyEventKind::Press`
so only key-down events are forwarded. No effect on macOS/Linux
(they only emit Press). This is the canonical fix from the ratatui
FAQ: https://ratatui.rs/faq/
Fixes #1.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>1 parent 6dedd9a commit 27df03f
4 files changed
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
8 | 17 | | |
9 | 18 | | |
10 | 19 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
| |||
0 commit comments