Skip to content
AEOWUN
Docs Menu

Input

React to keys or read gameplay input.

Key events

on.keypress(key, down) {
    if key == "F" && down {
        debug.log("Attack")
    }
}

down is true on press and false on release. Repeated keypress messages are suppressed. Losing window focus releases held keys.

Held keys

if input.is_key_down("F") {
    debug.log("F is held")
}

Key names include "A", "1", "Space", "ArrowUp", and "Escape". A top-level check runs once at startup; use a relevant update or event when you need later input.

Gameplay controls

input.get_move_vector() returns two movement values. input.is_jump_pressed() reads jump input. input.get_orbit_delta() reads camera-orbit input. Use get.mouse() to control cursor visibility and locking. See the Input reference.

[BETA] marks features newer than the current public release. Current release: 0.8.0.