Fix shortcut key for songs

This commit is contained in:
An Phan 2016-07-08 16:24:41 +08:00
parent ecca2157ea
commit 1950b7981d
No known key found for this signature in database
GPG key ID: 05536BB4BCDC02A2

View file

@ -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);