Hello!
I've been trying to implement Unicode keyboard input in my regular lite-C Pure game.
Using on_message I receive WM_CHAR events, including characters sent by a Japanese IME thing for testing. However, it seems like I cannot convert those to actual Unicode characters (the lParam is just 1 which probably is not right for any subsequent ToUnicode calls...?).
I assume this might be because IsWindowUnicode(hWnd) returns 0 and WM_CHAR messages are transformed to ANSI before they are sent to the application.
I've thought about creating my own hWnd with RegisterClassExW (which is not supported in GStudio8/include/windows.h, only RegisterClassEx, so maybe via a DLL) but I couldn't figure that one out yet. Would that be the right way?

Alternatively, I've tried to call
SetWindowsHookEx(WH_KEYBOARD_LL, HookCallback, NULL, 0);
in a DLL or directly in lite-C, then do the Unicode translation there and send the Unicode characters to the engine.
However, it seems like the callback function is not triggered correctly, in particular no response to/ from IME input. WH_KEYBOARD_LL may or may not be the wrong HookID but I did not have luck with any other mode.

Do you have any advice?
Thanks for reading.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends