-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alt+q not working in game anymore #1583
Comments
I can confirm this. This seems be caused by SDL2 being able to handle ALT-codes. E.g. pressing So we don't get a |
So is this a bug of SDL 2.26.4 then? Can someone try 2.26.5 (which is now available) if its fixed there? If so, I will update the toolchain again. |
No this is not a bug, it's a feature. We react on text-input events and SDL doesn't give us text until there is text. We could react on key-down events but that would not give us text in some cases. We can only have either Unicode text input or (raw) key press events and we want the former, except for rare cases where we use ALT+key as a combo. So far I've seen that for ALT+q (open quit-window) and ALT+w (close active window) in our usage. I don't really see a solution here that will always work. We could test if ALT+letter-key produces a text input event on any system and if it does not we can react on keydown events when ALT and a letter-key is pressed as-if it was a text-input event. This is actually a limitation of our extra abstraction over SDL: If we'd used SDL directly we are supposed to switch between text mode and "raw" mode depending on the context. I.e. if the cursor is in a text-control we'd enable text-mode and only react on textinput events and otherwise only react on keydown events. But our abstraction only has keydown in the interface so we can't "switch" between those modes and have to choose one. |
Press alt+q in the game. Nothing happens. The following window should be shown.
The text was updated successfully, but these errors were encountered: