src/aria/widgets/controllers/AutoCompleteController.js
function (event) {
                var specialKey = false, keyCode = event.keyCode;
                for (var index = 0, keyMap; index < this.selectionKeys.length; index++) {
                    keyMap = this.selectionKeys[index];
                    if (this._validateModifiers(keyMap, event)) {
                        // case real key defined. For eg: 65 for a
                        if (ariaUtilsType.isNumber(keyMap.key)) {
                            if (keyMap.key === keyCode) {
                                specialKey = true;
                                break;
                            }
                        } else if (typeof(keyMap.key) !== "undefined"
                                && event["KC_" + keyMap.key.toUpperCase()] == keyCode) {
                            specialKey = true;
                            break;
                        } else if (typeof(keyMap.key) !== "undefined"
                                && String.fromCharCode(event.charCode) == keyMap.key) {
                            specialKey = true;
                            break;
                        }
                    }
                }
                return specialKey;
            }
function (event) {
                var specialKey = false, keyCode = event.keyCode;
                for (var index = 0, keyMap; index < this.selectionKeys.length; index++) {
                    keyMap = this.selectionKeys[index];
                    if (this._validateModifiers(keyMap, event)) {
                        // case real key defined. For eg: 65 for a
                        if (ariaUtilsType.isNumber(keyMap.key)) {
                            if (keyMap.key === keyCode) {
                                specialKey = true;
                                break;
                            }
                        } else if (typeof(keyMap.key) !== "undefined"
                                && event["KC_" + keyMap.key.toUpperCase()] == keyCode) {
                            specialKey = true;
                            break;
                        } else if (typeof(keyMap.key) !== "undefined"
                                && String.fromCharCode(event.charCode) == keyMap.key) {
                            specialKey = true;
                            break;
                        }
                    }
                }
                return specialKey;
            }
function ( event ) { var specialKey = false , keyCode = event . keyCode ; for ( var index = 0 , keyMap ; index < this . selectionKeys . length ; index ++ ) { keyMap = this . selectionKeys [ index ] ; if ( this . _validateModifiers ( keyMap , event ) ) { // case real key defined. For eg: 65 for a if ( ariaUtilsType . isNumber ( keyMap . key ) ) { if ( keyMap . key === keyCode ) { specialKey = true ; break ; } } else if ( typeof ( keyMap . key ) !== "undefined" && event [ "KC_" + keyMap . key . toUpperCase ( ) ] == keyCode ) { specialKey = true ; break ; } else if ( typeof ( keyMap . key ) !== "undefined" && String . fromCharCode ( event . charCode ) == keyMap . key ) { specialKey = true ; break ; } } } return specialKey ; }
Checking against special key combinations that trigger a selection of the item in the dropdown
@param {aria.DomEvent} event
@return {Boolean} Whether the event corresponds to a selection key
Checking against special key combinations that trigger a selection of the item in the dropdown