mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Pressing CTRL + ALT causes CTRL to be "stuck"

Open Lpsd opened this issue 2 years ago • 2 comments

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

  1. Open F8 console
  2. Type something random
  3. Hold down CTRL, then press ALT
  4. 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.

Lpsd avatar Apr 27 '22 17:04 Lpsd

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

Einheit-101 avatar Apr 27 '22 18:04 Einheit-101

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.

ffsPLASMA avatar May 02 '22 14:05 ffsPLASMA