User32GetKeyboardLayout Method

Retrieves the active input locale identifier (formerly called the keyboard layout).

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", CharSet = CharSet.Unicode)]
public static IntPtr GetKeyboardLayout(
	uint idThread = 0
)

Parameters

idThread  UInt32  (Optional)
A window handle identifier of the thread to query, or 0 to query the current thread.

Return Value

IntPtr
The return value is the input locale identifier for the thread.

The low-order byte contains a Language Identifier for the input language, and the high-order byte contains a device handle to the physical layout of the keyboard.

Remarks

See Also