Better key mapping for CodeMirror plugin