Convert character to virtual key code

后端 未结 7 1423
说谎
说谎 2021-01-06 09:40

I have a string of values, and I want to simulate key press events in a window for each character.

I plan on sending WM_KEYDOWN, WM_CHAR, and WM_KEYUP events to the

7条回答
  •  無奈伤痛
    2021-01-06 10:15

    VkKeyScanEx anyone? According to MSDN it:

    "Translates a character to the corresponding virtual-key code and shift state."

    (You could possibly also use VkKeyScan but beware that it has been superseded by VkKeyScanEx.)

提交回复
热议问题