feat: add keyboard shortcut for Home screen

This commit is contained in:
Phan An 2024-08-29 20:29:20 +02:00
parent d8047ff4e8
commit ea02d1cca5
2 changed files with 3 additions and 1 deletions

View file

@ -133,8 +133,9 @@ Koel has a number of keyboard shortcuts to make it easier to navigate and contro
Note that these shortcuts are only triggered when the focus is not on an input field (including the volume control and the music track)
or a textarea.
* <kbd>h</kbd> shows the Home screen
* <kbd>q</kbd> toggle the Queue screen
* <kbd>f</kbd> puts the focus into the search box and triggers the instant search screen
* <kbd>f</kbd> puts the focus into the search box and triggers the [instant search](search.md) screen
* <kbd>Enter</kbd> plays a song. If multiple songs are being selected, <kbd>Enter</kbd> adds them to the bottom of the queue, <kbd>Shift</kbd>+<kbd>Enter</kbd> queues them to top. Adding a <kbd>Cmd</kbd> or <kbd>Ctrl</kbd> into the combo plays the first selected song right away.
* <kbd>Space</kbd> toggles playback
* <kbd>j</kbd> plays the next song in queue

View file

@ -34,6 +34,7 @@ onKeyStroke('k', () => playbackService.playPrev())
onKeyStroke(' ', () => playbackService.toggle())
onKeyStroke('r', () => playbackService.rotateRepeatMode())
onKeyStroke('q', () => go(isCurrentScreen('Queue') ? -1 : 'queue'))
onKeyStroke('h', () => go('home'))
onKeyStroke('ArrowRight', () => playbackService.seekBy(10))
onKeyStroke('ArrowLeft', () => playbackService.seekBy(-10))