Helpful
    Preparing search index...

    Function useKeyboardActivate

    • Represents a hook that generates a keyboard event that can forward to another event as long as a specific key is pressed. This will also output the best value for the tabIndex property.

      The main usage of this hook is to support keyboard navigation for DOM elements that handle click events with a tab index.

      Type Parameters

      • T = Element

      Parameters

      • Optionalhandler: KeyboardEventHandler<T>

        The callback handler to invoke when any of the key codes are pressed. If this is undefined, then it will never be invoked

      • codes: string[] = DefaultActivateCodes

        The list of key codes that will fire the event handler. The default value will be DefaultActivateCodes.

      Returns IZKeyboardInteraction<T>

      An object that contains the equivalent keydown event