(ev: Pick<KeyboardEvent, 'ctrlKey' | 'altKey' | 'shiftKey' | 'metaKey' | 'key'>)
| 5 | '"Maple Mono NF CN", "Sarasa Mono SC", "Noto Sans Mono CJK SC", "Noto Sans CJK SC", "PingFang SC", monospace' |
| 6 | |
| 7 | export 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 | |
| 17 | export function keyMapForAgent(agent: string | null | undefined): KeyMap | undefined { |
| 18 | switch (agent) { |
no test coverage detected