mirror of
https://github.com/SuperBFG7/ympd
synced 2025-01-12 18:30:36 +00:00
Feat: add more keyboard shortcuts #58
This commit is contained in:
parent
2eeddc9786
commit
87872f0554
@ -567,7 +567,7 @@ function appInit() {
|
||||
}, false);
|
||||
|
||||
document.addEventListener('keydown', function(event) {
|
||||
if (event.target.tagName == 'INPUT')
|
||||
if (event.target.tagName == 'INPUT' || event.target.tagName == 'SELECT')
|
||||
return;
|
||||
switch (event.which) {
|
||||
case 37: //left
|
||||
@ -579,6 +579,21 @@ function appInit() {
|
||||
case 32: //space
|
||||
clickPlay();
|
||||
break;
|
||||
case 83: //s
|
||||
clickStop();
|
||||
break;
|
||||
case 173: //-
|
||||
chVolume(-5);
|
||||
break;
|
||||
case 171: //+
|
||||
chVolume(5);
|
||||
break;
|
||||
case 67: //C c
|
||||
if (event.shiftKey)
|
||||
sendAPI({"cmd": "MPD_API_QUEUE_CROP"});
|
||||
else
|
||||
sendAPI({"cmd": "MPD_API_QUEUE_CLEAR"});
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user