ActivateKeyboardLayout function user32

Win32Result<HKL> ActivateKeyboardLayout(
  1. HKL hkl,
  2. ACTIVATE_KEYBOARD_LAYOUT_FLAGS flags
)

Sets the input locale identifier (formerly called the keyboard layout handle) for the calling thread or the current process.

The input locale identifier specifies a locale as well as the physical layout of the keyboard.

To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-activatekeyboardlayout.

Implementation

Win32Result<HKL> ActivateKeyboardLayout(
  HKL hkl,
  ACTIVATE_KEYBOARD_LAYOUT_FLAGS flags,
) {
  final result_ = ActivateKeyboardLayout_Wrapper(hkl, flags);
  return Win32Result(value: HKL(result_.value.ptr), error: result_.error);
}