(e)
| 4161 | |
| 4162 | var lastStoppedKey = null; |
| 4163 | function onKeyDown(e) { |
| 4164 | var cm = this; |
| 4165 | cm.curOp.focus = activeElt(); |
| 4166 | if (signalDOMEvent(cm, e)) return; |
| 4167 | // IE does strange things with escape. |
| 4168 | if (ie && ie_version < 11 && e.keyCode == 27) e.returnValue = false; |
| 4169 | var code = e.keyCode; |
| 4170 | cm.display.shift = code == 16 || e.shiftKey; |
| 4171 | var handled = handleKeyBinding(cm, e); |
| 4172 | if (presto) { |
| 4173 | lastStoppedKey = handled ? code : null; |
| 4174 | // Opera has no cut event... we try to at least catch the key combo |
| 4175 | if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) |
| 4176 | cm.replaceSelection("", null, "cut"); |
| 4177 | } |
| 4178 | |
| 4179 | // Turn mouse into crosshair when Alt is held on Mac. |
| 4180 | if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)) |
| 4181 | showCrossHair(cm); |
| 4182 | } |
| 4183 | |
| 4184 | function showCrossHair(cm) { |
| 4185 | var lineDiv = cm.display.lineDiv; |
nothing calls this directly
no test coverage detected