From 3b30160a982f5541fa15f3364ead5a2bbc3bb040 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 8 Nov 2021 13:56:16 -0500 Subject: [PATCH] add Ctrl+d and Ctrl+u to jump up and down in the queue --- README.md | 8 ++++---- src/main.rs | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e4bb007..61087be 100644 --- a/README.md +++ b/README.md @@ -86,10 +86,10 @@ Key | Action L | next song Enter | play selected song or quit searching mode if in searching mode Space | select current song or the first song in the queue -j, Down or ScrollDown | go down in the queue -k, Up or ScrollUp | go up in the queue -J or PageDown | jump down in the queue -K or PageUp | jump up in the queue +j, Down, or ScrollDown | go down in the queue +k, Up, or ScrollUp | go up in the queue +J, Ctrl + d, or PageDown | jump down in the queue +K, Ctrl + u, or PageUp | jump up in the queue g | go to the top of the queue G | go to the bottom of the queue / | enter searching mode diff --git a/src/main.rs b/src/main.rs index a9a0a08..4a975bc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -207,7 +207,11 @@ async fn run() -> Result<()> { Command::Quit } KeyCode::Char('u') if modifiers.contains(KeyModifiers::CONTROL) => { - Command::ClearSearch + if searching { + Command::ClearSearch + } else { + Command::JumpUp + } } KeyCode::Left => Command::SeekBackwards, KeyCode::Right => Command::SeekForwards, @@ -243,6 +247,7 @@ async fn run() -> Result<()> { 'j' => Command::Down, 'k' => Command::Up, 'J' => Command::JumpDown, + 'd' if modifiers.contains(KeyModifiers::CONTROL) => Command::JumpDown, 'K' => Command::JumpUp, 'g' => Command::GotoTop, 'G' => Command::GotoBottom,