mtasa-blue
mtasa-blue copied to clipboard
Pressing CTRL + ALT causes CTRL to be "stuck"
Describe the bug
When pressing a combination of the following:
- LCTRL or RCTRL
- LALT or RALT
It will (pretty) consistently cause the CTRL key to get stuck in a "pressed" state.
If the CTRL key is pressed first, and then ALT, and they are not released by the next frame then this issue will occur almost every time.
This does not seem to happen at all if the ALT key is pressed first then CTRL, and they are released on or before the next frame. If they are held down for longer than this, the issue will occur almost every time.
As an example, when the issue is reproduced and the CTRL key is "stuck", pressing the a
key would select all the text (CTRL + A) and then type an a
character on the same frame - which results in the entire text being replace with just "a".
Pressing the v
key would paste anything you have in your clipboard (CTRL + V) and then type a v
character on the same frame.
I believe this could be related to CKeyBinds::IsFakeCtrl_L
- although it needs looking into further. It would explain why both left & right CTRL/ALT are interchangeable in reproducing the issue, as they are each defined as VK_CONTROL
and VK_MENU
respectively.
This is only currently known to affect CEGUI input. It does not affect ingame controls, chatbox or CEF.
Steps to reproduce
- Open F8 console
- Type something random
- Hold down CTRL, then press ALT
- Press the
a
key - the console input will be replaced with "a"
Version
Client: Multi Theft Auto v1.5.9-release-21166
Additional context
According to another user, this has been happening for years - so unless someone is aware of anything in the past that may have caused this, we likely won't narrow it down to a specific build
Relevant log output
No response
Security Policy
- [X] I have read and understood the Security Policy and this issue is not security related.
I started with MTA in 2011 or so, it must have been an issue from the start but it suprises me that no one else had a problem with this yet - however even i didnt bother to report it all that time
Also noticed this a long time ago, not only in MTA but also in other games aswell. As you said, when you press CTRL, then tab out and tab back in, the key behaves as it still be pressed, pressing it once again solves it. Easily noticable in games/apps running in window mode. Not sure if you could "easily" fix that as the app/game might not be able to track keyboard inputs when window loses focus.