add Ctrl+d and Ctrl+u to jump up and down in the queue

This commit is contained in:
figsoda 2021-11-08 13:56:16 -05:00
parent f26d45073f
commit 3b30160a98
2 changed files with 10 additions and 5 deletions

View file

@ -86,10 +86,10 @@ Key | Action
<kbd>L</kbd> | next song
<kbd>Enter</kbd> | play selected song or quit searching mode if in searching mode
<kbd>Space</kbd> | select current song or the first song in the queue
<kbd>j</kbd>, <kbd>Down</kbd> or <kbd>ScrollDown</kbd> | go down in the queue
<kbd>k</kbd>, <kbd>Up</kbd> or <kbd>ScrollUp</kbd> | go up in the queue
<kbd>J</kbd> or <kbd>PageDown</kbd> | jump down in the queue
<kbd>K</kbd> or <kbd>PageUp</kbd> | jump up in the queue
<kbd>j</kbd>, <kbd>Down</kbd>, or <kbd>ScrollDown</kbd> | go down in the queue
<kbd>k</kbd>, <kbd>Up</kbd>, or <kbd>ScrollUp</kbd> | go up in the queue
<kbd>J</kbd>, <kbd>Ctrl</kbd> + <kbd>d</kbd>, or <kbd>PageDown</kbd> | jump down in the queue
<kbd>K</kbd>, <kbd>Ctrl</kbd> + <kbd>u</kbd>, or <kbd>PageUp</kbd> | jump up in the queue
<kbd>g</kbd> | go to the top of the queue
<kbd>G</kbd> | go to the bottom of the queue
<kbd>/</kbd> | enter searching mode

View file

@ -207,7 +207,11 @@ async fn run() -> Result<()> {
Command::Quit
}
KeyCode::Char('u') if modifiers.contains(KeyModifiers::CONTROL) => {
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,