Input Docs

Keys Input

Input Index

Purpose

Read keyboard state through InputContext with down, pressed, and released helpers.

Keys Input explains behavior, constraints, and practical usage so implementation decisions stay consistent across scripts and scenes.

API Source

Functions

key_down!key_pressed!key_released!

Enums

KeyCode

Constants

keyboard state snapshot per frame

Types

InputWindowScriptContext

Usage Pattern

let left = key_down!(ipt, KeyCode::KeyA);let jump = key_pressed!(ipt, KeyCode::Space);let quit = key_released!(ipt, KeyCode::Escape);

Key Details

Access module: ipt.Keys().

Use key_down! for held state.

Use key_pressed! for one-frame press.

Use key_released! for one-frame release.