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

Function loadCustomKeyBindings

src/cm/commandRegistry.js:1584–1599  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1582}
1583
1584async function loadCustomKeyBindings() {
1585 try {
1586 const bindingsFile = fsOperation(KEYBINDING_FILE);
1587 if (await bindingsFile.exists()) {
1588 const bindings = await bindingsFile.readFile("json");
1589 if (bindings && typeof bindings === "object") {
1590 resolvedKeyBindings = bindings;
1591 }
1592 } else {
1593 throw new Error("Key binding file not found");
1594 }
1595 } catch (error) {
1596 await resetKeyBindings();
1597 resolvedKeyBindings = keyBindings;
1598 }
1599}
1600
1601export async function resetKeyBindings() {
1602 try {

Callers 1

setKeyBindingsFunction · 0.85

Calls 4

fsOperationFunction · 0.85
resetKeyBindingsFunction · 0.85
existsMethod · 0.65
readFileMethod · 0.45

Tested by

no test coverage detected