MCPcopy Create free account
hub / github.com/TruthHun/BookStack / onKeyPress

Function onKeyPress

static/mergely/lib/codemirror.js:4204–4213  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

4202 }
4203
4204 function onKeyPress(e) {
4205 var cm = this;
4206 if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return;
4207 var keyCode = e.keyCode, charCode = e.charCode;
4208 if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}
4209 if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) return;
4210 var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
4211 if (handleCharBinding(cm, e, ch)) return;
4212 cm.display.input.onKeyPress(e);
4213 }
4214
4215 // FOCUS/BLUR EVENTS
4216

Callers

nothing calls this directly

Calls 4

eventInWidgetFunction · 0.70
signalDOMEventFunction · 0.70
handleKeyBindingFunction · 0.70
handleCharBindingFunction · 0.70

Tested by

no test coverage detected