diff --git a/src/player/ui/input.rs b/src/player/ui/input.rs index c6882d0..1d6247d 100644 --- a/src/player/ui/input.rs +++ b/src/player/ui/input.rs @@ -1,6 +1,6 @@ use std::sync::atomic::Ordering; -use crossterm::event::{self, EventStream, KeyCode, KeyModifiers}; +use crossterm::event::{self, EventStream, KeyCode, KeyEventKind, KeyModifiers}; use futures::{FutureExt, StreamExt}; use tokio::sync::mpsc::Sender; @@ -17,6 +17,10 @@ pub async fn listen(sender: Sender) -> eyre::Result<()> { continue; }; + if event.kind == KeyEventKind::Release { + continue; + } + let messages = match event.code { // Arrow key volume controls. KeyCode::Up => Messages::ChangeVolume(0.1),