( hotkey: RegisterableHotkey, platform: 'mac' | 'windows' | 'linux' = detectPlatform(), )
| 219 | * Use this in framework adapters instead of branching on `formatHotkey(rawHotkeyToParsedHotkey(...))`. |
| 220 | */ |
| 221 | export function normalizeRegisterableHotkey( |
| 222 | hotkey: RegisterableHotkey, |
| 223 | platform: 'mac' | 'windows' | 'linux' = detectPlatform(), |
| 224 | ): Hotkey { |
| 225 | return typeof hotkey === 'string' |
| 226 | ? normalizeHotkey(hotkey, platform) |
| 227 | : normalizeHotkeyFromParsed( |
| 228 | rawHotkeyToParsedHotkey(hotkey, platform), |
| 229 | platform, |
| 230 | ) |
| 231 | } |
| 232 | |
| 233 | /** |
| 234 | * Checks if a string is a recognized modifier token (including aliases). |
no test coverage detected
searching dependent graphs…