summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2023-03-15 01:50:52 -0400
committerGitHub <noreply@github.com>2023-03-15 01:50:52 -0400
commitac0bf7ca96c632e029f9459312fd56e4ae3099b3 (patch)
tree3f4a2443d86d115553e3b98ae5fb799d342cbe79
parent8fe3f1f23c26ca8cb16afd9474728b9e80e2bd64 (diff)
deps: switch back to crossterm 0.26.1 with fix to double keypress (#1068)
-rw-r--r--src/lib.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 4fdf3fb6..1c23f6d4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -40,7 +40,7 @@ use constants::*;
use crossterm::{
event::{
poll, read, DisableBracketedPaste, DisableMouseCapture, Event, KeyCode, KeyEvent,
- KeyModifiers, MouseEvent, MouseEventKind,
+ KeyEventKind, KeyModifiers, MouseEvent, MouseEventKind,
},
execute,
style::Print,
@@ -444,7 +444,9 @@ pub fn create_input_thread(
break;
}
}
- Event::Key(key) => {
+ Event::Key(key) if key.kind == KeyEventKind::Press => {
+ // For now, we only care about keydown events. This may change in the future.
+
if sender.send(BottomEvent::KeyInput(key)).is_err() {
break;
}