Fix #1112: simultaneous key presses being dropped#1472
Closed
LunaRood wants to merge 2 commits intoglfw:masterfrom
Closed
Fix #1112: simultaneous key presses being dropped#1472LunaRood wants to merge 2 commits intoglfw:masterfrom
LunaRood wants to merge 2 commits intoglfw:masterfrom
Conversation
This improves the mechanism to check for duplicate key press events, by checking if the event with the same time code actually corresponds to the same key. This will correctly process any key known to GLFW, handling simultanous presses of different keys, while still filtering out duplicate presses of the same key. Note that this still does not properly handle keys that are GLFW_KEY_UNKNOWN, as I am not aware of a good way to check for previous events on those keys.
|
Any progress? I am hitting this on Julia GLFW bindings package |
|
What's the status on this? |
|
Update? I think this is far too simple of a fix for a far too annoying of a bug. |
|
update? |
breadland
approved these changes
Feb 9, 2020
|
Any chance to get this pulled soon? |
CerberPup
approved these changes
Apr 6, 2020
CerberPup
left a comment
There was a problem hiding this comment.
Tested on 6th of April 2020. Fixes issue with simultaneous key press https://bugs.mojang.com/browse/MC-122421 in minecraft 1.15.2
Member
|
Thank you for this PR. This should be fixed now with 9a3664b, which is based on it. |
elmindreda
added a commit
that referenced
this pull request
Jul 16, 2020
Background: The IM will filter out key events, instead sending exact duplicate events that are not filtered. It does not send these for every event, however, so the duplicate events cannot be relied on for key input. Instead we need to identify and discard them. Since they are identical, they have the same timestamp as the originals. The previous duplicate event detection would consume unrelated key events if the keys were pressed simultaneously, as it only tracked a single timestamp. This fixes that issue for any combination of keys, at the expense of a 1 KB array per GLFW window. This fix is a stopgap until explicit IME support is done. Based on #1472 by @LucaRood. Fixes #1112. Fixes #1415. Fixes #1616. Fixes #1663. Closes #1472. (cherry picked from commit 9a3664b)
swarnimarun
pushed a commit
to swarnimarun/glfw-meson
that referenced
this pull request
Jul 9, 2022
Background: The IM will filter out key events, instead sending exact duplicate events that are not filtered. It does not send these for every event, however, so the duplicate events cannot be relied on for key input. Instead we need to identify and discard them. Since they are identical, they have the same timestamp as the originals. The previous duplicate event detection would consume unrelated key events if the keys were pressed simultaneously, as it only tracked a single timestamp. This fixes that issue for any combination of keys, at the expense of a 1 KB array per GLFW window. This fix is a stopgap until explicit IME support is done. Based on glfw#1472 by @LucaRood. Fixes glfw#1112. Fixes glfw#1415. Fixes glfw#1616. Fixes glfw#1663. Closes glfw#1472. (cherry picked from commit 9a3664b)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This improves the mechanism to check for duplicate key press events, by
checking if the event with the same time code actually corresponds to
the same key.
This will correctly process any key known to GLFW, handling simultanous
presses of different keys, while still filtering out duplicate presses
of the same key.
Note that this still does not properly handle keys that are
GLFW_KEY_UNKNOWN, as I am not aware of a good way to check for previous
events on those keys.