pub fn batch_steps(
steps: &[MacroStep],
) -> Vec<(Vec<InjectionCommand>, Duration)>Expand description
Group parsed steps into (commands, delay_after) batches so consecutive
commands dispatch together and only wait boundaries incur a sleep.
Faithful to the source timing: a leading/standalone wait yields an
empty-command batch carrying the delay, and a trailing run of commands
yields a final batch with a zero delay.