Hmm, I dunno... I've never had to use ToUnicode with a keyboard layout that actually used dead keys, so I'm not sure [smile]
You might try ToUnicode instead. The only difference is that ToUnicodeEx takes a HKL whereas ToUnicode just uses the currently active one. I don't know if that'd make a difference, though.
WM_INPUT for keyboard - worth it?
Nah that doesn't make any difference unfortunately. Just as proof that it's not handling the dead-keys for me, I press two "'" in a row:
ToUnicodeEx: result is -1 (39 0 8339 126)
ToUnicodeEx: result is -1 (39 0 8339 126)
You would have thought the second call would have returned 1, since pressing ' twice should display two ' characters (as it does in Notepad in Spanish mode).
Hmm. Just thinking - where is the dead-key state held? I'm guessing the Windows keyboad layer holds it. How does it get reset? I'm wondering if DefWinodwProc or something is calling ToUnicode itself and then resetting the state for when _I_ call ToUnicodeEx on the second key...investigating now...
ToUnicodeEx: result is -1 (39 0 8339 126)
ToUnicodeEx: result is -1 (39 0 8339 126)
You would have thought the second call would have returned 1, since pressing ' twice should display two ' characters (as it does in Notepad in Spanish mode).
Hmm. Just thinking - where is the dead-key state held? I'm guessing the Windows keyboad layer holds it. How does it get reset? I'm wondering if DefWinodwProc or something is calling ToUnicode itself and then resetting the state for when _I_ call ToUnicodeEx on the second key...investigating now...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement