* Formats a ParsedHotkey back to a hotkey string. * Used internally to provide the hotkey string in callback context.
(parsed: ParsedHotkey)
| 247 | * Used internally to provide the hotkey string in callback context. |
| 248 | */ |
| 249 | function formatParsedHotkey(parsed: ParsedHotkey): Hotkey { |
| 250 | const parts: Array<string> = [] |
| 251 | |
| 252 | if (parsed.ctrl) parts.push('Control') |
| 253 | if (parsed.alt) parts.push('Alt') |
| 254 | if (parsed.shift) parts.push('Shift') |
| 255 | if (parsed.meta) parts.push('Meta') |
| 256 | parts.push(parsed.key) |
| 257 | |
| 258 | return parts.join('+') as Hotkey |
| 259 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…