#define KL_NAMELENGTH 9 #define HKL_NEXT 1 #define HKL_PREV 0 Declare INTEGER ActivateKeyboardLayout IN WIN32API INTEGER HKL, INTEGER Flags Declare INTEGER GetKeyboardLayout IN WIN32API INTEGER dwLayout Declare INTEGER GetKeyboardLayoutName IN WIN32API STRING @pwszKLID STORE 0 TO lngCurrent_HKL, lngSwitched_HKL STORE "" TO strCurrent_Buffer, strSwitched_Buffer *Retrieves current handle to the keyboard layout lngCurrent_HKL = GetKeyboardLayout(0) *creates a buffers STORE REPLICATE(CHR(0),KL_NAMELENGTH - 1) TO strCurrent_Buffer, strSwitched_Buffer *Retrieves current name of the active keyboard layout GetKeyboardLayoutName(@strCurrent_Buffer) *Switches to the next keyboard layout ActivateKeyboardLayout(HKL_NEXT, 0) *-Retrieves "switched" handle to the keyboard layout lngSwitched_HKL = GetKeyboardLayout(0) *Retrieves "switched" name of the active keyboard layout GetKeyboardLayoutName(@strSwitched_Buffer) MESSAGEBOX("Keyboard layout was switched" +CHR(13) + "from " + strCurrent_Buffer + " to " + strSwitched_Buffer) *Returns to the initial keyboard layout ActivateKeyboardLayout(lngCurrent_HKL, 0)It was taken from API-Guide So you can use it to check if the keyboard layout is diffenrent then 409 (English):
#define KL_NAMELENGTH 9 #define HKL_NEXT 1 #define HKL_PREV 0 ? IsEnglish() FUNCTION IsEnglish() Declare INTEGER GetKeyboardLayout IN WIN32API INTEGER dwLayout Declare INTEGER GetKeyboardLayoutName IN WIN32API STRING @pwszKLID STORE 0 TO lngCurrent_HKL STORE "" TO strCurrent_Buffer *Retrieves current handle to the keyboard layout lngCurrent_HKL = GetKeyboardLayout(0) *creates a buffers STORE REPLICATE(CHR(0),KL_NAMELENGTH - 1) TO strCurrent_Buffer *Retrieves current name of the active keyboard layout GetKeyboardLayoutName(@strCurrent_Buffer) CLEAR DLLS GetKeyboardLayout, GetKeyboardLayoutName RETURN (VAL(strCurrent_Buffer) == 409)