Inputs are not processed correctly if key repeat rate is faster than FPS #5909
Closed
Description
Bevy version
0.8.1
[Optional] Relevant system information
Mac OS Monterey 12.5.1
`AdapterInfo { name: "AMD Radeon Pro 5500M", vendor: 0, device: 0, device_type: DiscreteGpu, backend: Metal }`
What you did
I have my key repeat rate set faster than normal, by following this StackOverflow thread, specifically:
defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)
What went wrong
When I am running any Bevy game where FPS is locked (via PresentMode::Fifo or VsyncAuto), input seems to buffer up, so that when I release e.g. the arrow key, the character keeps moving for several seconds.
If I change the KeyRepeat back:
defaults write -g KeyRepeat -int 2
Then this does not happen (although there is still a tiny bit of lag, see #3317)
Additional information
When I set PresentMode::Immediate
it mostly works as expected, although some times the FPS is still locked to screen refresh rate, though that is a separate issue (And in these cases, the exact same problem as described above is present).