keyman
keyman copied to clipboard
bug(windows): Keyboard Display Name Shows Wrong Region
Describe the bug
When installing two keyboard for the same language, but different region, the display name in the keyboard selection menu shows the region name the keyboard installed first on both keyboards.
For example, when installing the GFF Tigrinya Ethiopia, and GFF Tigrinya Eritrea keyboards, both will appear with the name "Tigrinya (Ethiopia)" , when the Ethiopian version is installed first. Conversely, the display name for both will be "Tigrinya (Eritrea)" if the Eritrean version is installed first.
The correct keyboard icon and typing behavior works as expected despite the incorrect name.
Reproduce the bug
No response
Expected behavior
The respective names should be displayed.
Related issues
No response
Keyman apps
- [ ] Keyman for Android
- [ ] Keyman for iPhone and iPad
- [ ] Keyman for Linux
- [ ] Keyman for macOS
- [X] Keyman for Windows
- [ ] Keyman Developer
- [ ] KeymanWeb
- [ ] Other - give details at bottom of form
Keyman version
16.0.139
Operating system
Windows 11 Pro (22621.1702)
Device
laptop
Target application
N/A
Browser
N/A
Keyboard name
gff_tigrinya_eritrea , gff_tigrinya_ethiopia
Keyboard version
2.x
Language name
Tigrinya Ethiopia , Tigrinya Eritrea
Additional context
I'll add a link later to download the current packages that I am working with.
Links to keyboard packages where this issue can be tested:
- GFF Tigrinya-Ethiopia (red icon): https://drive.google.com/file/d/1KB30CMy873_JM_9vESZkoZiy8dfwt99_/view?usp=sharing
- GFF Tigrinya-Eritrea (blue icon): https://drive.google.com/file/d/1kuwu34gidXN_bby_-X9YfEvZV3B_vI_M/view?usp=sharing
Thank you @dyacob I was testing this and both these keyboards get installed together with the same languaage. However, for me not with the correct language in Windows. I am still investigating and will also check against Windows 11.
This issue was reported on Windows 11. Here is the log for installing one keyboard after the other.
000045700640 2023-07-13 08:47:30.087: Starting application kmshell, version
000045700640 2023-07-13 08:47:30.087: Command line: "C:\Program Files (x86)\Keyman\Keyman Desktop\kmshell.exe"
000046072812 2023-07-13 08:53:42.274: TfrmInstallKeyboard."keyboard_install"('') enter
000046072859 2023-07-13 08:53:42.320: TTIPMaintenance.GetUserDefaultLangParameterString() enter
000046072875 2023-07-13 08:53:42.344: TTIPMaintenance.GetUserDefaultLanguage() enter
000046072906 2023-07-13 08:53:42.368: TTIPMaintenance.GetUserDefaultLanguage = BCP47:en-GB LangID:2057
000046072937 2023-07-13 08:53:42.392: TTIPMaintenance.GetUserDefaultLanguage() exit
000046072953 2023-07-13 08:53:42.412: TTIPMaintenance.GetUserDefaultLangParameterString() exit('-default-lang en-GB 0809')
000046072968 2023-07-13 08:53:42.434: Calling elevated kmshell -log "C:\Users\Ross\AppData\Local\Temp\kmn426.log" -s -i "C:\Users\Ross\AppData\Local\Temp\kmnBA18.dir\gff_tigrinya_ethiopia.kmp=" -nowelcome -default-lang en-GB 0809
000046085218 2023-07-13 08:53:54.682: TTIPMaintenance.DoInstall('gff_tigrinya_ethiopia', 'ti-ET') enter
000046085343 2023-07-13 08:53:54.810: BCP47Tag = ti-ET, CanonicalTag = ti-ET, lang.BCP47Code = ti-ET
000046085359 2023-07-13 08:53:54.825: LangID=473, TemporaryKeyboardID=, RegistrationRequired=False
000046085390 2023-07-13 08:53:54.856: Calling user kmshell -install-tip 0473 "gff_tigrinya_ethiopia" "ti-ET" ""
000046092734 2023-07-13 08:54:02.202: TTIPMaintenance.DoInstall() exit(True)
000046092765 2023-07-13 08:54:02.233: TfrmInstallKeyboard."keyboard_install"() exit
000046154671 2023-07-13 08:55:04.132: TfrmInstallKeyboard."keyboard_install"('') enter
000046154703 2023-07-13 08:55:04.168: TTIPMaintenance.GetUserDefaultLangParameterString() enter
000046154734 2023-07-13 08:55:04.194: TTIPMaintenance.GetUserDefaultLanguage() enter
000046154750 2023-07-13 08:55:04.215: TTIPMaintenance.GetUserDefaultLanguage = BCP47:en-GB LangID:2057
000046154765 2023-07-13 08:55:04.235: TTIPMaintenance.GetUserDefaultLanguage() exit
000046154781 2023-07-13 08:55:04.249: TTIPMaintenance.GetUserDefaultLangParameterString() exit('-default-lang en-GB 0809')
000046154796 2023-07-13 08:55:04.265: Calling elevated kmshell -log "C:\Users\Ross\AppData\Local\Temp\kmn43E5.log" -s -i "C:\Users\Ross\AppData\Local\Temp\kmn2442.dir\gff_tigrinya_eritrea.kmp=" -nowelcome -default-lang en-GB 0809
000046163890 2023-07-13 08:55:13.359: TTIPMaintenance.DoInstall('gff_tigrinya_eritrea', 'ti-ER') enter
000046164015 2023-07-13 08:55:13.484: BCP47Tag = ti-ER, CanonicalTag = ti-ER, lang.BCP47Code = ti-ER
000046164031 2023-07-13 08:55:13.499: LangID=873, TemporaryKeyboardID=, RegistrationRequired=False
000046164046 2023-07-13 08:55:13.515: Calling user kmshell -install-tip 0873 "gff_tigrinya_eritrea" "ti-ER" ""
000046171546 2023-07-13 08:55:21.012: TTIPMaintenance.DoInstall() exit(True)
000046171578 2023-07-13 08:55:21.048: TfrmInstallKeyboard."keyboard_install"() exit
I tested on Windows 10 as well it also shows the wrong region but it is not the same as Win 11 in Windows 10 it uses a transient language as seen in the log.
000000908062 2023-07-12 15:35:42.399: Starting application kmshell, version
000000908062 2023-07-12 15:35:42.399: Command line: "C:\Program Files (x86)\Keyman\Keyman Desktop\kmshell.exe" -c
000001266312 2023-07-12 15:41:40.640: TfrmInstallKeyboard."keyboard_install"('') enter
000001266359 2023-07-12 15:41:40.687: TTIPMaintenance.GetUserDefaultLangParameterString() enter
000001266390 2023-07-12 15:41:40.723: TTIPMaintenance.GetUserDefaultLanguage() enter
000001266421 2023-07-12 15:41:40.761: TTIPMaintenance.GetUserDefaultLanguage = BCP47:en-AU LangID:3081
000001266468 2023-07-12 15:41:40.795: TTIPMaintenance.GetUserDefaultLanguage() exit
000001266500 2023-07-12 15:41:40.838: TTIPMaintenance.GetUserDefaultLangParameterString() exit('-default-lang en-AU 0C09')
000001266546 2023-07-12 15:41:40.871: Calling elevated kmshell -log "C:\Users\ross_\AppData\Local\Temp\kmn52C0.log" -s -i "C:\Users\ross_\AppData\Local\Temp\kmn876F.dir\gff_tigrinya_ethiopia.kmp=" -nowelcome -default-lang en-AU 0C09
000001276984 2023-07-12 15:41:51.318: TTIPMaintenance.DoInstall('gff_tigrinya_ethiopia', 'ti-ET') enter
000001277265 2023-07-12 15:41:51.601: BCP47Tag = ti-ET, CanonicalTag = ti-ET, lang.BCP47Code = gez-Ethi-ET
000001281453 2023-07-12 15:41:55.783: LangID=2000, TemporaryKeyboardID=2000:00000409, RegistrationRequired=False
000001281484 2023-07-12 15:41:55.816: Calling user kmshell -install-tip 2000 "gff_tigrinya_ethiopia" "gez-Ethi-ET" "2000:00000409"
000001289843 2023-07-12 15:42:04.182: TTIPMaintenance.DoInstall() exit(True)
000001289875 2023-07-12 15:42:04.211: TfrmInstallKeyboard."keyboard_install"() exit
000001425187 2023-07-12 15:44:19.522: TfrmInstallKeyboard."keyboard_install"('') enter
000001425234 2023-07-12 15:44:19.564: TTIPMaintenance.GetUserDefaultLangParameterString() enter
000001425265 2023-07-12 15:44:19.596: TTIPMaintenance.GetUserDefaultLanguage() enter
000001425296 2023-07-12 15:44:19.628: TTIPMaintenance.GetUserDefaultLanguage = BCP47:en-AU LangID:3081
000001425328 2023-07-12 15:44:19.662: TTIPMaintenance.GetUserDefaultLanguage() exit
000001425359 2023-07-12 15:44:19.696: TTIPMaintenance.GetUserDefaultLangParameterString() exit('-default-lang en-AU 0C09')
000001425390 2023-07-12 15:44:19.727: Calling elevated kmshell -log "C:\Users\ross_\AppData\Local\Temp\kmnBF69.log" -s -i "C:\Users\ross_\AppData\Local\Temp\kmn57D0.dir\gff_tigrinya_eritrea.kmp=" -nowelcome -default-lang en-AU 0C09
000001436453 2023-07-12 15:44:30.784: TTIPMaintenance.DoInstall('gff_tigrinya_eritrea', 'ti-ER') enter
000001436718 2023-07-12 15:44:31.055: BCP47Tag = ti-ER, CanonicalTag = ti-ER, lang.BCP47Code = gez-Ethi-ET
000001436750 2023-07-12 15:44:31.086: LangID=2000, TemporaryKeyboardID=, RegistrationRequired=False
000001436781 2023-07-12 15:44:31.117: Calling user kmshell -install-tip 2000 "gff_tigrinya_eritrea" "gez-Ethi-ET" ""
000001445609 2023-07-12 15:44:39.946: TTIPMaintenance.DoInstall() exit(True)
000001445640 2023-07-12 15:44:39.974: TfrmInstallKeyboard."keyboard_install"() exit
000001806968 2023-07-12 15:50:41.295: Stopping application kmshell
000001806968 2023-07-12 15:50:41.295: ================================================================================================================================================================
Further investigation notes:
Win 11
For the registry key
HKEY_CURRENT_USER\Control Panel\International\User Profile\ti-ET
There is only the Ethopia keyboard with a link the CacheLanguageName of Tigrinya (Ethiopia)
[ actually via winlangdb
lookup but that is just a new feature added to Win 11].
There is no equivalent entry for ti-ER. I could not find a string value Tigrinya (Eritrea)
. I would expect to see the key HKEY_CURRENT_USER\Control Panel\International\User Profile\ti-ER
with value for CachedLanguageName
.
HKEY_USERS\S-1-5-21-4171282425-2343112004-3114194716-1001\Control Panel\International\User Profile\ti-ER
is also missing but this is just the look-up for the ChangedLangaugeName
I need to check with @mcdurdin if the Keyman installation that creates the key HKEY_CURRENT_USER\Control Panel\International\User Profile\{BCP47Code}
. This seems to be where we are falling down for Win 11.
For Win 10 Since both keyboards have actually been installed against gez-Ethi-ET they both have an entry in the key
HKEY_CURRENT_USER\Control Panel\International\User Profile\gez-Ethi-ET
and therefore display the same CachedLanguageName=Geez (gez-Ethi-ET). In this case, the registry and behaviour match that the keyboards were both installed against the same language. The problem here is why we the installation is reverting them both to this.
Further investigation today. On Windows 11 it seems Windows refuses to have both ti-ET and ti-ER installed. If you seperate to keyman try to add a language you can either install Tigrinya (Eritrea)
or Tigrinya (Ethiopia)
but not both once one is installed the other becomes greyed out as an option when you go to install it. In the registry key HKEY_CURRENT_USER\Control Panel\International\User Profile\
which every is installed first (either by installing the Keyman keyboard) or by installing the language through windows settings will have the key ti-ET
or ti-ER
. Under these settings the keys include CachedLanguageName
Which the value is a reference in to the a winlangdb.dll
it indexs into this. @Winglangdb.dll,-1648
is Tigrinya (Eritrea)
and @Winglangdb.dll,-1649
is Tigrinya (Ethiopia)
It also has a key with lcid:{guid}{guid}
which matches the value stored in the Keyman key HKEY_CURRENT_USER\Software\Keyman\Keyman Engine\Active Keyboards
I tried manually adding the HKEY_CURRENT_USER\Control Panel\International\User Profile\
for the second language installed. Windows just removes it from the registry on a reboot.
Weird... Does this seem like a Windows 11 bug or a new policy in the way Windows treats Tigrinya?
Perhaps relating to something internal about langid mappings for ti-ER vs ti-ET?
@Winglangdb.dll,-1648
is Tigrinya (Eritrea)
and@Winglangdb.dll,-1648
is Tigrinya (Ethiopia)
This looks like the same values? Is that right?
@xadxura are you able to share any insight on this problem, specifically on @rc-swag's finding in https://github.com/keymanapp/keyman/issues/9131#issuecomment-1668875055?
@Winglangdb.dll,-1648
is Tigrinya (Eritrea)
and@Winglangdb.dll,-1648
is Tigrinya (Ethiopia)This looks like the same values? Is that right?
Sorry that was a cut paste error by me - fixed. To be clear that part is just look up for the CachedLanguageName. As you ask it seems more the internal handling of ti-ER
and ti-ET
Was working on another issue but this issue is always in the back of my mind and I came accross this old issue #1285 which I think is relevant in the sense that, whatever Microsoft changed that enabled #1285 to be closed possibly still has issue causing this problem. There is also a Keyman internal doc Mitigation for Keyman keyboard installation under Windows 10 1803+