attachKeyboardListeners() {
    // Arrow Up navigates focus backward
    this.listen(['ArrowUp'], this, (e) => {
      e.preventDefault();
      e.stopPropagation();
      this.navigate(-1, true);
    });

    // Arrow Right navigates focus forward
    this.listen(['ArrowDown'], this, (e) => {
      e.preventDefault();
      e.stopPropagation();
      this.navigate(1, true);
    });

    // Enter/Spacebar select the menu item
    this.listen(['Enter', 'Spacebar', ' '], this, (e) => {
      const thisItem = e.target.closest('ids-menu-item');
      this.selectItem(thisItem);
      this.lastNavigated = thisItem;
      e.stopPropagation();
    });
  }
/**
   * Sets up the connection to the global keyboard handler
   * @returns {void}
   */
Sets up the connection to the global keyboard handler
@returns {void}
Sets up the connection to the global keyboard handler @returns { void }
attachKeyboardListeners() {
    this.listen(['ArrowUp'], this, (e) => {
      e.preventDefault();
      e.stopPropagation();
      this.navigate(-1, true);
    });
    this.listen(['ArrowDown'], this, (e) => {
      e.preventDefault();
      e.stopPropagation();
      this.navigate(1, true);
    });
    this.listen(['Enter', 'Spacebar', ' '], this, (e) => {
      const thisItem = e.target.closest('ids-menu-item');
      this.selectItem(thisItem);
      this.lastNavigated = thisItem;
      e.stopPropagation();
    });
  }
attachKeyboardListeners ( ) { this . listen ( [ 'ArrowUp' ] , this , ( e ) => { e . preventDefault ( ) ; e . stopPropagation ( ) ; this . navigate ( - 1 , true ) ; } ) ; this . listen ( [ 'ArrowDown' ] , this , ( e ) => { e . preventDefault ( ) ; e . stopPropagation ( ) ; this . navigate ( 1 , true ) ; } ) ; this . listen ( [ 'Enter' , 'Spacebar' , ' ' ] , this , ( e ) => { const thisItem = e . target . closest ( 'ids-menu-item' ) ; this . selectItem ( thisItem ) ; this . lastNavigated = thisItem ; e . stopPropagation ( ) ; } ) ; }
Sets up the connection to the global keyboard handler
 @returns {void}
Sets up the connection to the global keyboard handler @returns { void }
// Arrow Up navigates focus backward // Arrow Right navigates focus forward // Enter/Spacebar select the menu item