Expand description
Scripted input for headless runs (--input), mirrored by runners/web/headless.mjs.
Items are FRAMES:ACTION, comma-separated (commas inside quotes or parentheses
don’t split). FRAMES is N or FROM-TO (inclusive). Actions:
A+B+STARTvirtual pad 1 buttons"text"typed text on frame N (escapes\nenter,\bbackspace,\\,\")KEY(ShiftLeft+ArrowLeft)raw keys held (W3C names); press/release events come from the changes between framesPTR(x,y)/PTR(x,y,L+R)pointer position in drawable pixels and buttons (L R M BACK FWD); the position stays where the last item put itMOVE(dx,dy)relative motion,WHEEL(x,y)wheel, per frameGP0(B0+B9+A1=0.5)gamepad slot 0-3: buttons by index, axesAn=value; slots that appear anywhere in the script are connected (standard mapping)
Numbers are plain decimals (no hex, inf or nan). All arithmetic is done in f64 and rounded to f32 once, exactly like the JS runner (input-script.mjs), which accepts and rejects the same scripts.
Structs§
- Script
- Script
State - Carried between frames: previous keys, pointer position and buttons.