We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5516

Summary: [PATCH] Handle keys already down when keyboard grab starts
Product: SDL Reporter: Cameron Gutman <cameron.gutman>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86   
OS: Windows 10   
Attachments: Patch

Description Cameron Gutman 2021-01-29 02:08:18 UTC
For keys that are already down when we install the keyboard hook, we need to allow the WM_KEYUP/WM_SYSKEYUP message to be processed normally. This ensures that other applications see the key up, which prevents the key from being stuck down from the perspective of other apps when our grab is released.
Comment 2 Sam Lantinga 2021-01-29 16:49:42 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/53ea3e992e58