win32api.GetKeyboardLayoutName

int = GetKeyboardLayoutName()

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