MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / dispatchKeyInner

Function dispatchKeyInner

lib/web/CodeMirror/src/edit/key_events.js:66–80  ·  view source on GitHub ↗
(cm, name, e, handle)

Source from the content-addressed store, hash-verified

64}
65
66function dispatchKeyInner(cm, name, e, handle) {
67 let result = lookupKeyForEditor(cm, name, handle)
68
69 if (result == "multi")
70 cm.state.keySeq = name
71 if (result == "handled")
72 signalLater(cm, "keyHandled", cm, name, e)
73
74 if (result == "handled" || result == "multi") {
75 e_preventDefault(e)
76 restartBlink(cm)
77 }
78
79 return !!result
80}
81
82// Handle a key from the keydown event.
83function handleKeyBinding(cm, e) {

Callers 1

dispatchKeyFunction · 0.70

Calls 4

signalLaterFunction · 0.90
e_preventDefaultFunction · 0.90
restartBlinkFunction · 0.90
lookupKeyForEditorFunction · 0.70

Tested by

no test coverage detected