(e)
| 3047 | |
| 3048 | var lastStoppedKey = null; |
| 3049 | function onKeyDown(e) { |
| 3050 | var cm = this; |
| 3051 | ensureFocus(cm); |
| 3052 | if (signalDOMEvent(cm, e)) return; |
| 3053 | // IE does strange things with escape. |
| 3054 | if (ie_upto10 && e.keyCode == 27) e.returnValue = false; |
| 3055 | var code = e.keyCode; |
| 3056 | cm.display.shift = code == 16 || e.shiftKey; |
| 3057 | var handled = handleKeyBinding(cm, e); |
| 3058 | if (presto) { |
| 3059 | lastStoppedKey = handled ? code : null; |
| 3060 | // Opera has no cut event... we try to at least catch the key combo |
| 3061 | if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) |
| 3062 | cm.replaceSelection("", null, "cut"); |
| 3063 | } |
| 3064 | |
| 3065 | // Turn mouse into crosshair when Alt is held on Mac. |
| 3066 | if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)) |
| 3067 | showCrossHair(cm); |
| 3068 | } |
| 3069 | |
| 3070 | function showCrossHair(cm) { |
| 3071 | var lineDiv = cm.display.lineDiv; |
nothing calls this directly
no test coverage detected
searching dependent graphs…