Skip to main content

getHotkeyHint

还没翻译译自英文(tanstack.com)本页 10 段都还没译

function getHotkeyHint(hotkey, options?): SvelteHotkeyHint;

Defined in: packages/svelte-hotkeys/src/getHotkeyHint.svelte.ts:18

Returns an object with a reactive visible getter indicating whether held modifiers reveal this shortcut. Pass getters to track changing bindings and options. Uses the nonempty-subset/AltGr rules of matchesHeldModifiers; exact requires every modifier. Combine with the action's enabled state before showing a badge. This helper does not register a shortcut or check whether its target is focused.

Parameters

hotkey

MaybeGetter<RegisterableHotkey>

options?

MaybeGetter<HeldModifierOptions> = {}

Returns

SvelteHotkeyHint