read-keyboard ( -- keyboard-state )
Game controller input

Prev:read-controller ( controller -- controller-state )
Next:read-mouse ( -- mouse-state )


Vocabulary
game.input

Inputs and outputs
keyboard-statea keyboard-state


Word description
Reads the current raw state of the keyboard. See the documentation for the keyboard-state class for details on the returned value's format.

Warning
For efficiency, the implementation may reuse the returned keyboard-state object next time read-keyboard is called. You should clone any values from the returned tuple you need to preserve.

The keyboard state returned by this word is unprocessed by any keymaps, modifier keys, key repeat settings, or other operating environment postprocessing. Because of this, read-keyboard should not be used for text entry purposes. The Factor UI's standard gesture mechanism should be used in cases where the logical meaning of keypresses is needed; see Keyboard gestures.


See also
keyboard-state

Definition


Methods