CTRL-key gets stuck

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
Post Reply
StarTraveller
New User
Posts: 5
Joined: Mon Feb 17, 2025 10:20 pm

CTRL-key gets stuck

Post by StarTraveller »

Please fill in this template when posting!
XMBC Version: v2.20.5
Installed or Portable version: Installed
Windows Version: Windows 11 Pro Version 10.0.26100 Build 26100
Mouse Information (brand/model): Logitech G305
Relevant Computer Information (CPU, RAM etc): Intel Core Ultra 7, Z890 Chipset, 48GB RAM
Did the problem occur after an upgrade of XMBC? (If so, from what version?): No
Did the problem occur after a Windows update/upgrade? (If so, from what version?): No
How long have you used XMBC?: At least a year, but this is a new install.
What language and keyboard layout do you use in Windows?: UK English UI and Danish QWERTY keyboard layout.

Clear description of the problem - try and include as much information as possible, including what button and mappings you are having problems with (if applicable).:
I have a Simulated Keystrokes configured for Mouse Button 5 for one particular game executable:
{CTRL}{LMB}
Repeatedly while the button is down
Auto repeat delay: 50 ms
Only send if the profile's process is active
Block original mouse input only if active window matches profile
Randomise auto repeat delay by 10%

I only use Layer 1.

The macro works great and allows me to CTRL-click 20 times a second in a game.
However, since I started using the macro, my computer sometimes leaves the CTRL-key "stuck" in a down state. I've experienced the same issue with two different keyboards, so I'm fairly sure that it's not a keyboard issue, but rather some weird behaviour related to XBMC. It doesn't happen every time, but pressing the mouse button repeated will eventually trigger the stuck CTRL-key.
User avatar
phil
Site Admin
Posts: 7861
Joined: Sun Apr 06, 2003 11:12 pm

Re: CTRL-key gets stuck

Post by phil »

Yes, I see this occasionally too, and in 4 years, I haven't found the problem in XMBC (I'm sure its there somewhere, or maybe its in the Windows API that XMBC uses - which would be a problem). Either way, I can confirm such a problem exists, but at the same time, don't expect a fix any time soon. Hitting the physical key fixes it (I know that's a pain) and short if a miracle in a) finding enough time to devote to debugging and then b) finding the source of the problem.

I will say, that if you can capture debug logging when it happens, it might help (but I doubt it as Ive done that several times and it hasn't sown anything of any use). The biggest problem I have is reproducing it, its pretty random for me, and only seems to go wrong when I'm actually working or doing something that means I don't have any time to switch to XMBC hobby mode!)
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
StarTraveller
New User
Posts: 5
Joined: Mon Feb 17, 2025 10:20 pm

Re: CTRL-key gets stuck

Post by StarTraveller »

I will see what I can do. I can reproduce it in seconds, so logging it should be simple. I just have to find the logging settings. :D

Since I use this for a game, I'm always in hobby mode, hehe. Unfortunately, pressing CTRL at the wrong time often leads to very deadly situations in the game. :lol:
User avatar
phil
Site Admin
Posts: 7861
Joined: Sun Apr 06, 2003 11:12 pm

Re: CTRL-key gets stuck

Post by phil »

debug logging can be turned on in the settings -> logging and updates....
But the best thing to do, is to setup a global hotkey to enable debugging. In recent versions 2.20 onwards I think, certainly the latest beta's when you enable debug logging, it actually dumps the last 100 or so messages from memory to disk - so generally you can leave it disabled (its very verbose) and then when it goes wrong, toggle it on/off and the chances are it will capture something.

The problem is I don't think (in my experience) it will capture the problem (at least not in enough detail) but its a start!!!

Also worth noting that the beta versions log a little bit more and are much more recent so the debug messages relate more to the current code base, so running the latest beta is almost a requirement to diagnose this! A lot of minor changes have gone in over the last two years, some to try and find this (it hasn't really helped - at least I don't think so, but I haven't noticed it so much recently so maybe it has helped, I just don't *think so*)
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
StarTraveller
New User
Posts: 5
Joined: Mon Feb 17, 2025 10:20 pm

Re: CTRL-key gets stuck

Post by StarTraveller »

I have a log file for you. What's the easiest way to send it to you?

The log file was recorded while both CTRL and LMB got "stucked" by the simulated keys.
User avatar
phil
Site Admin
Posts: 7861
Joined: Sun Apr 06, 2003 11:12 pm

Re: CTRL-key gets stuck

Post by phil »

You can send it via PM here or by email phil@ and the same domain name as this website.
But let me know if you email in in case it gets spammed (I get sooo much spam, the filters are quite aggressive!)
I'm away this weekend so I may not get a chance to look at it immediately.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
StarTraveller
New User
Posts: 5
Joined: Mon Feb 17, 2025 10:20 pm

Re: CTRL-key gets stuck

Post by StarTraveller »

I'm sure that I'm just being impatient and annoying, :lol: but did you get a chance to see if anything in log file can help identify the issue?
User avatar
phil
Site Admin
Posts: 7861
Joined: Sun Apr 06, 2003 11:12 pm

Re: CTRL-key gets stuck

Post by phil »

Sorry haven't had a chance to even look at the logs yet - I got a tonne of things I need to look at (and was away last weekend which didn't help)
I'm hoping I might find some time this weekend.... Although I just ordered some new computer parts (9950x3d) so that might take my priority first (sorry!!)
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
User avatar
phil
Site Admin
Posts: 7861
Joined: Sun Apr 06, 2003 11:12 pm

Re: CTRL-key gets stuck

Post by phil »

OK I just had a quick look.... And the log might be useful!!

When you release the button, it aborts the timer and flushes the queue. The problem is, it flushes the queue just after the pressed the CTRL key...
And it never releases the control key, as the queue of things to do is flushed (thrown away).

So it explains what is going on - which is a really good first step. Fixing it however if going to be quite tricky... and it needs to work out where it has got to in the sequence (probably easy for {CTRL}{LMB} but for more complex macros - arghhh, my head hurts already!!), and then undo (unpress) only what it has done (pressed).

Could you possibly send me a copy of your whole profile (I probably don't need it but it is always useful to try and recreate the situation here - as if I can repeat it, its more likely I can test any fix I figure out). Use the "Save Profile" button and PM me a copy of the resulting xmbcs file.

But warning, its going to need me to find some significant time to invest into figuring this one out so I cant promise any quick fix. I can promise that its on the bug list and will need to be fixed before I release 2.21!
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
User avatar
phil
Site Admin
Posts: 7861
Joined: Sun Apr 06, 2003 11:12 pm

Re: CTRL-key gets stuck

Post by phil »

Actually, I think I may have already fixed this in the latest beta.
So if you could try that, please do! See if it fixes the problem for you - and let me know either way please!
If it still happens, debug log from the latest bet6a would be very useful (as it ties in with the current code base more - and there is extra logging in this area, as a result of probably trying to fix the problem already!!)
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
Shiser
New User
Posts: 6
Joined: Sat Mar 15, 2025 4:36 am

Re: CTRL-key gets stuck

Post by Shiser »

This has been happening to me fairly regularly too, for years, and I seem to have a different use case from you guys (hold down RMB = hold down {CTRL}, then while doing so any number of additional buttons to combo with it, either naturally—scroll wheel up/down to zoom webpage, or simulated—MB4/5={LEFT}{RIGHT}) and I'm on Windows 10. Unfortunately, I can't quite reproduce it at will, but I will keep an eye out and see if it happens to me again now that I've updated to the newest beta, and let you know.
User avatar
phil
Site Admin
Posts: 7861
Joined: Sun Apr 06, 2003 11:12 pm

Re: CTRL-key gets stuck

Post by phil »

I have just published 2.21 Beta 41 where I think I may have found and fixed this issue properly.
viewtopic.php?p=26215#p26215

Please try it, and let me know how you get on - does it fix the problem. If not, please enable debug logging and send me the log (as there is far more logging enabled in this area in this beta). Also if it fails, make a note of the time roughly that it goes wrong so I can narrow it down in the log file.

Regards,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
Post Reply