Something causes the left Alt key to be 'stuck'

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.


This post seems to be related, so I am attempting the fix suggested there. (Despite the fact that I have version 15.0.268 installed.)

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 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.

Thanks for having a look,

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.

Hi @Adam_Baker, thanks for those log files and the detailed description. I’ll take a look soon alongside @ross – it may take us a few days to work through it.

@Adam_Baker I did not get to this today. I am now away for a week. So I will hope to look at it after that. Thank you for the log files it should really help with the problem-solving.

I’ve created an issue on GitHub for hits.

I’ve been having exactly the same issue for several weeks, even after updating to the latest version of Keyman. It affects all my Keyman keyboards. Tapping the alt key toggles it off for one character, and then it locks on again. It happens inconsistently; sometimes I can use the keyboards fine for extended periods and then it’ll just lock alt unpredictably. I’m running Windows 11 Developer Preview.

Just an update - I can see in the logs provided that when the key events get processed the ALT key up and ALT key down events are out of order when the problem occurs. This is why the modifier LALT key stays down. It has pointed me at the place to investigate further. Unfortunately, I haven’t been able to reproduce it myself. I Will keep digging.

@Adam_Baker I think I now have a good lead from your logs on where the problem lies. However, if you are able to provide a diagnostic report following the steps here that would give us even more information, to help resolve this issue.

P.S I should add turning off serialized input should resolve the issue, with the trade off it may make rapid input with Keyman slightly less reliable.

To disable Keyman’s serialized input:

  1. Open Keyman Configuration
  2. Select Options / Keyman System Settings
  3. For engine.compatibility.serialize_input, enter the value 0.

  1. Click Apply, Close, and then restart Keyman

I submitted that diagnostic information, and it gave me case #6780 (in case that helps you find it.)

Thank you for that fix. I will try changing that setting. I’ll let you know either way. Just at the moment Keyman isn’t switching keyboards for me at all, so I will need to sort that out before I know if your fix worked for me.

Okay, so far so good. It’ll probably be a week or two before I feel confident that the problem is gone for good, because it was somewhat intermittent. I’ll post an update after that time—or sooner if the problem reappears.

Thanks for your help!

Yep, this seems to have fixed it. It’s been about two weeks, and no recurrence of the problem. Thanks!

1 Like

Hello @Adam_Baker,
I am just letting you know that Keyman version 16.0.127-beta has a change that should the fix left alt key “sticking” on for you. Meaning you should be able to run this version with the serialized input flag turned back on.

This topic will close in three weeks. Feel free to add more comments or suggestions or ask follow-up questions before then. :slight_smile:

This topic was automatically closed after 21 days. New replies are no longer allowed.