Fix Ctrl getting stuck in the GUI after Ctrl+Alt - #5325
Open
Flashmyname wants to merge 1 commit into
Open
Conversation
Forward the Control and Shift system key messages to the GUI as well, so a modifier released while Alt is held does not stay set for it. Fixes multitheftauto#2609.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2609.
CLocalGUI::ProcessMessagehandles WM_KEYDOWN/WM_KEYUP but not the WM_SYSKEY* pair. Windows uses those while Alt is held, so releasing Ctrl before Alt means CEGUI never gets the keyup and keeps Ctrl flagged as down. Next letter typed into the console or a gui edit box is treated as Ctrl+letter.Added Ctrl and Shift to that switch. Both return false, so Alt+F4, Alt+Enter etc. still go through to the window.
Repro: edit box focused, hold Ctrl, tap Alt, release Ctrl, release Alt, type "ax" -> box ends up empty (Ctrl+A then Ctrl+X). With the fix you get "ax".