Simulator emits button events in wrong order when "rolling" right-to-left or down-to-up

,

Here's the bug :point_right: After further testing, I believe the only issue here is a small bug in the simulator (I'm on Mac OS running simulator version 2.3.1) which causes the synthesized "up" event to come out of order when going from right to left, or down to up, with interleaved press/release (left to right and up to down both work fine). I'll update the title of this thread accordingly.

It might also be worth a little callout explaining the constraints of the d-pad in the docs, since this wasn't obvious at first when simulating inputs with keyboard keys. For details on the tests I did to conclude this, read on…


I tested the same sequence outlined above in the simulator using left/down instead of left/right, and I can confirm that I get the expected results shown above. Press and release of each button corresponds with the physical key press regardless of interleaving and duration of press. So: the synthesized events are simulating the d-pad hardware constraint that prevents opposing buttons from being pressed at the same time.

I also tested using the left/right buttons on hardware, which produces the expected results:

-- press left on d-pad
LEFT DOWN
-- wait 1 second
-- press right on d-pad
LEFT UP
RIGHT DOWN
-- wait 1 second
-- press left on d-pad
RIGHT UP
LEFT DOWN
-- wait 1 second
-- release left button
LEFT UP

Note that the currently pressed button reports its up event before the opposing button reports a down event. This makes sense given the physical constraint, but is not what the simulator produces for left-right and down-up button transitions.