(e)
| 592 | } |
| 593 | } |
| 594 | function onKeyPress(e) { |
| 595 | if (pollingFast) readInput(); |
| 596 | if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; |
| 597 | var keyCode = e_prop(e, "keyCode"), charCode = e_prop(e, "charCode"); |
| 598 | if (window.opera && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;} |
| 599 | if (((window.opera && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(e)) return; |
| 600 | var ch = String.fromCharCode(charCode == null ? keyCode : charCode); |
| 601 | if (options.electricChars && mode.electricChars && options.smartIndent && !options.readOnly) { |
| 602 | if (mode.electricChars.indexOf(ch) > -1) |
| 603 | setTimeout(operation(function() {indentLine(sel.to.line, "smart");}), 75); |
| 604 | } |
| 605 | if (handleCharBinding(e, ch)) return; |
| 606 | fastPoll(); |
| 607 | } |
| 608 | function onKeyUp(e) { |
| 609 | if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; |
| 610 | if (e_prop(e, "keyCode") == 16) shiftSelecting = null; |
nothing calls this directly
no test coverage detected