function runKeyEvent(key) {
		/*
  	Checks to see if the user bound an event to the code pressed.
  */
		if (_config2.default.bindings[key] != undefined) {
			/*
   	Determine which event should be run if bound.
   */
			switch (_config2.default.bindings[key]) {
				/*
    	Fires a play pause event.
    */
				case 'play_pause':
					setSongPlayPause(_config2.default.active_playlist, _config2.default.active_index);
					break;

				/*
    	Fires a next event.
    */
				case 'next':
					/*
     	Check to see if the current state of the player
     	is in playlist mode or not playlist mode.
     */
					if (_config2.default.active_playlist == '' || _config2.default.active_playlist == null) {
						setNext();
					} else {
						setNextPlaylist(_config2.default.active_playlist);
					}
					break;

				/*
    	Fires a previous event.
    */
				case 'prev':
					/*
     	Check to see if the current playlist has been set
     	or null and set the previous song.
     */
					if (_config2.default.active_playlist == '' || _config2.default.active_playlist == null) {
						AmplitudeEventsHelpers.setPrev();
					} else {
						AmplitudeEventsHelpers.setPrevPlaylist(_config2.default.active_playlist);
					}
					break;

				/*
    	Fires a stop event.
    */
				case 'stop':
					/*
     	Sets all of the play/pause buttons to pause
     */
					_visual2.default.setPlayPauseButtonsToPause();

					/*
     	Stops the active song.
     */
					_core2.default.stop();
					break;

				/*
    	Fires a shuffle event.
    */
				case 'shuffle':
					/*
     	Check to see if the current playlist has been set
     	or null and set the previous song.
     */
					if (_config2.default.active_playlist == '' || _config2.default.active_playlist == null) {
						AmplitudesEventHelpers.setShuffle(null);
					} else {
						AmplitudeEvenstHelpers.setShuffle(_config2.default.active_playlist);
					}
					break;

				/*
    	Fires a repeat event.
    */
				case 'repeat':
					/*
     	Sets repeat to the opposite of what it was set to
     */
					AmplitudeEventsHelpers.setRepeat(!_config2.default.repeat);

					/*
     	Visually sync repeat
     */
					_visual2.default.syncRepeat();
					break;
			}
		}
	}
/**
  * Runs an event on key down
  *
  * @access public
  * @param {number} key 	- The key code the event is bound to.
  */
Runs an event on key down
@access public
@param {number} key         - The key code the event is bound to.
Runs an event on key down @access public @param { number } key - The key code the event is bound to .
function runKeyEvent(key) {
		if (_config2.default.bindings[key] != undefined) {
			switch (_config2.default.bindings[key]) {
				case 'play_pause':
					setSongPlayPause(_config2.default.active_playlist, _config2.default.active_index);
					break;
				case 'next':
					if (_config2.default.active_playlist == '' || _config2.default.active_playlist == null) {
						setNext();
					} else {
						setNextPlaylist(_config2.default.active_playlist);
					}
					break;
				case 'prev':
					if (_config2.default.active_playlist == '' || _config2.default.active_playlist == null) {
						AmplitudeEventsHelpers.setPrev();
					} else {
						AmplitudeEventsHelpers.setPrevPlaylist(_config2.default.active_playlist);
					}
					break;
				case 'stop':
					_visual2.default.setPlayPauseButtonsToPause();
					_core2.default.stop();
					break;
				case 'shuffle':
					if (_config2.default.active_playlist == '' || _config2.default.active_playlist == null) {
						AmplitudesEventHelpers.setShuffle(null);
					} else {
						AmplitudeEvenstHelpers.setShuffle(_config2.default.active_playlist);
					}
					break;
				case 'repeat':
					AmplitudeEventsHelpers.setRepeat(!_config2.default.repeat);
					_visual2.default.syncRepeat();
					break;
			}
		}
	}
function runKeyEvent ( key ) { if ( _config2 . default . bindings [ key ] != undefined ) { switch ( _config2 . default . bindings [ key ] ) { case 'play_pause' : setSongPlayPause ( _config2 . default . active_playlist , _config2 . default . active_index ) ; break ; case 'next' : if ( _config2 . default . active_playlist == '' || _config2 . default . active_playlist == null ) { setNext ( ) ; } else { setNextPlaylist ( _config2 . default . active_playlist ) ; } break ; case 'prev' : if ( _config2 . default . active_playlist == '' || _config2 . default . active_playlist == null ) { AmplitudeEventsHelpers . setPrev ( ) ; } else { AmplitudeEventsHelpers . setPrevPlaylist ( _config2 . default . active_playlist ) ; } break ; case 'stop' : _visual2 . default . setPlayPauseButtonsToPause ( ) ; _core2 . default . stop ( ) ; break ; case 'shuffle' : if ( _config2 . default . active_playlist == '' || _config2 . default . active_playlist == null ) { AmplitudesEventHelpers . setShuffle ( null ) ; } else { AmplitudeEvenstHelpers . setShuffle ( _config2 . default . active_playlist ) ; } break ; case 'repeat' : AmplitudeEventsHelpers . setRepeat ( ! _config2 . default . repeat ) ; _visual2 . default . syncRepeat ( ) ; break ; } } }
Runs an event on key down
 @access public
 @param {number} key         - The key code the event is bound to.
Runs an event on key down @access public @param { number } key - The key code the event is bound to .
/*
  	Checks to see if the user bound an event to the code pressed.
  */ /*
   	Determine which event should be run if bound.
   */ /*
    	Fires a play pause event.
    */ /*
    	Fires a next event.
    */ /*
     	Check to see if the current state of the player
     	is in playlist mode or not playlist mode.
     */ /*
    	Fires a previous event.
    */ /*
     	Check to see if the current playlist has been set
     	or null and set the previous song.
     */ /*
    	Fires a stop event.
    */ /*
     	Sets all of the play/pause buttons to pause
     */ /*
     	Stops the active song.
     */ /*
    	Fires a shuffle event.
    */ /*
     	Check to see if the current playlist has been set
     	or null and set the previous song.
     */ /*
    	Fires a repeat event.
    */ /*
     	Sets repeat to the opposite of what it was set to
     */ /*
     	Visually sync repeat
     */