Detecting Chinese keyboard switch RRS feed

  • Question

  • I have an application which needs to distinguish between alphanumeric characters entered using the Pinyin IME operating in non-IME mode and the same characters entered using Chinese with the US keyboard selected. On Windows XP I was getting INPUTLANGCHANGE[D] notifications for the equivalent switch but on Windows 7 there are no messages sent to my application when the user toggles modes (if the user makes the switch with Ctrl+Space then I see the keypresses but have no way of knowing how the keypresses are being interpreted). Nor have I found any API calls that can tell me which mode the keyboard is in. I've seen some references to .NET calls that might help but this is a legacy app that needs to use straight WinAPI calls if at all possible. An additional issue I have in the same area is that I would like to be able to toggle modes programmatically as well - the ImmSimulateHotKey() function would appear to be exactly what I need here but it seems not to have any effect so I must be doing something wrong here, just can't see what though...
    Monday, January 28, 2013 10:26 AM