MCPcopy
hub / github.com/vercel/hyper / getRegisteredKeys

Function getRegisteredKeys

lib/command-registry.ts:15–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13};
14
15export const getRegisteredKeys = () => {
16 const keymaps = getDecoratedKeymaps();
17
18 return Object.keys(keymaps).reduce((result: Record<string, string>, actionName) => {
19 const commandKeys = keymaps[actionName];
20 commandKeys.forEach((shortcut) => {
21 result[shortcut] = actionName;
22 });
23 return result;
24 }, {});
25};
26
27export const registerCommandHandlers = (cmds: typeof commands) => {
28 if (!cmds) {

Callers 1

attachKeyListenersMethod · 0.90

Calls 3

getDecoratedKeymapsFunction · 0.85
reduceMethod · 0.80
forEachMethod · 0.45

Tested by

no test coverage detected