mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Ignore key releases on platforms that support it (#220)
This commit is contained in:
parent
8a5049fb25
commit
013214899a
1 changed files with 8 additions and 1 deletions
|
@ -46,6 +46,7 @@ use modalkit::crossterm::{
|
||||||
EnableBracketedPaste,
|
EnableBracketedPaste,
|
||||||
EnableFocusChange,
|
EnableFocusChange,
|
||||||
Event,
|
Event,
|
||||||
|
KeyEventKind,
|
||||||
},
|
},
|
||||||
execute,
|
execute,
|
||||||
terminal::{EnterAlternateScreen, LeaveAlternateScreen, SetTitle},
|
terminal::{EnterAlternateScreen, LeaveAlternateScreen, SetTitle},
|
||||||
|
@ -341,7 +342,13 @@ impl Application {
|
||||||
}
|
}
|
||||||
|
|
||||||
match read()? {
|
match read()? {
|
||||||
Event::Key(ke) => return Ok(ke.into()),
|
Event::Key(ke) => {
|
||||||
|
if ke.kind == KeyEventKind::Release {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Ok(ke.into());
|
||||||
|
},
|
||||||
Event::Mouse(_) => {
|
Event::Mouse(_) => {
|
||||||
// Do nothing for now.
|
// Do nothing for now.
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue