src/command/KeyBindingManager.js
function _handleKeyEvent(event) {
        var i, handled = false;
        for (i = _globalKeydownHooks.length - 1; i >= 0; i--) {
            if (_globalKeydownHooks[i](event)) {
                handled = true;
                break;
            }
        }
        _detectAltGrKeyDown(event);
        if (!handled && _handleKey(_translateKeyboardEvent(event))) {
            event.stopPropagation();
            event.preventDefault();
        }
    }
function _handleKeyEvent(event) {
        var i, handled = false;
        for (i = _globalKeydownHooks.length - 1; i >= 0; i--) {
            if (_globalKeydownHooks[i](event)) {
                handled = true;
                break;
            }
        }
        _detectAltGrKeyDown(event);
        if (!handled && _handleKey(_translateKeyboardEvent(event))) {
            event.stopPropagation();
            event.preventDefault();
        }
    }
function _handleKeyEvent ( event ) { var i , handled = false ; for ( i = _globalKeydownHooks . length - 1 ; i >= 0 ; i -- ) { if ( _globalKeydownHooks [ i ] ( event ) ) { handled = true ; break ; } } _detectAltGrKeyDown ( event ) ; if ( ! handled && _handleKey ( _translateKeyboardEvent ( event ) ) ) { event . stopPropagation ( ) ; event . preventDefault ( ) ; } }
Handles a given keydown event, checking global hooks first before
deciding to handle it ourselves.
@param {Event} The keydown event to handle.
Handles a given keydown event checking global hooks first before deciding to handle it ourselves .