(e)
| 1943 | } |
| 1944 | |
| 1945 | function onKeyPress(e) { |
| 1946 | var cm = this; |
| 1947 | if (cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return; |
| 1948 | var keyCode = e.keyCode, charCode = e.charCode; |
| 1949 | if (opera && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;} |
| 1950 | if (((opera && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(cm, e)) return; |
| 1951 | var ch = String.fromCharCode(charCode == null ? keyCode : charCode); |
| 1952 | if (this.options.electricChars && this.doc.mode.electricChars && |
| 1953 | this.options.smartIndent && !isReadOnly(this) && |
| 1954 | this.doc.mode.electricChars.indexOf(ch) > -1) |
| 1955 | setTimeout(operation(cm, function() {indentLine(cm, cm.doc.sel.to.line, "smart");}), 75); |
| 1956 | if (handleCharBinding(cm, e, ch)) return; |
| 1957 | fastPoll(cm); |
| 1958 | } |
| 1959 | |
| 1960 | function onFocus(cm) { |
| 1961 | if (cm.options.readOnly == "nocursor") return; |
nothing calls this directly
no test coverage detected