Replace trigger and handle with handleCommand

This commit is contained in:
MrTimscampi 2020-07-18 23:38:00 +02:00
parent a2ac8353fa
commit 8ed2a185ee
5 changed files with 42 additions and 46 deletions

View file

@ -90,53 +90,53 @@ export function enable() {
switch (key) {
case 'ArrowLeft':
inputManager.handle('left');
inputManager.handleCommand('left');
break;
case 'ArrowUp':
inputManager.handle('up');
inputManager.handleCommand('up');
break;
case 'ArrowRight':
inputManager.handle('right');
inputManager.handleCommand('right');
break;
case 'ArrowDown':
inputManager.handle('down');
inputManager.handleCommand('down');
break;
case 'Back':
inputManager.handle('back');
inputManager.handleCommand('back');
break;
case 'Escape':
if (layoutManager.tv) {
inputManager.handle('back');
inputManager.handleCommand('back');
} else {
capture = false;
}
break;
case 'MediaPlay':
inputManager.handle('play');
inputManager.handleCommand('play');
break;
case 'Pause':
inputManager.handle('pause');
inputManager.handleCommand('pause');
break;
case 'MediaPlayPause':
inputManager.handle('playpause');
inputManager.handleCommand('playpause');
break;
case 'MediaRewind':
inputManager.handle('rewind');
inputManager.handleCommand('rewind');
break;
case 'MediaFastForward':
inputManager.handle('fastforward');
inputManager.handleCommand('fastforward');
break;
case 'MediaStop':
inputManager.handle('stop');
inputManager.handleCommand('stop');
break;
case 'MediaTrackPrevious':
inputManager.handle('previoustrack');
inputManager.handleCommand('previoustrack');
break;
case 'MediaTrackNext':
inputManager.handle('nexttrack');
inputManager.handleCommand('nexttrack');
break;
default: