MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / normalizeExternalKey

Function normalizeExternalKey

src/cm/commandRegistry.js:1690–1703  ·  view source on GitHub ↗
(bindKey)

Source from the content-addressed store, hash-verified

1688}
1689
1690function normalizeExternalKey(bindKey) {
1691 if (!bindKey) return null;
1692 if (typeof bindKey === "string") return bindKey;
1693 const combos = [];
1694 if (typeof bindKey === "object") {
1695 const pushCombo = (combo) => {
1696 if (typeof combo === "string" && combo.trim()) combos.push(combo.trim());
1697 };
1698 pushCombo(bindKey.win);
1699 pushCombo(bindKey.linux);
1700 pushCombo(bindKey.mac);
1701 }
1702 return combos.length ? combos.join("|") : null;
1703}
1704
1705function applyCommandKeymap(view, bindings = cachedKeymap) {
1706 if (!view) return;

Callers 1

normalizeExternalCommandFunction · 0.85

Calls 1

pushComboFunction · 0.85

Tested by

no test coverage detected