本页还没有译文
本页 14 段还没译成Français,下面显示的是英文原文。rawHotkeyToParsedHotkey
还没翻译译自英文(tanstack.com)本页 14 段都还没译
function rawHotkeyToParsedHotkey(raw, platform?): ParsedHotkey;Defined in: parse.ts:99
Converts a RawHotkey object to a ParsedHotkey.
Optional modifier booleans default to false; modifiers array is derived from them.
When mod is true, it is resolved to Control or Meta based on platform.
Parameters
raw
The raw hotkey object
platform?
"mac" | "windows" | "linux"
The target platform for resolving 'Mod' (defaults to auto-detection)
Returns
A ParsedHotkey suitable for matching and formatting
Example
rawHotkeyToParsedHotkey({ key: 'Escape' })
// { key: 'Escape', ctrl: false, shift: false, alt: false, meta: false, modifiers: [] }
rawHotkeyToParsedHotkey({ key: 'S', mod: true }, 'mac')
// { key: 'S', ctrl: false, shift: false, alt: false, meta: true, modifiers: ['Meta'] }
rawHotkeyToParsedHotkey({ key: 'S', mod: true, shift: true }, 'windows')
// { key: 'S', ctrl: true, shift: true, alt: false, meta: false, modifiers: ['Control', 'Shift'] }AI 翻译查看英文原文