Ignore key releases on platforms that support it (#220)

This commit is contained in:
Ulyssa
2024-03-20 22:13:47 -07:00
committed by GitHub
parent 8a5049fb25
commit 013214899a

View File

@@ -46,6 +46,7 @@ use modalkit::crossterm::{
EnableBracketedPaste,
EnableFocusChange,
Event,
KeyEventKind,
},
execute,
terminal::{EnterAlternateScreen, LeaveAlternateScreen, SetTitle},
@@ -341,7 +342,13 @@ impl Application {
}
match read()? {
Event::Key(ke) => return Ok(ke.into()),
Event::Key(ke) => {
if ke.kind == KeyEventKind::Release {
continue;
}
return Ok(ke.into());
},
Event::Mouse(_) => {
// Do nothing for now.
},