| Summary: | SDL Keyboard events missing when certain key combinations are present | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Leeor Dicker <leeor_net> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.0 | ||
| Hardware: | x86 | ||
| OS: | Windows 7 | ||
|
Description
Leeor Dicker
2013-07-29 00:53:31 UTC
I'm pretty sure that it's the hardware issue described here: http://www.sjbaker.org/wiki/index.php?title=Keyboards_Are_Evil If these key combinations work with other programs with the same hardware, please reopen this bug! That was my first thought (and I agree that keyboards produced that way are evil)... until I got the annoying "key is being leaned on" beep that Windows is so fond of producing. So there are in fact key events that are being generated, but for whatever reason SDL is not catching them. I checked a couple of other programs that are not SDL based or even games and the same key combinations are producing events (e.g., arrow keys held with a spacebar tap shows a spacebar) with no beeping. To be clear, I've implemented a DooM style of control system (arrow keys move a character around, space bar fires a weapon) which is when I came across this issue. I don't remember if it was a problem with SDL 1.2 but I'm pretty sure I've had other apps I've run with SDL 1.2 without running into this problem using the same methods I'm using here (SDL_PollEvent calls) vs. getting keydown states. I have another mapping that does work (WASD/SPACE) without issue but it feels weird... plus I'd like to allow for key customization. I tend to prefer event-driven approaches vs. getting hardware states but I have a sneaking suspicion that even if I queried key-states I would see that the spacebar is not being pressed with the above stated key combinations regardless. I'm somewhat unfamiliar with SDL's code which is why I haven't attempted to look into it myself. I'll let you decide if this is something worth looking into further. Confirmed that querying key states shows no detection of space pressed during certain key combinations. Okay, I think I can make a final note on this. I dug deeper into this using SPY++ to inspect events that are sent to an application. Turns out the application built with SDL doesn't get key events from the space bar when certain other keys are pressed. This ALSO happens across other programs as well. I guess that leaves this is a hardware/software issue. Maybe now we need to tell the keyboard manufacturers to fix their flawed designs? ;) Great, thanks for investigating! :) |