PuzzleScriptPlus
PuzzleScriptPlus copied to clipboard
Sometimes inputs are fired twice consistently
Describe the bug In some cases the game catches input twice per keypress. I've seen this in some games uploaded to Itch as well as when someone did a screen share. It's annoying! Haven´t managed to reproduce consistently yet, it seems to have something to do with focus?
Reproduction Steps
- TODO
- TODO
- TODO
What did you expect would happen? No double presses
OS & Browser version, desktop/mobile Windows 10 Firefox
Screenshots, example projects, other relevant issues, etc. It reproduced for me in https://potomax.itch.io/7segments but also in my own games via the share link.
This has been a problem for me like forever, and is on my list to fix. The reason is that PS relies on KeyUp to stop generating keystrokes, and if KeyUp is delayed you can get multiple inputs. I find it happens often, but varies from game to game.
IMO the solution has to be to stop using KeyUp, but I don't know enough yet to propose an alternative.