Issues with Keyman after resuming the computer from Sleep mode

I have been having some issues with Keyman as follows: when I put my laptop into sleep mode and then ‘re-awaken’ the computer. Whatever keyboard is selected at the time that I put the laptop into sleep, when it is switched back on, the keyboard reverts to the most recently chosen Keyman keyboard.

My laptop is a Dell computer running Windows 10 Enterprise.

A couple of questions:

  • Which version of Keyman are you running?
  • What is the default Windows keyboard on your computer?

We might find it helpful to get a diagnostic report as well – https://help.keyman.com/kb/40 explains how to do this

Marc, thank you
As best I can tell I’m running Version 14.0 of Keyman. That’s what it says when I go to the help menu. I downloaded 14.0.274.exe in May and that is the version I’m using
I don’t know how I find out what is the default windows keyboard, it might be English with US Keyboard.

What I can report is that every time I awaken the computer from sleep after using a Keyman keyboard, it reverts to the most recently used Keyman keyboard. I have delayed responding to you for a while to test this out with a number of different Keyman keyboard, and it seems to be always the last one that the computer reverts to. The only way that I have so far been able to overcome this is to close Keyman completely AND restart the computer. I will now try to do the diagnostic report.

The exact version of Keyman can be found under Support tab in the Configuration (Keyman Configuration). You can also choose to check for updates on the tab as well.

I downloaded 14.0.274.exe in May and that is the version I’m using
I don’t know how I find out what is the default windows keyboard, it might be English with US Keyboard.

In Windows, usually, the first keyboard on the list of keyboards under Preferred languages in Windows’ language preferences (see the screenshot below).

And that should correspond with the keyboard chosen here:

Okay, so that’s not quite what I understood from your first message. I’m trying to get a clear picture of what you are experiencing here. From your comment, I am hearing that you find that you cannot switch Keyman keyboards after resuming from sleep. Is that accurate?

Another question: is your computer going to sleep or hibernating? (note: if hibernating, it means the system state is stored to disk and power is switched off completely; sleep means that the computer is still using a small amount of power to keep state in memory. To tell the difference, when hibernating, you’ll see the spinning dots of the Windows startup when you awaken the computer as it restores from disk.)

@makara are you able to repro this at all?

I can usually switch keyboards back to the default Microsoft keyboard after resuming from ‘sleep’. My computer only gives me the option of ‘sleep’, ‘shut down’ or ‘restart’. However if I put the computer into sleep more than a few times without closing down Keyman first, then eventually I’m unable to operate the computer without restarting. Sometimes what happens is what is shown in this screen shot. After resuming from sleep, although it showed the English keyboard as being in place, when I tried to type You (for Youtube) into the Google search, instead the most recently used folder in Windows explorer popped up. I was able to overcome this by closing Keyman. Does this help to explain the problem?
image

As a further response, I just put my laptop into sleep mode, with the ENG Microsoft keyboard selected, but coming back out of sleep (not hibernate), the keyman keyboard has automatically taken over

Thanks for the quick reply. I think there are two things going on here:

  1. Sticky modifier keys
  2. Multiple keyboard layouts (input methods) assigned to Windows default language of en-us.

Sticky modifier keys

I wonder if the sticky keys issue you experienced previously may be part of the issue – the workaround that we discussed earlier should address the problem with typing You and having the open dialog popping up.

Note: we attempted a fix for sticky modifier keys with 14.0.275 but it had some issues for some users, so we rolled it back in 14.0.276 until we could find a more solid solution. If you want to try it, there is a way to turn that option back on with 14.0.276 and later: see Hotkeys using ALT don't work - #2 by Marc, but set the value to 0 rather than 1!

Multiple input methods for en-us

The selection of the Keyman keyboard seems to be separate to the sticky modifier keys issue. This may be an issue with Windows – if you have multiple input methods for a single language, then Windows can choose any of the input methods when that language is activated. What I saw in your diagnostic report is:

  1. US English is your default language
  2. You have 6 keyboards associated with US English.

So when resuming from sleep, Windows may be selecting US English on wake, which would then select the last active Keyman keyboard that is associated with US English.

If you wanted to validate this, try: (1) select US English / English keyboard, then (2) select, say, Hieroglyphics. I think if you sleep and wake the computer, you’d find it waking in US English / English keyboard.

To resolve this, I can see two options:

  1. You could try changing your default language to English (Australia) by dragging the English (Australia) entry up in the list in Windows language preferences (per @makara’s screenshot).

  2. Alternatively, you could try assigning your keyboards to alternate languages in Keyman Configuration – noting that Windows only allows a maximum of 4 “custom” language codes for languages it does not specifically recognise, so this might be limiting in your case, as from your diagnostic report I see you have a number of keyboards installed for languages that fit into that category.

    You could remove the English (US) entries from each keyboard in Keyman Configuration, and add, say, English (Australia).

@Marc Here is what I notice when trying to repro the behavior.

  1. When going to sleep with a non-Keyman keyboard or a Keyman keyboard whose language tag is other than en-US, the Windows default keyboard (ENG) is enabled and ready to be used automatically upon waking up and locking back in. The keyboard is working and there is no issue to switch between keyboards (i.e. from ENG to any Keyman keyboard or any other non-Keyman keyboard).

  2. However, when going to sleep with a Keyman keyboard whose language tag is en-US (i.e. Pyidaungsu MM-2.5.kmp), this same keyboard is enabled (see screenshot below) and the output would be all in Burmese. At this point, you can switch to any keyboard without any issue.
    image

Tested on Windows 10 Pro 21H1 with Keyman for Windows 14.0.277. Just in case, here is my diag report after testing the above.

Dear Marc and Makara

First of all apologies for the long delay in responding. But I finally found some time to check out your suggestion: (1) select US English / English keyboard, then (2) select, say, Hieroglyphics. I think if you sleep and wake the computer, you’d find it waking in US English / English keyboard.

This is exactly what happened; it did wake to US English.

I’ve realised that the keyboards it was waking to - created for the Tangsa script, for the Tai Phake and other Tai or for Wancho - are all recently created keyboards, and it may be that when they were created they have been created with an automatic US English ‘setting’ (for want of a better word, I’m a fair way out of my depth here - and I haven’t created these Keyman keyboards).

My main concern in raising this is that my colleagues in India and Myanmar might be facing these difficulties too, but I haven’t heard anybody mention it, and that might be because they all have their default keyboards switched to Indian English and therefore no problem. So I will try to work out how to switch my default to Australian English and see what happens. Thank you both, yet again.
Stephen

Further to the previous email; I switched the default, restarted the computer, now with Australian English as my chosen language, then switched to one of the Keyboards, switched back, put the computer to sleep, woke it up, and as you both predicted, it did not revert to the keyman keyboard. Thank you.

1 Like

Thanks for updating us @StephenMorey – I’m glad that this mitigation works for you. I have since confirmed with a Microsoft developer that having multiple keyboards associated with the default Windows language does lead to this confusing situation. We’ll keep an eye on this and perhaps update our documentation to warn against doing this.

Thanks again Marc. I will forward this discussion to my colleague who makes the Keyman Keyboards, because if the Keyman keyboards are disassociated from English (US) this problem wouldn’t happen, I guess. So thanks!