| Summary: | Improper/inconsistent handling of double shift key | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Alistair John Strachan <alistair> |
| Component: | events | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus |
| Version: | 2.0.0 | Keywords: | target-2.0.0 |
| Hardware: | x86 | ||
| OS: | Windows 8 | ||
|
Description
Alistair John Strachan
2013-07-11 23:20:34 UTC
(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.) Tagging a bunch of bugs as target-2.0.0, Priority 2. This means we're in the final stretch for an official SDL 2.0.0 release! These are the bugs we really want to fix before shipping if humanly possible. That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.0 release, and generally be organized about what we're aiming to ship. Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment. Thanks! --ryan.
This is apparently some evil in win32; it loses the WM_KEYUP event for one of the shift keys, so SDL never gets it. Not sure why. It seems like this shouldn't be a bug in Windows at this point, so it might have a historical reason.
It's not a hardware limitation, the OS can definitely tell them apart, and if you check with GetKeyState(), it knows that you lifted your finger off the first key, even if it didn't send a KEYUP for it.
So this change...
http://hg.libsdl.org/SDL/rev/65f2b183e2aa
...will now make sure the shift keys are sane at the end of each run through the event loop. This _should_ be lightweight--I hope--because if we check for this in the KEYUP event, it'll fix the problem of the key being stuck forever, but the original key remains stuck until you release the second key, and that's not ideal either.
Marking this fixed. Sam, if doing this in PumpEvents is a bad idea, let me know and we'll do something else.
--ryan.
|