Builtin Library
README.md
inputSim.recordMacro
Record live input over a window of time on all three device classes, emitting a timed event whenever something changes. It reads what every device is holding each frame (keys, mouse buttons, pad buttons, the pad itself, fingers on the glass) and what each one is measuring every sampleInterval seconds (mouse motion, the wheel, thumbsticks, triggers, a sliding contact). It returns the captured events array plus the task handle so the caller can cancel early, and stops on its own after duration seconds elapse or when the optional until_ predicate answers true. It takes those arguments the way every verb in this toolbox does, positionally, how long first, so recordMacro(3.0) records for three seconds and recordMacro(3.0, 0.02) samples that window more finely. The result works for any input-driven scenario, a player walk, a car drive, a pad rhythm or a UI flow, and can be replayed immediately with inputSim.macro or persisted with inputSim.saveMacro.