require(["inputmanager"],function(inputmanager){"use strict";function sendCommand(name,sourceElement){var options={sourceElement:sourceElement};inputmanager.trigger(name,options)}var globalScope=window;globalScope.addEventListener("keydown",function(evt){switch(evt.keyCode){case globalScope.VK_BACK_SPACE:return evt.preventDefault(),void sendCommand("back",evt.target);case globalScope.VK_LEFT:return evt.preventDefault(),void sendCommand("left",evt.target);case globalScope.VK_UP:return evt.preventDefault(),void sendCommand("up",evt.target);case globalScope.VK_RIGHT:return evt.preventDefault(),void sendCommand("right",evt.target);case globalScope.VK_DOWN:return evt.preventDefault(),void sendCommand("down",evt.target);case globalScope.VK_MENU:return void sendCommand("menu",evt.target);case globalScope.VK_TRACK_NEXT:sendCommand("next",evt.target);break;case globalScope.VK_TRACK_PREV:sendCommand("previous",evt.target);break;case globalScope.VK_INFO:evt.preventDefault(),sendCommand("info",evt.target);break;case globalScope.VK_STOP:evt.preventDefault(),sendCommand("stop",evt.target);break;case globalScope.VK_PLAY:evt.preventDefault(),sendCommand("play",evt.target);break;case globalScope.VK_PAUSE:evt.preventDefault(),sendCommand("pause",evt.target);break;case globalScope.VK_FAST_FWD:evt.preventDefault(),sendCommand("fastforward",evt.target);break;case globalScope.VK_REWIND:evt.preventDefault(),sendCommand("rewind",evt.target);break;case globalScope.VK_RED:inputmanager.notify()}})});