()
| 1582 | } |
| 1583 | |
| 1584 | async 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 | |
| 1601 | export async function resetKeyBindings() { |
| 1602 | try { |
no test coverage detected