Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. problem with unicode conversion
QtWS25 Last Chance

problem with unicode conversion

Scheduled Pinned Locked Moved 3rd Party Software
1 Posts 1 Posters 379 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jeronimo
    wrote on last edited by Jeronimo
    #1

    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved