MCPcopy Index your code
hub / github.com/DHTMLX/gantt / onKeyPress

Function onKeyPress

samples/common/codehighlight/codemirror.js:7244–7256  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

7242 }
7243
7244 function onKeyPress(e) {
7245 var cm = this;
7246 if (e.target && e.target != cm.display.input.getField()) { return }
7247 if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }
7248 var keyCode = e.keyCode, charCode = e.charCode;
7249 if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}
7250 if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }
7251 var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
7252 // Some browsers fire keypress events for backspace
7253 if (ch == "\x08") { return }
7254 if (handleCharBinding(cm, e, ch)) { return }
7255 cm.display.input.onKeyPress(e);
7256 }
7257
7258 var DOUBLECLICK_DELAY = 400;
7259

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected