← Standard library

Input

static class Input
import Input from Wax;

Per-frame convenience queries over InputData. Key transitions and motion totals reset each frame; held keys and the latest pointer/modifier state persist. Read raw events when you need their exact order. Text entry uses TextData, not physical key codes.

Input.wax:127

Inherits from object. Follow these links for inherited members.

Members

Downmethod

public static fn Down(Key key) : bool

Tests whether the key is held after processing this frame's events. A release in this frame clears it.

Input.wax:146

Pressedmethod

public static fn Pressed(Key key) : bool

Tests whether a not-held key became held at least once this frame. Repeated KeyDown events while held do not count as new presses.

Input.wax:156

Releasedmethod

public static fn Released(Key key) : bool

Tests whether a held key became released at least once this frame. Pressed and Released can both be true when both transitions occur in one frame.

Input.wax:165

MousePositiongetter

public static get MousePosition() : float2

The most recent mouse-event position in logical points, retained across frames with no mouse events.

Input.wax:175

MouseDeltagetter

public static get MouseDelta() : float2

The sum of MouseMove displacements this frame in logical points; zero when there are no motion events.

Input.wax:185

ScrollDeltagetter

public static get ScrollDelta() : float2

The total scroll this frame in logical points, positive right and up.

Input.wax:193

Modifiersgetter

public static get Modifiers() : KeyMods

The modifier flags on the most recent input event, retained across frames with no events.

Input.wax:202