Driving stepper for specific steps but other button inputs ignored

Here's a MobaTools built-in example implemented in Wokwi that drives a stepper for specific steps while not ignoring other inputs: