Hex Core JS
    Preparing search index...

    Function useHotkeyListener

    • Adds a hotkey listener to the document body.

      Parameters

      • hotkey: Hotkey

        The hotkey to listen for.

      • onPress: (event: KeyboardEvent) => void

        The function to call when the hotkey is pressed.

      • options: UseHotkeyListenerOptions = {}

        Options for the hotkey listener.

      Returns void