Skip to content
Key hold & held keys API Reference

useHotkeyHint

ts
function useHotkeyHint(
   owner, 
   hotkey, 
options?): EmberHotkeyState<boolean>;

Defined in: packages/ember-hotkeys/src/useHotkeyHint.ts:24

Recomputes for held modifiers and tracked changes to the hotkey or options. The hint shows only while the hotkey can fire: some registration of it is enabled and in an active scope. A sequence reveals its hint from its first step, and an app hotkey matches its registrations by id and uses its effective hotkey (false while unbound). A hotkey on an element counts only while focus is inside it.

Parameters

owner

object

hotkey

MaybeGetter< | RegisterableHotkey | AppHotkey<string, HotkeyChord | HotkeySequence | null>>

options?

MaybeGetter<HeldModifierOptions> = {}

Returns

EmberHotkeyState<boolean>