PuzzleScriptPlus icon indicating copy to clipboard operation
PuzzleScriptPlus copied to clipboard

Sometimes inputs are fired twice consistently

Open Auroriax opened this issue 1 year ago • 1 comments

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

  1. TODO
  2. TODO
  3. 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.

Auroriax avatar Jun 29 '23 19:06 Auroriax

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.

david-pfx avatar Jun 30 '23 02:06 david-pfx