MCPcopy
hub / github.com/witheve/Eve / onKeyPress

Function onKeyPress

src/codemirror.js:4227–4236  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

4225 }
4226
4227 function onKeyPress(e) {
4228 var cm = this;
4229 if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return;
4230 var keyCode = e.keyCode, charCode = e.charCode;
4231 if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}
4232 if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) return;
4233 var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
4234 if (handleCharBinding(cm, e, ch)) return;
4235 cm.display.input.onKeyPress(e);
4236 }
4237
4238 // FOCUS/BLUR EVENTS
4239

Callers

nothing calls this directly

Calls 4

eventInWidgetFunction · 0.85
signalDOMEventFunction · 0.85
handleKeyBindingFunction · 0.85
handleCharBindingFunction · 0.85

Tested by

no test coverage detected