mirror of
https://github.com/koel/koel
synced 2024-11-10 14:44:13 +00:00
Fix shortcut key for songs
This commit is contained in:
parent
ecca2157ea
commit
1950b7981d
1 changed files with 13 additions and 3 deletions
|
@ -5,9 +5,9 @@
|
|||
@keydown.j = "playNext"
|
||||
@keydown.k = "playPrev"
|
||||
@keydown.f = "search"
|
||||
@keydown.177 = "playPrev"
|
||||
@keydown.176 = "playNext"
|
||||
@keydown.179 = "togglePlayback"
|
||||
@keydown.mediaPrev = "playPrev"
|
||||
@keydown.mediaNext = "playNext"
|
||||
@keydown.mediaToggle = "togglePlayback"
|
||||
>
|
||||
<site-header></site-header>
|
||||
<main-wrapper></main-wrapper>
|
||||
|
@ -216,6 +216,16 @@ export default {
|
|||
},
|
||||
};
|
||||
|
||||
// Register our custom key codes
|
||||
Vue.config.keyCodes = {
|
||||
j: 74,
|
||||
k: 75,
|
||||
f: 70,
|
||||
mediaNext: 176,
|
||||
mediaPrev: 177,
|
||||
mediaToggle: 179
|
||||
};
|
||||
|
||||
// …and the global directives
|
||||
Vue.directive('koel-focus', focusDirective);
|
||||
Vue.directive('koel-clickaway',clickawayDirective);
|
||||
|
|
Loading…
Reference in a new issue