MCPcopy Create free account
hub / github.com/anomalyco/opencode / groupFor

Function groupFor

packages/app/src/components/settings-keybinds.tsx:60–76  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

58}
59
60function groupFor(id: string): KeybindGroup {
61 if (id === PALETTE_ID) return "General"
62 if (id.startsWith("terminal.")) return "Terminal"
63 if (id.startsWith("model.") || id.startsWith("agent.") || id.startsWith("mcp.")) return "Model and agent"
64 if (id.startsWith("file.") || id.startsWith("fileTree.")) return "Navigation"
65 if (id.startsWith("prompt.")) return "Prompt"
66 if (
67 id.startsWith("session.") ||
68 id.startsWith("message.") ||
69 id.startsWith("permissions.") ||
70 id.startsWith("steps.") ||
71 id.startsWith("review.")
72 )
73 return "Session"
74
75 return "General"
76}
77
78function isModifier(key: string) {
79 return key === "Shift" || key === "Control" || key === "Alt" || key === "Meta"

Callers 1

listForFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected