本页还没有译文
本页 15 段还没译成日本語,下面显示的是英文原文。normalizeHotkey
还没翻译译自英文(tanstack.com)本页 15 段都还没译
function normalizeHotkey(hotkey, platform?): Hotkey;Defined in: parse.ts:205
Normalizes a hotkey string to its canonical form.
- When
Modis allowed for the platform (Command on Mac without Control; Control on Windows/Linux without Meta): emitsMod, thenAlt, thenShift, then the key (e.g.Mod+Shift+E,Mod+S). - Otherwise: literal modifiers in
Control+Alt+Shift+Metaorder, then the key. - Resolves aliases and normalizes key casing (e.g.
esc→Escape,a→A).
Parameters
hotkey
Key | string & object
The hotkey string to normalize
platform?
"mac" | "windows" | "linux"
The target platform for resolving Mod (defaults to auto-detection)
Returns
The normalized hotkey string
Example
normalizeHotkey('shift+meta+e', 'mac') // 'Mod+Shift+E'
normalizeHotkey('ctrl+a', 'windows') // 'Mod+A'
normalizeHotkey('esc') // 'Escape'AI 翻译查看英文原文