Changes a target's state based on keyboard events, like a button.
The current state of the utility. May be different than the state of the target.
downState:T = null
The value for the "down" state.
enabled:Bool = true
May be set to
false to disable the state changes temporarily until set
target:InteractiveObject = null
The target component that should change state based on pointer (mouse or touch) events.
upState:T = null
The value for the "up" state.
callback:T ‑> Void = null
The function to call when the state is changed.
The callback is expected to have the following signature:
String -> Void