wayland: Only clear the key repeat flag when the repeated key is released
If multiple keys were simultaneously depressed and one was being repeated, the repeat flag was being cleared when any of the pressed keys were released, even if the released key wasn't the one being repeated.
This tracks the key currently being repeated and only clears the repeat flag when the particular key being repeated is released.
Fixes #6267
It looks like we potentially need to track repeat for multiple keys.
Here's the output on Windows: ssssssssssssssdddddddddddddddddddddfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfd I pressed S and held it down, while holding S, I pressed and held D. Then I released both keys and held down F and D simultaneously. I'm not sure what X11 does in this case.
X11/XWayland only repeats the last key received. In the case of F and D simultaneously, it just repeats F. This behavior is the same in other applications, as doing this in a terminal or text editor gives you 'dfffffffffff'. This patch makes the Wayland key repeat handling match the X11/XWayland behavior.
Matching the Windows behavior is technically possible in Wayland, as key repeats are handled client side, but then it wouldn't match the X11 behavior. Macs don't seem to support multi-key repeating either.
Matching X11 behavior is the right thing to do here.
Thanks!