Class description The read-keyboard word returns objects of this class. The keys slot of a keyboard-state object contains a sequence of 256 members representing the state of the keys on the keyboard. Each element is a boolean value indicating whether the corresponding key is pressed. The sequence is indexed by scancode as defined by the USB HID standard. Named scancode constants are provided in the game.input.scancodes vocabulary.
Warning The scancodes used to index keyboard-state objects correspond to physical key positions on the keyboard--they are unaffected by keymaps, modifier keys, or other operating environment postprocessing. The face value of the constants in game.input.scancodes do not necessarily correspond to what the user expects the key to type. 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.