| Summary: | TextInput events not fired while ctrl is held | ||
|---|---|---|---|
| Product: | SDL | Reporter: | keith |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.10 | ||
| Hardware: | x86_64 | ||
| OS: | Windows 10 | ||
|
Description
keith
2020-03-14 00:16:15 UTC
I've seen some reports that maybe on non windows platforms, the events will work as expected? I have no way of confirming either way. In general text input events are for ... text. Ctrl+button usually doesn't create printable text. If you want to handle Ctrl+key bindings, I recommend using keycodes instead of text input for your bindings. This doesn't work in a crossplatform way. In the example I gave, there is no way with the current keybinding events to handle control-^. I could hard code that I expect ctrl + shift + the 6 keycode, but this will only work with qwerty layouts. For other layouts this will mess up the keybinding. Today there is no crossplatform way to handle ctrl + modified key text for windows. That's correct. Ctrl-^ doesn't exist. You can check for that text event while Ctrl is held down, but that's not the same thing, and on some keyboards, holding down Ctrl while pressing those keys won't even generate that text. |