Detecting keyboard layout used on Windows
//Pseudo C/C# code:
int localeId = GetKeyboardLayout(0);
// The low word contains a Language Identifier for the input language
// and the high word contains a device handle to the physical layout
// of the keyboard.
localeId &= 0xffff; // mask off high word to get the locale
// identifier
switch (localeId) {
0x040c:
0x080c:
0x1009:
useAzertyMapping();
default:
useQwertyMapping();
}
Relevant links:
GetKeyboardLayout()
Default Input Locales
Locale IDs assigned by Microsoft
Syndicated 2012-08-06 11:11:55 from In Nomine - The Lotus Land
