Skip to content

Fix Ctrl getting stuck in the GUI after Ctrl+Alt - #5325

Open
Flashmyname wants to merge 1 commit into
multitheftauto:masterfrom
Flashmyname:fix/2609-gui-ctrl-stuck
Open

Fix Ctrl getting stuck in the GUI after Ctrl+Alt#5325
Flashmyname wants to merge 1 commit into
multitheftauto:masterfrom
Flashmyname:fix/2609-gui-ctrl-stuck

Conversation

@Flashmyname

Copy link
Copy Markdown

Fixes #2609.

CLocalGUI::ProcessMessage handles 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".

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pressing CTRL + ALT causes CTRL to be "stuck"

1 participant