-
Notifications
You must be signed in to change notification settings - Fork 0
WinAPI reference
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadkeyboardlayouta
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadkeyboardlayoutw
Loads the layout, making it appear in the language bar.
Please note that:
- The layout does not appear in
Settings->Time & language->Language-><language>.
To remove it you can either:- Call UnloadKeyboardLayout().
- Log out and log in again.
- Restart Windows.
- The layout is not loaded automatically on next boot/login, you have to call InstallLayoutOrTip() to achieve that behavior.
https://docs.microsoft.com/en-us/windows/win32/tsf/installlayoutortip
- Loads the layout, making it appear in the language bar.
- Makes the layout available permanently (i.e. automatically loaded at boot/login).
As a result, the layout also appears inSettings->Time & language->Language-><language>.
- Has to be imported manually.
- Ignores the return value of LoadKeyboardLayout().
As a result, the function returnsTRUEeven if the layout is not loaded.
WINAPI BOOL InstallInputLayout(LCID Language, DWORD KLID, BOOL Load, PVOID Unused, BOOL DefaultUser, BOOL Unknown);Language: The language the layout should be installed for. Example: 0x0409
KLID: The input locale identifier. Example: 0xa0000409
Load: Load the layout once installed.
DefaultUser: Alter HKEY_USERS\.DEFAULT\Keyboard Layout instead of HKEY_CURRENT_USER\Keyboard Layout.
Unknown: MSKLC sets it to FALSE. The value is passed to UpdateDefaultHotKey(), which seems to use it to decide how the hotkey to toggle the layout is set.
MSI packages built by MSKLC use it as fallback for InstallLayoutOrTip(), to support Windows versions older than Vista.
Has to be imported manually from input.dll, ordinal 102.
WINAPI BOOL UnInstallInputLayout(LCID Language, DWORD KLID, BOOL DefaultUser);Language: The language the layout should be uninstalled for. Example: 0x0409
KLID: The input locale identifier. Example: 0xa0000409
DefaultUser: Alter HKEY_USERS\.DEFAULT\Keyboard Layout instead of HKEY_CURRENT_USER\Keyboard Layout.
MSI packages built by MSKLC use it as fallback for InstallLayoutOrTip(), to support Windows versions older than Vista.
Has to be imported manually from input.dll, ordinal 103.