(e)
| 792 | } |
| 793 | } |
| 794 | function onKeyPress(e) { |
| 795 | if (pollingFast) readInput(); |
| 796 | if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; |
| 797 | var keyCode = e_prop(e, "keyCode"), charCode = e_prop(e, "charCode"); |
| 798 | if (window.opera && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;} |
| 799 | if (((window.opera && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(e)) return; |
| 800 | var ch = String.fromCharCode(charCode == null ? keyCode : charCode); |
| 801 | if (options.electricChars && mode.electricChars && options.smartIndent && !options.readOnly) { |
| 802 | if (mode.electricChars.indexOf(ch) > -1) |
| 803 | setTimeout(operation(function() {indentLine(sel.to.line, "smart");}), 75); |
| 804 | } |
| 805 | if (handleCharBinding(e, ch)) return; |
| 806 | fastPoll(); |
| 807 | } |
| 808 | function onKeyUp(e) { |
| 809 | if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; |
| 810 | if (e_prop(e, "keyCode") == 16) shiftSelecting = null; |
nothing calls this directly
no test coverage detected