MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / bindKeys

Function bindKeys

static/js/codemirror/keymap/vim.js:2534–2548  ·  view source on GitHub ↗
(keys, modifier)

Source from the content-addressed store, hash-verified

2532 'style': 'fat-cursor'
2533 };
2534 function bindKeys(keys, modifier) {
2535 for (var i = 0; i < keys.length; i++) {
2536 var key = keys[i];
2537 if (!modifier && inArray(key, specialSymbols)) {
2538 // Wrap special symbols with '' because that's how CodeMirror binds
2539 // them.
2540 key = "'" + key + "'";
2541 }
2542 if (modifier) {
2543 keyMap[modifier + '-' + key] = keyMapper(keys[i], modifier);
2544 } else {
2545 keyMap[key] = keyMapper(keys[i]);
2546 }
2547 }
2548 }
2549 bindKeys(upperCaseAlphabet);
2550 bindKeys(upperCaseAlphabet, 'Shift');
2551 bindKeys(upperCaseAlphabet, 'Ctrl');

Callers 1

buildVimKeyMapFunction · 0.85

Calls 2

inArrayFunction · 0.85
keyMapperFunction · 0.85

Tested by

no test coverage detected