MCPcopy
hub / github.com/anomalyco/opencode / createResolvedKeymapConfig

Function createResolvedKeymapConfig

packages/tui/test/keymap.test.tsx:10–19  ·  view source on GitHub ↗
(input: TuiKeybind.KeybindOverrides = {})

Source from the content-addressed store, hash-verified

8import { getOpencodeModeStack, OPENCODE_BASE_MODE, OpencodeKeymapProvider, registerOpencodeKeymap } from "../src/keymap"
9
10function createResolvedKeymapConfig(input: TuiKeybind.KeybindOverrides = {}) {
11 const keybinds = TuiKeybind.parse(input)
12 return {
13 keybinds: createBindingLookup(TuiKeybind.toBindingConfig(keybinds), {
14 commandMap: TuiKeybind.CommandMap,
15 bindingDefaults: TuiKeybind.bindingDefaults(),
16 }),
17 leader_timeout: 2000,
18 }
19}
20
21test("legacy page key aliases compile as page keys", async () => {
22 const sequences: Record<string, string[][]> = {}

Callers 1

HarnessFunction · 0.85

Calls 1

createBindingLookupFunction · 0.85

Tested by

no test coverage detected