GetKeyboardLayout

The GetKeyboardLayout function retrieves the active keyboard layout for a specified thread. If the dwLayout parameter is zero, the layout for the active thread is returned.

HKL GetKeyboardLayout(
  DWORD dwLayout  // thread identifier
);
 

Parameters

dwLayout
Identifies the thread to query or is zero for the current thread.

Return Values

The return value is the keyboard layout handle for the thread. The low word contains a language identifier for the input language and the high word contains a device handle for the physical layout of the keyboard.

QuickInfo

  Windows NT: Requires version 4.0 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in winuser.h.
  Import Library: Use user32.lib.

See Also

Keyboard Input Overview, Keyboard Input Functions, ActivateKeyboardLayout, CreateThread, LoadKeyboardLayout