Closed pfraces closed 11 years ago
The printable keystrokes are not duplicated in console and editor, so we can work around this by changing the codemirror keymap and listen just for Ctrl-C
(or whatever shortcut) causing console to close and switching to standard keymap
this implies:
CodeMirror.commands.myCommand = function () { ... }
cm.addKeyMap(km)
cm.removeKeyMap(km)
addKeyMap
gets priorityI still think is a good thing to capture keystrokes from outside codemirror, but in the meanwhile this proposal can be easier to implement (shortcut parser is a codemirror builtin) and forces me to learn how to manage keymaps in codemirror
workarounded with secondary proposal
needed to hide the console because when console is open codemirror must be without focus and therefore its keybindings does not respond
this implies: