• Provides an action to forward on key down & up events. This can be any object that has associated keydown and keyup methods. See KeyStore for a store implementation.

    Parameters

    • node: HTMLElement

      Target element.

    • keyTarget: {
          keydown: (event: KeyboardEvent) => void;
          keyup: (event: KeyboardEvent) => void;
      }

      An object to forward events key down / up events to as pressed.

    Returns ActionReturn<
        {
            keydown: (event: KeyboardEvent) => void;
            keyup: (event: KeyboardEvent) => void;
        },
    >

    Action lifecycle methods.