Key press input repeats forever after losing window focus
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version
0.5.0 commit b07db84
## Operating system & version
Arch Linux, X11
## What you did
I was making a movable sprite with the WASD and while moving it I clicked on the editor to return to the code and noticed the sprite kept moving in the last direction I was pressing before changing windows. The only way to stop it even after giving focus back to it was by re-pressing those last keys I was keeping pressed.
## What you expected to happen
I expected for key presses to stop as soon as the game window lost focus.
## What actually happened
The paddle continues forever in the direction pressed even when returning focus on the game. It looks like the game is stuck on sending key presses events (might be winit fault and not bevy?)
## Additional information
It can be reproduced on the breakout example (just set a lower paddle speed, like 100, to see it better). Hold Left or Right for 1-2 seconds and click outside the window to give focus to something else.
Contributor guide
Assessment
This issue has not been assessed yet.