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

Function lookupKeyForEditor

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

Source from the content-addressed store, hash-verified

32}
33
34function lookupKeyForEditor(cm, name, handle) {
35 for (let i = 0; i < cm.state.keyMaps.length; i++) {
36 let result = lookupKey(name, cm.state.keyMaps[i], handle, cm)
37 if (result) return result
38 }
39 return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))
40 || lookupKey(name, cm.options.keyMap, handle, cm)
41}
42
43// Note that, despite the name, this function is also used to check
44// for bound mouse clicks.

Callers 1

dispatchKeyInnerFunction · 0.70

Calls 1

lookupKeyFunction · 0.90

Tested by

no test coverage detected