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

Function doHandleBinding

samples/common/codehighlight/codemirror.js:7107–7125  ·  view source on GitHub ↗
(cm, bound, dropShift)

Source from the content-addressed store, hash-verified

7105
7106 // Run a handler that was bound to a key.
7107 function doHandleBinding(cm, bound, dropShift) {
7108 if (typeof bound == "string") {
7109 bound = commands[bound];
7110 if (!bound) { return false }
7111 }
7112 // Ensure previous input has been read, so that the handler sees a
7113 // consistent view of the document
7114 cm.display.input.ensurePolled();
7115 var prevShift = cm.display.shift, done = false;
7116 try {
7117 if (cm.isReadOnly()) { cm.state.suppressEdits = true; }
7118 if (dropShift) { cm.display.shift = false; }
7119 done = bound(cm) != Pass;
7120 } finally {
7121 cm.display.shift = prevShift;
7122 cm.state.suppressEdits = false;
7123 }
7124 return done
7125 }
7126
7127 function lookupKeyForEditor(cm, name, handle) {
7128 for (var i = 0; i < cm.state.keyMaps.length; i++) {

Callers 2

handleKeyBindingFunction · 0.85
handleCharBindingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected