problem with unicode conversion
-
Hi i am trying to do one program to trigger key's in one game. But my problem is here when i try to convert my key info:
int result = ToUnicodeEx(pKeyboardStruct->vkCode, pKeyboardStruct->scanCode, keyboard_state, buffer,4,0,keyboard_layout);
Here i put the steps to get unicode text:
BYTE keyboard_state[256]; GetKeyboardState(keyboard_state); wchar_t buffer[5]; HKL keyboard_layout = GetKeyboardLayout(0); int result = ToUnicodeEx(pKeyboardStruct->vkCode, pKeyboardStruct->scanCode, keyboard_state, buffer,4,0,keyboard_layout);
But for some strange reason works only with key modificators:
UpdateKeyState(keyboard_state, VK_CONTROL);
So probably for this happen.
For some reason i can't get the unicode text to use in my game.