ker/mod/tfw.view.combo.js
function onKeyDown( evt ) {
    switch ( evt.key ) {
    case 'Space':
        this.expanded = !this.expanded;
        evt.preventDefault();
        break;
    case 'Enter':
        this.action = this.value;
        break;
    case 'ArrowDown':
        selectNext.call( this );
        evt.preventDefault();
        break;
    case 'ArrowUp':
        selectPrev.call( this );
        evt.preventDefault();
        break;
    case 'Escape':
        if ( this.expanded ) {
            this.expanded = false;
            // Set the value as it was when we expanded the combo.
            this.value = this._valueWhenExpanded;
            evt.preventDefault();
        }
        break;
    default:
        // Do nothing.
    }
}
function onKeyDown( evt ) {
    switch ( evt.key ) {
    case 'Space':
        this.expanded = !this.expanded;
        evt.preventDefault();
        break;
    case 'Enter':
        this.action = this.value;
        break;
    case 'ArrowDown':
        selectNext.call( this );
        evt.preventDefault();
        break;
    case 'ArrowUp':
        selectPrev.call( this );
        evt.preventDefault();
        break;
    case 'Escape':
        if ( this.expanded ) {
            this.expanded = false;
            // Set the value as it was when we expanded the combo.
            this.value = this._valueWhenExpanded;
            evt.preventDefault();
        }
        break;
    default:
        // Do nothing.
    }
}
function onKeyDown ( evt ) { switch ( evt . key ) { case 'Space' : this . expanded = ! this . expanded ; evt . preventDefault ( ) ; break ; case 'Enter' : this . action = this . value ; break ; case 'ArrowDown' : selectNext . call ( this ) ; evt . preventDefault ( ) ; break ; case 'ArrowUp' : selectPrev . call ( this ) ; evt . preventDefault ( ) ; break ; case 'Escape' : if ( this . expanded ) { this . expanded = false ; // Set the value as it was when we expanded the combo. this . value = this . _valueWhenExpanded ; evt . preventDefault ( ) ; } break ; default : // Do nothing. } }
Space will expand the combo, Escape will collapse it and Enter will trigger an action.

@this ViewXJS
@param   {[type]} evt [description]
@returns {[type]}     [description]
Space will expand the combo Escape will collapse it and Enter will trigger an action .