(ks: ParsedKeystroke)
| 87 | * Convert a ParsedKeystroke to its canonical string representation for display. |
| 88 | */ |
| 89 | export function keystrokeToString(ks: ParsedKeystroke): string { |
| 90 | const parts: string[] = [] |
| 91 | if (ks.ctrl) parts.push('ctrl') |
| 92 | if (ks.alt) parts.push('alt') |
| 93 | if (ks.shift) parts.push('shift') |
| 94 | if (ks.meta) parts.push('meta') |
| 95 | if (ks.super) parts.push('cmd') |
| 96 | // Use readable names for display |
| 97 | const displayKey = keyToDisplayName(ks.key) |
| 98 | parts.push(displayKey) |
| 99 | return parts.join('+') |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | * Map internal key names to human-readable display names. |
nothing calls this directly
no test coverage detected