function handleKeyEvent(editor, event) {
        var provider = null;
        
        // Check for Control+Space
        if (event.type === "keydown" && event.keyCode === 32 && event.ctrlKey) {
            showHint(editor);
            event.preventDefault();
        } else if (event.type === "keypress") {
            // Check if any provider wants to show hints on this key.
            $.each(hintProviders, function (index, item) {
                if (item.shouldShowHintsOnKey(String.fromCharCode(event.charCode))) {
                    provider = item;
                    return false;
                }
            });
            
            shouldShowHintsOnKeyUp = !!provider;
        } else if (event.type === "keyup") {
            if (shouldShowHintsOnKeyUp) {
                shouldShowHintsOnKeyUp = false;
                showHint(editor);
            }
        }

        // Pass to the hint list, if it's open
        if (hintList && hintList.isOpen()) {
            shouldShowHintsOnKeyUp = false;
            hintList.handleKeyEvent(editor, event);
        }
    }
Handles keys related to displaying, searching, and navigating the hint list
@param {Editor} editor
@param {KeyboardEvent} event