mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-06 03:25:23 +00:00
fix(windows): ignore KeyEventKind::Release
events
This commit is contained in:
parent
0c13626d4c
commit
ac52c71a1c
@ -11,7 +11,7 @@ use crossterm::event::{
|
||||
BackTab, Backspace, Char, Delete, Down, End, Enter, Esc, Home, Insert,
|
||||
Left, PageDown, PageUp, Right, Tab, Up, F,
|
||||
},
|
||||
KeyEvent, KeyModifiers,
|
||||
KeyEvent, KeyEventKind, KeyModifiers,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tokio::sync::mpsc;
|
||||
@ -214,6 +214,9 @@ impl EventLoop {
|
||||
|
||||
pub fn convert_raw_event_to_key(event: KeyEvent) -> Key {
|
||||
debug!("Raw event: {:?}", event);
|
||||
if event.kind == KeyEventKind::Release {
|
||||
return Key::Null;
|
||||
}
|
||||
match event.code {
|
||||
Backspace => match event.modifiers {
|
||||
KeyModifiers::CONTROL => Key::CtrlBackspace,
|
||||
|
Loading…
x
Reference in New Issue
Block a user