Convenience helpers for working with keyboard inputs.
Check the pressed down state of any Key.
Gives the arrow keys' pressed down state as follows:
{ x = 0, y = 0 } when pressing no arrows.{ x =-1, y = 0 } when pressing the left arrow.{ x = 1, y = 1 } when pressing the up and right arrows.{ x = 0, y =-1 } when pressing the down, left, and right arrows (left and right cancel out).Similar to arrows, gives the W, A, S and D keys' pressed down state.
{ x = 0, y = 0 } when pressing none of W, A, S and D.{ x =-1, y = 0 } when pressing A.{ x = 1, y = 1 } when pressing W and D.{ x = 0, y =-1 } when pressing A, S and D (A and D cancel out).Get the full list of keys that are currently pressed down.
The message type Keyboard.Extra uses.
You will need to add this to your program's subscriptions.
Use this to initialize the component.
You need to call this to have the component update.
These are all the keys that have names in Keyboard.Extra.
The internal representation of
Keyboard.Extra. Useful for type annotation.