handleKeyPress(event) {

    // Check for space bar (32) or enter (13) keys
    if (event.which === 32 || event.which === 13) {
      if (this.buttonPressed_){
        this.unpressButton();
      } else {
        this.pressButton();
      }
      event.preventDefault();
    // Check for escape (27) key
    } else if (event.which === 27){
      if (this.buttonPressed_){
        this.unpressButton();
      }
      event.preventDefault();
    }
  }
/**
   * Handle key press on menu
   *
   * @param {Object} Key press event
   * @method handleKeyPress
   */
Handle key press on menu
@param {Object} Key press event
@method handleKeyPress
Handle key press on menu @param { Object } Key press event @method handleKeyPress
handleKeyPress(event) {
    if (event.which === 32 || event.which === 13) {
      if (this.buttonPressed_){
        this.unpressButton();
      } else {
        this.pressButton();
      }
      event.preventDefault();
    } else if (event.which === 27){
      if (this.buttonPressed_){
        this.unpressButton();
      }
      event.preventDefault();
    }
  }
handleKeyPress ( event ) { if ( event . which === 32 || event . which === 13 ) { if ( this . buttonPressed_ ) { this . unpressButton ( ) ; } else { this . pressButton ( ) ; } event . preventDefault ( ) ; } else if ( event . which === 27 ) { if ( this . buttonPressed_ ) { this . unpressButton ( ) ; } event . preventDefault ( ) ; } }
Handle key press on menu
 @param {Object} Key press event
 @method handleKeyPress
Handle key press on menu @param { Object } Key press event @method handleKeyPress
// Check for space bar (32) or enter (13) keys // Check for escape (27) key