input
Input tab for the System Tools panel — Zin.profile picker +
interactive rebinding for every action and axis in the active
profile. Each row carries inline [Rebind] / [+] / [−] buttons;
pressing [Rebind] enters click-to-capture mode (next keyboard or
mouse event becomes the new binding; Esc cancels). Save-as creates a
new user profile snapshot; Save-changes writes the edited registry
back to the active user profile JSON. Export / Import operate on
explicit VFS paths.
Refreshes at 5 Hz so live "(firing)" indicators on actions and live axis-value readouts update without blocking on a session.
This tab reads the Zin.profile registry — named actions and axes
carrying keyboard-and-mouse bindings. The live controls a world's
components subscribe to are the maps Zin.scheme.live() reports and the
inputSim toolbox's bindings lists.
Exports
M.label: string—"Input".M.refresh: number—0.2(5 Hz).M.onMount(state)— prime the profile-list cache so the first frame isn't a blank shell.M.build(state) -> any— build the Input widget tree.M.onCallback(callbackId: string, data: any, state) -> boolean— handle every binding / save / export / conflict event.
Types:
InputState = any— shell-owned tab state (unused; cache is module-scoped).
Usage
-- Registered by system_tools/init.luau:
local Input = require("@builtin::modules.engine.editor.system_tools.tabs.input")
TABS.input = Input
Notes
- Capture sessions are exclusive — starting a new
[Rebind]cancels any in-flight session viaendSession(nil)so stale captures can't commit silently. - Conflicts default to showing only
kind == "real"rows so action+axis and cross-context overlaps stay out of the default view; the "Show N intentional" toggle expands to the full audit. - Built-in profiles (currently just
"default") can't be overwritten —Save changesis hidden on them; users mustSave as…to branch. - Mark-intentional callback ids use the
~~separator (syin-mark-intent~~<a>~~<b>) to avoid action-name dash collisions.
Scoped to this part · feeds back into the world's score.