Class KeyTransition

A transition for a keys.

Hierarchy

Constructors

  • Creates the transition.

    Parameters

    • srcState: OutputState

      The source state of the transition

    • tgtState: InputState

      The output state of the transition

    • keyType: "keydown" | "keyup"

      The type of key event

    • Optional action: ((evt) => void)

      The action to execute when going through the transition

        • (evt): void
        • Parameters

          • evt: KeyboardEvent

          Returns void

    • Optional guard: ((evt) => boolean)

      The guard to fulfil to execute the transition

        • (evt): boolean
        • Parameters

          • evt: KeyboardEvent

          Returns boolean

    Returns KeyTransition

Properties

acceptedEvents: ReadonlySet<"input" | "auxclick" | "change" | "click" | "keydown" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "scroll" | "touchend" | "touchmove" | "touchstart" | "wheel"> = ...
action: ((evt) => void)

Type declaration

    • (evt): void
    • Parameters

      • evt: KeyboardEvent

      Returns void

guard: ((evt) => boolean)

Type declaration

    • (evt): boolean
    • Parameters

      • evt: KeyboardEvent

      Returns boolean

Accessors

Methods

  • Returns ReadonlySet<"input" | "auxclick" | "change" | "click" | "keydown" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "scroll" | "touchend" | "touchmove" | "touchstart" | "wheel">

    The set of events accepted by the transition.

Generated using TypeDoc