GNOME Bugzilla – Bug 751721
No release event for shift key when both shift keys were pressed
Last modified: 2015-07-23 16:05:52 UTC
Created attachment 306398 [details] simple app for logging key release event On Windows there is no "key-release-event" when both shift keys were pressed and only one is released. Steps to reproduce: 1. Press right shift 2. Press left shift 3. Release right shift Actual result: no "key-release-event" Expected result: "key-release-event" for the right shift
Created attachment 306513 [details] [review] gdk-win32: Send fake release key event for shift key Windows does not send any release key event for one of the shift keys when both shift keys were pressed together. This commit solves the problem by sending the extra release key event for the shift key which was released as first, when the other shift key is released.
About the use case - in spice-gtk the shift key remains stucked if the release key event is "missing". https://bugs.freedesktop.org/show_bug.cgi?id=77259 https://bugzilla.redhat.com/show_bug.cgi?id=1169286
Created attachment 307977 [details] [review] gdk-win32: Send fake release key event for shift key Windows does not send any release key event for one of the shift keys when both shift keys were pressed together. This commit solves the problem by sending the extra release key event for the shift key which was released as first, when the other shift key is released. Other modifiers (e.g. Ctrl, Alt) do not have this problem. v2: added comment explaining the fix
Review of attachment 307977 [details] [review]: thanks for adding the comment
Pushed as 44608dadc67749df15525b8386f95ad39e48c5ef (3.17.6+)!
And as bb9401f35a873167a1fa91f1913937fbd5ceac30 (3.16.7+)!