Add up and down arrow keys for changing volume

This commit is contained in:
mrkmntal 2026-10-27 13:38:43 -04:00
commit 4a9508b14c
2 changed files with 5 additions and 5 deletions

View file

@ -70,7 +70,7 @@ directory defaults to `~/Videos` and can be changed in the app's Settings view
|---------|----------------------------|
| `Space` | Pause / resume |
| `h`/`l`, `←`/`→` | Seek -10s / +10s |
| `j`/`k` | Volume -5 / +5 |
| `j`/`k`, `↓`/`↑` | Volume -5 / +5 |
| `s` | Cycle subtitles |
| `n`/`p` | Next / previous track |
| `r` | Toggle loop current file |

View file

@ -58,7 +58,7 @@ class MainView:
self.app.draw_messages()
def _draw_help(self):
text = " [Space]Pause [KLeft/KRight]Seek [j/k]Vol [s]Sub [e]Plist [o]Queue [x]Settings [r/R]Loop [q]Quit"
text = " [Space]Pause [KLeft/KRight]Seek [KUp/KDown/j/k]Vol [s]Sub [e]Plist [o]Queue [x]Settings [r/R]Loop [q]Quit"
self.app.draw_help_bar(text)
def handle_key(self, key):
@ -75,11 +75,11 @@ class MainView:
elif key in (config.KEY_SEEK_FWD, curses.KEY_RIGHT):
self.app.client.command("seek", "10")
self.app.add_message(">> Seeked +10s")
elif key == config.KEY_VOL_UP:
elif key in (config.KEY_VOL_UP, curses.KEY_UP):
self.app.client.command("add", "volume", "5")
vol = self.app.client.get_property("volume")
self.app.add_message(f">> Volume Level: {int(vol)}" if vol else ">> Volume: ?")
elif key == config.KEY_VOL_DOWN:
elif key in (config.KEY_VOL_DOWN, curses.KEY_DOWN):
self.app.client.command("add", "volume", "-5")
vol = self.app.client.get_property("volume")
self.app.add_message(f">> Volume Level: {int(vol)}" if vol else ">> Volume: ?")
@ -114,7 +114,7 @@ class MainView:
self.app.add_message(">> Loop Current Playlist: no")
elif key == config.KEY_CONTROLS:
self.app.add_message("=== Controls ===")
self.app.add_message("[Space] Pause | [KLeft/KRight] Seek -10s/+10s | [j/k] Vol -/+")
self.app.add_message("[Space] Pause | [KLeft/KRight] Seek -10s/+10s | [KUp/KDown/j/k] Vol -/+")
self.app.add_message("[s] Subtitle | [o] Queue | [e] Playlist | [x] Settings | [n/p] Next/Prev")
self.app.add_message("[r/R] Loop File/Playlist (state shown in status bar) | [q] Quit")
elif key == config.KEY_PLAYLIST: