Quite frequently, when I switch between keyboards, something causes the left Alt key to be stuck down. This is at the software level: if I open the on-screen keyboard the left Alt key is purple instead of dark gray. Can anyone suggest what might be causing this? I’ve tried to pay attention to what key I might be hitting by mistake, but I can’t notice a pattern.
This is Windows 11. I’ve disabled every setting I can find to do with sticky keys.
My keyboard-switching shortcuts are Ctrl-Shift-1, Ctrl-Shift-2, etc.
That’s curious. So you are consistently using Ctrl+Shift+1, Ctrl+Shift+2 etc to switch keyboards, not Alt+Left Shift or Win+Space? Have you setup these language hotkeys in Keyman or are you using Windows language hotkeys?
First, I realized I was mistaken about my hot keys: they are Ctrl+1, Ctrl+2, etc. (I use them because I use several different keyboards and so it’s awkward to cycle through them.)
Yes, they’re set up in Keyman.
Following the suggestion of the post I linked above, I tried changing the engine.compatibility.old_cached_hotkey_modifier_state value to 0, and I still get the same problem. (Including after restarting Windows.)
OK, I’m not sure what is going on. If it happens regularly enough, you may be able to capture a debug log that reproduces the problem using the steps at https://help.keyman.com/knowledge-base/76 and share it with us – but be aware that (a) the log files grow really fast, and (b) they capture every keystroke – even when Keyman is not switched on – because they capture hotkey events etc too.
I had this problem again and fortunately was able to follow the debug steps. I put the file in Google Drive.
I got the sticky alt key several times here. I was typing in Excel, switching between my English keyboard and my IPA keyboard. The most recent one was when I was trying to type [bʌl] with the keystrokes “b u > l”. I typed “finished” after I had replicated it.
Here is a lot with another instance of the same problem (or a related one).
It’s a bit of a long file, because it took a while for it to start happening.
When I switched to a Persian keyboard (with Ctrl+3, as I’ve configured it it on my computer), and then pressed a letter key, the Alt key would depress. In this case the letter key was K_QUOTE (which for a Farsi keyboard is a letter: گ).
(I could see that Alt was being pressed on the Keyman on-screen keyboard. Also of course Excel started redirecting my input to the menu, as if I were doing Alt- shortcuts).
This occurs toward the end of the log file. When I noticed that it happened, I typed “it’s doing it now”. Then I replicated the behavior one or two times after that before stopping the log.