# Function Reference

# _WinAPI_GetKeyboardLayout

Retrieves the active input locale identifier for the specified window

#include <WinAPISys.au3>
_WinAPI_GetKeyboardLayout ( [$hWnd = 0] )

## Parameters

$hWnd | [optional] Handle to the window to retrieve the input locale identifier (Default: running process).

## Return Value

Success: | The input locale identifier.
Failure: | 0.

## Related

_WinAPI_GetKeyboardLayoutLocale

## See Also

Search GetKeyboardLayout in MSDN Library.

## Example

    #include <WinAPIConv.au3>
    #include <WinAPILocale.au3>
    #include <WinAPISys.au3>

    Local $hKeyboardLayout = _WinAPI_GetKeyboardLayout()
    Local $sStr = $hKeyboardLayout & ' (' & _WinAPI_GetLocaleInfo(_WinAPI_HiWord($hKeyboardLayout), $LOCALE_SENGLANGUAGE) & ')'

    MsgBox(0, "GetKeyboardLayout - v(" & @AutoItVersion & ")", $sStr)