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

SDL: don't ignore briefly pressed keys #2553

Merged
merged 1 commit into from
May 2, 2024
Merged

Conversation

dharrington
Copy link
Contributor

@dharrington dharrington commented May 2, 2024

Some keyboards send KEY_DOWN/KEY_UP immediately in
sequence to support things like dual-purpose keys.
This change updates the SDL key handler to detect
when a key is pressed and released within a single
frame, and to propagate that key's state as down
for the duration of the frame, rather than just
drop the event entirely.

Fixes #2156, for SDL

Some keyboards send KEY_DOWN/KEY_UP immediately in
sequence to support things like dual-purpose keys.
This change updates the SDL key handler to detect
when a key is pressed and released within a single
frame, and to propagate that key's state as down
for the duration of the frame, rather than just
drop the event entirely.
@nesbox nesbox added the bug label May 2, 2024
@nesbox nesbox added this to In progress in dev version 1.2 via automation May 2, 2024
@nesbox nesbox merged commit deae9c6 into nesbox:main May 2, 2024
33 checks passed
dev version 1.2 automation moved this from In progress to Done May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

Enter key not working.
2 participants