src/editor/CodeHintManager.js
function _handleKeydownEvent(jqEvent, editor, event) {
        keyDownEditor = editor;
        if (!(event.ctrlKey || event.altKey || event.metaKey) &&
                (event.keyCode === KeyEvent.DOM_VK_ENTER ||
                 event.keyCode === KeyEvent.DOM_VK_RETURN ||
                 event.keyCode === KeyEvent.DOM_VK_TAB)) {
            lastChar = String.fromCharCode(event.keyCode);
        }
    }
function _handleKeydownEvent(jqEvent, editor, event) {
        keyDownEditor = editor;
        if (!(event.ctrlKey || event.altKey || event.metaKey) &&
                (event.keyCode === KeyEvent.DOM_VK_ENTER ||
                 event.keyCode === KeyEvent.DOM_VK_RETURN ||
                 event.keyCode === KeyEvent.DOM_VK_TAB)) {
            lastChar = String.fromCharCode(event.keyCode);
        }
    }
function _handleKeydownEvent ( jqEvent , editor , event ) { keyDownEditor = editor ; if ( ! ( event . ctrlKey || event . altKey || event . metaKey ) && ( event . keyCode === KeyEvent . DOM_VK_ENTER || event . keyCode === KeyEvent . DOM_VK_RETURN || event . keyCode === KeyEvent . DOM_VK_TAB ) ) { lastChar = String . fromCharCode ( event . keyCode ) ; } }
Handles keys related to displaying, searching, and navigating the hint list.
This gets called before handleChange.

TODO: Ideally, we'd get a more semantic event from the editor that told us
what changed so that we could do all of this logic without looking at
key events. Then, the purposes of handleKeyEvent and handleChange could be
combined. Doing this well requires changing CodeMirror.

@param {Event} jqEvent
@param {Editor} editor
@param {KeyboardEvent} event
Handles keys related to displaying searching and navigating the hint list . This gets called before handleChange .