Builtin Library
README.md
default.inputMap
The engine's standard control scheme, and the map a world activates for a
player who is the one moving. Its group is player, so a map that names
that group — vehicle.inputMap does — stands these controls down for as
long as it is live.
Controls
The <name>.inputBinding/ folders beside init.luau are the controls. A
component activates the map and subscribes to the ones it drives:
| Control | Kind | kbm | gamepad | touch |
|---|---|---|---|---|
move | axis2 | WASD | left stick | left stick |
look | axis2 | mouse delta | right stick | right drag zone |
jump | button | Space | south | button |
sprint | button | Shift | left stick click | button |
crouch | button | Ctrl | east | button |
interact | button | E | west | button |
zoom | axis1 | wheel | shoulders | pinch |
pointerLock | button | Escape | — | — |
lookDrag | button | right mouse | — | — |
pointerLock and lookDrag refuse gamepad and touch outright, in the
record where a reader sees it: capture belongs to a cursor, and a stick or
a dragging finger says it is steering by being pushed at all.
Vertical movement lives in flight.inputMap, which composes beside this
one and belongs to the same player group. Driving lives in
vehicle.inputMap, which stands this group down while somebody has the
wheel.
Compatibility registry
The actions / axes tables in init.luau are the registry read by
Zin.actions / Zin.axes. They are keyboard and mouse only, and they are
what keeps a world written against Zin.actions.held(...) working.
The engine's standard control scheme. Every action and axis carries explicit
kbm bindings; movement, look, and the primary held actions (sprint, crouch,
jump, vehicle brake) also carry explicit touch bindings so the scheme works
identically on a phone with no synthesis needed.
- Movement —
move(WASD, or the left virtual stick on touch),move_vertical(Space/Ctrl, kbm-only — no vertical touch stick in this scheme). - Fly —
fly_up(E/Space) andfly_down(Q/ShiftLeft), kbm-only with touch synthesis suppressed — fly-camera vertical movement for controllers that read actions rather than themove_verticalaxis. - Look —
look(mouse delta on kbm, the right drag zone on touch), pluslook_x/look_ysingle-axis kbm variants for controllers that want one component.look's gate passes on pointer-lock or held right-mouse-button (kbm), OR whenever the touch drag zone is producing input — a phone has neither a locked pointer nor a right mouse button, so the touch path needs no arming gesture. - Held actions —
sprint,crouch,jumpeach carry aright-lowerzonetouchButtonalongside their kbm keys. - Zoom —
scroll_y(wheel on kbm, the two-finger pinch delta on touch). - Vehicle context —
vehicle_throttle/vehicle_reverse/vehicle_steer/vehicle_brake, active only while the"vehicle"input context is pushed.
Activating any OTHER map's axis with a touch class beyond its primary
registers a <axis>@<class> sibling axis (e.g. look@touch) — this map's
own look axis carries an explicit touch binding, so it follows the same
convention once flattened by Zin.map.activate.
Zin.map.ensureActive() activates this map when no other map is active —
it is the map every kbm-only world already runs, now carrying its explicit
touch classes for phones and tablets. This is also the map a cold
Zin.actions / Zin.axes read activates automatically, so any world
reading actions plays with zero setup.