Host typegenerated
Keyboard
The keyboard, as Input.Keyboard. Keys are named by position, such as "W", "ArrowLeft" or "Space", so controls work on any keyboard layout. For controls that also work on a controller or a touch screen, use Input.Action.
4 members · engine 0.1.0
Keyboard.axis(negative: String, positive: String) -> number-1, 0 or 1 from a pair of keys, for movement:Input.Keyboard.axis("A", "D")is -1 holding A, 1 holding D and 0 for neither or both.Keyboard.is_down(key: String) -> boolWhether a key is being held down.Keyboard.just_pressed(key: String) -> boolWhether a key was pressed this frame. True only once per press, however long it is held.Keyboard.just_released(key: String) -> boolWhether a key was let go this frame.
- Source
- docs/generated/decay-api.json
- Schema
- v1
- Engine version
- 0.1.0
- Source commit
909aca81368b