Hex Core JS
    Preparing search index...

    Function useEscapeListener

    • Registers the given callback in the EscapeListenerContext, manages updating the registry when the value of either callback or isEnabled changes, and removes the callback from the context on unmount.

      Parameters

      • callback: () => void

        A function to call when the Escape key is pressed.

      • options: UseEscapeListenerOptions = {}

        Options for the escape listener.

      Returns void