Builtin Library
README.md
default
zinput default profile — keyboard-and-mouse bindings for the named actions
and axes of the Zin.profile registry. Registered via
Zin.profile.load("default"), and the fallback active profile when no user
profile is selected.
A profile record names bindings without device classes, so what it
registers reaches a keyboard and a mouse. The controls a world reads — the
ones carrying keyboard, gamepad and touch together — are the
<name>.inputBinding/ children of an .inputMap, activated through
mapRef:activate(). @builtin::inputMaps.default is that scheme, and
topics/input is the guide.
Exports
Data-only module. Returns a single profile record — a table that
Zin.profile.load consumes directly (callers don't invoke methods on it).
The record carries:
- Movement axes:
move(WASD),move_vertical, andvehicle_steer. - Look axes (
look,look_x,look_y), gated bylookGate()so look input only fires when pointer lock is active or the right mouse button is held. - A
scroll_yzoom axis. - Action bindings: the six
move_*directions,jump,crouch,sprint,pointer_lock_toggle,look_drag, and the threevehicle_*actions in thevehiclecontext.
Usage
local default = require("@builtin::profiles.default")
Zin.profile.load(default)
Notes
- The module requires only leaf zinput modules (
bindings,state) so it is safe to require from insideZin.profile.loadwithout circular-import risk. lookGate()is evaluated per axis-advance, not at registration — the live input state governs whether look input is allowed.- Defines bindings only. Active profile state lives in
zinput.state.