MCPcopy Index your code
hub / github.com/TruthHun/BookStack / onKeyPress

Function onKeyPress

static/editor.md/lib/codemirror/lib/codemirror.js:4040–4049  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

4038 }
4039
4040 function onKeyPress(e) {
4041 var cm = this;
4042 if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return;
4043 var keyCode = e.keyCode, charCode = e.charCode;
4044 if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}
4045 if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) return;
4046 var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
4047 if (handleCharBinding(cm, e, ch)) return;
4048 cm.display.input.onKeyPress(e);
4049 }
4050
4051 // FOCUS/BLUR EVENTS
4052

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