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

Function lookupKey

samples/common/codehighlight/codemirror.js:6759–6774  ·  view source on GitHub ↗
(key, map, handle, context)

Source from the content-addressed store, hash-verified

6757 }
6758
6759 function lookupKey(key, map, handle, context) {
6760 map = getKeyMap(map);
6761 var found = map.call ? map.call(key, context) : map[key];
6762 if (found === false) { return "nothing" }
6763 if (found === "...") { return "multi" }
6764 if (found != null && handle(found)) { return "handled" }
6765
6766 if (map.fallthrough) {
6767 if (Object.prototype.toString.call(map.fallthrough) != "[object Array]")
6768 { return lookupKey(key, map.fallthrough, handle, context) }
6769 for (var i = 0; i < map.fallthrough.length; i++) {
6770 var result = lookupKey(key, map.fallthrough[i], handle, context);
6771 if (result) { return result }
6772 }
6773 }
6774 }
6775
6776 // Modifier key presses don't count as 'real' key presses for the
6777 // purpose of keymap fallthrough.

Callers 1

lookupKeyForEditorFunction · 0.85

Calls 1

getKeyMapFunction · 0.85

Tested by

no test coverage detected