code: function handleKeypress( e ) {
          if ( e.keyCode !== 38 && e.keyCode !== 40 && e.keyCode !== 13 ) {
              return;
          }
  
          var $this = $( this );
          var isInput = $this.is( ".bselect-search-input" );
  
          switch ( e.keyCode ) {
              // UP
              case 38:
                  if ( isInput ) {
                      $( e.delegateTarget ).find( ".bselect-option:visible:last" ).focus();
                  } else {
                      $this.prevAll( ".bselect-option:visible" ).eq( 0 ).focus();
                  }
                  break;
  
              // DOWN
              case 40:
                  if ( isInput ) {
                      $( e.delegateTarget ).find( ".bselect-option:visible:first" ).focus();
                  } else {
                      $this.nextAll( ".bselect-option:visible" ).eq( 0 ).focus();
                  }
                  break;
  
              // ENTER
              case 13:
                  if ( !isInput ) {
                      $this.trigger( "click" );
                  }
                  break;
          }
  
          return false;
      }
docs: Handle keypress on the search input and on the options.
  - On the search input: arrow up goes to the last visible item, while arrow down
  does the opposite.
  - In the options, arrows are used to navigate and enter to select.