MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / keySignature

Function keySignature

ui/src/components/workspace/terminalInput.ts:7–15  ·  view source on GitHub ↗
(ev: Pick<KeyboardEvent, 'ctrlKey' | 'altKey' | 'shiftKey' | 'metaKey' | 'key'>)

Source from the content-addressed store, hash-verified

5 '"Maple Mono NF CN", "Sarasa Mono SC", "Noto Sans Mono CJK SC", "Noto Sans CJK SC", "PingFang SC", monospace'
6
7export function keySignature(ev: Pick<KeyboardEvent, 'ctrlKey' | 'altKey' | 'shiftKey' | 'metaKey' | 'key'>): string {
8 const parts: string[] = []
9 if (ev.ctrlKey) parts.push('ctrl')
10 if (ev.altKey) parts.push('alt')
11 if (ev.shiftKey) parts.push('shift')
12 if (ev.metaKey) parts.push('meta')
13 parts.push(ev.key.toLowerCase())
14 return parts.join('+')
15}
16
17export function keyMapForAgent(agent: string | null | undefined): KeyMap | undefined {
18 switch (agent) {

Callers 2

TerminalViewFunction · 0.90

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected