(e)
| 7142 | |
| 7143 | var lastStoppedKey = null; |
| 7144 | function onKeyDown(e) { |
| 7145 | var cm = this; |
| 7146 | cm.curOp.focus = activeElt(); |
| 7147 | if (signalDOMEvent(cm, e)) { return } |
| 7148 | // IE does strange things with escape. |
| 7149 | if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; } |
| 7150 | var code = e.keyCode; |
| 7151 | cm.display.shift = code == 16 || e.shiftKey; |
| 7152 | var handled = handleKeyBinding(cm, e); |
| 7153 | if (presto) { |
| 7154 | lastStoppedKey = handled ? code : null; |
| 7155 | // Opera has no cut event... we try to at least catch the key combo |
| 7156 | if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) |
| 7157 | { cm.replaceSelection("", null, "cut"); } |
| 7158 | } |
| 7159 | |
| 7160 | // Turn mouse into crosshair when Alt is held on Mac. |
| 7161 | if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)) |
| 7162 | { showCrossHair(cm); } |
| 7163 | } |
| 7164 | |
| 7165 | function showCrossHair(cm) { |
| 7166 | var lineDiv = cm.display.lineDiv; |
nothing calls this directly
no test coverage detected