To determine the name of the active keyboard layout, one can get its "numeric name" by invoking GetKeyboardLayoutName and then looking it up under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\{0}\Layout Text
.
However, inexplicably, there appears to be no way to convert the locale identifiers returned by GetKeyboardLayoutList into the "numeric names" suitable for lookup in the registry.
Is there any way to retrieve the Layout Text of all installed keyboard layouts without activating each one to do so?
For example, for United States-International, GetKeyboardLayoutList
returns f0010809
on my system but the name is stored under 00020409
(which can be verified by activating f0010809
and calling GetKeyboardLayoutName
- which will return 00020409
).