MCPcopy Create free account
hub / github.com/BaseXdb/basex / dispatchKey

Function dispatchKey

basex-api/src/main/webapp/dba/static/codemirror/codemirror.js:7215–7231  ·  view source on GitHub ↗
(cm, name, e, handle)

Source from the content-addressed store, hash-verified

7213 var stopSeq = new Delayed;
7214
7215 function dispatchKey(cm, name, e, handle) {
7216 var seq = cm.state.keySeq;
7217 if (seq) {
7218 if (isModifierKey(name)) { return "handled" }
7219 if (/\'$/.test(name))
7220 { cm.state.keySeq = null; }
7221 else
7222 { stopSeq.set(50, function () {
7223 if (cm.state.keySeq == seq) {
7224 cm.state.keySeq = null;
7225 cm.display.input.reset();
7226 }
7227 }); }
7228 if (dispatchKeyInner(cm, seq + " " + name, e, handle)) { return true }
7229 }
7230 return dispatchKeyInner(cm, name, e, handle)
7231 }
7232
7233 function dispatchKeyInner(cm, name, e, handle) {
7234 var result = lookupKeyForEditor(cm, name, handle);

Callers 3

handleKeyBindingFunction · 0.85
handleCharBindingFunction · 0.85
handleMappedButtonFunction · 0.85

Calls 5

isModifierKeyFunction · 0.85
dispatchKeyInnerFunction · 0.85
testMethod · 0.65
setMethod · 0.65
resetMethod · 0.65

Tested by

no test coverage detected