C# p/Invoke How to simulate a keyPRESS event using SendInput for DirectX games

后端 未结 2 808
情话喂你
情话喂你 2021-01-27 09:39

I\'ve often struggled with simulating keyboard press events for various bots, or other GUI automating programs.

I\'ve managed to simulate keydown events using:



        
2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-27 10:35

    To simulate keyboard events in directX games you need wrapper for a keyboard driver. I had the same issue, and neither of this methods (SendInput, SendKeys class) doesn't help me. Try to use this wrapper, to me it was successfully.

提交回复
热议问题