mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-15 19:50:37 +03:00
Keyboard shortcut to go to current song (#2029)
* feat(hotkeys): keyboard-shortcut-for-current-song - #1336 Signed-off-by: Pavithra Nair <pmpavithranair@gmail.com> * Fix previously mentioned bugs Signed-off-by: Pavithra Nair <pmpavithranair@gmail.com> Co-authored-by: Pavithra Nair <pmpavithranair@gmail.com>
This commit is contained in:
parent
cdddd4ce30
commit
b5b01f78db
@ -25,7 +25,9 @@ const keyHandlers = (audioInstance, playerState) => {
|
||||
PREV_SONG: (e) => {
|
||||
if (!e.metaKey && prevSong()) audioInstance && audioInstance.playPrev()
|
||||
},
|
||||
|
||||
CURRENT_SONG: () => {
|
||||
window.location.href = `#/album/${playerState.current?.song.albumId}/show`
|
||||
},
|
||||
NEXT_SONG: (e) => {
|
||||
if (!e.metaKey && nextSong()) audioInstance && audioInstance.playNext()
|
||||
},
|
||||
|
@ -5,6 +5,7 @@ const keyMap = {
|
||||
TOGGLE_PLAY: { name: 'toggle_play', sequence: 'space', group: 'Player' },
|
||||
PREV_SONG: { name: 'prev_song', sequence: 'left', group: 'Player' },
|
||||
NEXT_SONG: { name: 'next_song', sequence: 'right', group: 'Player' },
|
||||
CURRENT_SONG: { name: 'current_song', sequence: 'c', group: 'Player' },
|
||||
VOL_UP: { name: 'vol_up', sequence: '=', group: 'Player' },
|
||||
VOL_DOWN: { name: 'vol_down', sequence: '-', group: 'Player' },
|
||||
...(config.enableFavourites && {
|
||||
|
@ -393,6 +393,7 @@
|
||||
"toggle_play": "Play / Pause",
|
||||
"prev_song": "Previous Song",
|
||||
"next_song": "Next Song",
|
||||
"current_song": "Current Song",
|
||||
"vol_up": "Volume Up",
|
||||
"vol_down": "Volume Down",
|
||||
"toggle_love": "Add this track to favourites"
|
||||
|
Loading…
x
Reference in New Issue
Block a user