Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key Repeating? #291

Closed
AstraLuma opened this issue Jun 11, 2019 · 6 comments
Closed

Key Repeating? #291

AstraLuma opened this issue Jun 11, 2019 · 6 comments
Labels
discussion Issues that more just discussing than specific flaws or features

Comments

@AstraLuma
Copy link
Member

So, apparently some uncommon setups will produce multiple KeyPressed events before their matching KeyReleased event.

I feel like we should filter these? KeyPressed/KeyReleased are meant to be fairly direct: they are indicators of the physical keys and aren't suitable for text processing. (Key repeating is a standard thing in text contexts.)

If holding a key repeats an action, that should be a thing controlled by the game (since it's a game balance knob). It also can cause bugs in code not expecting it (eg, the key->motion code in our demos).

@AstraLuma AstraLuma added the discussion Issues that more just discussing than specific flaws or features label Jun 11, 2019
@AstraLuma
Copy link
Member Author

Again, key repeating:

  • Text input: 👍
  • Game controls: 👎

@pathunstrom
Copy link
Collaborator

I guess, historical note: The old school NES Advantage had a turbo button that did this. It's just a feature some keyboard and input devices have and I'd rather not futz with end user expectations by filtering their input.

@AstraLuma
Copy link
Member Author

Wait, did they just smash a virtual key while still properly sequencing events? Or is there a problem where pressed and released events aren't properly paired?

@pathunstrom
Copy link
Collaborator

In my experience with key repeats causing issues in PyGame: They aren't paired.

@AstraLuma
Copy link
Member Author

Yeah, it's not that I want to disable key repeating or accessibility stuff, I just want to make sure the events are properly paired.

@AstraLuma
Copy link
Member Author

Closing this as the assumption is that text input will be a whole other set of events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Issues that more just discussing than specific flaws or features
Projects
None yet
Development

No branches or pull requests

2 participants