I have an application which is multilingual, and I have to convert the VK scan codes to the appropriate character as specified by the current keyboard layout provided that they are mapped to some character representation and not just an action, state or other meta use. How would I accomplish this, such that it is portable across different Windows using different languages?
I could write a mapping function for the VK scan codes, but in the WinUser.h
file, I'm reading stuff like:
#define VK_OEM_4 0xDB // '[{' for US
#define VK_OEM_5 0xDC // '\|' for US
#define VK_OEM_6 0xDD // ']}' for US
#define VK_OEM_7 0xDE // ''"' for US
Which indicates that if the keyboard isn't US, this could be different. There must be a function that I can call to do the appropriate mapping through the keyboard driver or something, right?