The lookup logic is still better replaced with `CodeMirror.keyName`. Let `CodeMirror.keyName` parse the key into CodeMirror format. Extract out the key parsing code from `handleKeyEvent_` into a `parseCodeMirrorKey` function and use it in both places.