MCPcopy Create free account
hub / github.com/TanStack/hotkeys / normalizeHotkey

Function normalizeHotkey

packages/hotkeys/src/parse.ts:197–205  ·  view source on GitHub ↗
(
  hotkey: Key | (string & {}),
  platform: 'mac' | 'windows' | 'linux' = detectPlatform(),
)

Source from the content-addressed store, hash-verified

195 * ```
196 */
197export function normalizeHotkey(
198 hotkey: Key | (string & {}),
199 platform: 'mac' | 'windows' | 'linux' = detectPlatform(),
200): Hotkey {
201 return normalizedHotkeyStringFromParsed(
202 parseHotkey(hotkey, platform),
203 platform,
204 )
205}
206
207/**
208 * Same canonical string as {@link normalizeHotkey}, but from an already-parsed hotkey.

Callers 3

stepRawPartsFunction · 0.90
parse.test.tsFile · 0.90

Calls 3

detectPlatformFunction · 0.90
parseHotkeyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…