MCPcopy Create free account
hub / github.com/anus-dev/ANUS / createKeyMatchers

Function createKeyMatchers

packages/cli/src/ui/keyMatchers.ts:88–98  ·  view source on GitHub ↗
(
  config: KeyBindingConfig = defaultKeyBindings,
)

Source from the content-addressed store, hash-verified

86 * Creates key matchers from a key binding configuration
87 */
88export function createKeyMatchers(
89 config: KeyBindingConfig = defaultKeyBindings,
90): KeyMatchers {
91 const matchers = {} as { [C in Command]: KeyMatcher };
92
93 for (const command of Object.values(Command)) {
94 matchers[command] = (key: Key) => matchCommand(command, key, config);
95 }
96
97 return matchers as KeyMatchers;
98}
99
100/**
101 * Default key binding matchers using the default configuration

Callers 2

keyMatchers.tsFile · 0.85

Calls 1

matchCommandFunction · 0.85

Tested by

no test coverage detected