1

I want to emulate mouse movement using C++ code inside directX games. I know that we cannot use setCursorPos since inside the game the cursor position stays fixed. I tried making an HID using arduino controller but that only moves mouse in integer values and does not give smooth transitions.

So I want to do that at kernel level wherein I can take external inputs from a controller and move mouse inside all of the existing directX games as though the game is reading HID signal itself.

This is my problem statement however I don't know how to go about solving this.

I found a few similar questions simulate mouse click in DirectX game, DirectX Game Hook , Hook/OverLay a directX game where DirectX hook implementation was asked but no implementable answers were provided.

I tried using the GlovePIE application but that did not work when I tried it inside a game. I tried it with GTA V and COD.

So basically my question is how do I emulate mouse through a C++ code inside a DirectX game.

newbie2015
  • 581
  • 5
  • 29
  • 1
    Maybe you can use SendInput function? See here: https://msdn.microsoft.com/en-us/library/windows/desktop/ms646310(v=vs.85).aspx – user3704293 Jan 15 '16 at 07:53
  • @user3704293 yes after some reading I did use SendInput function. But the movement is still not smooth. [Here](https://stackoverflow.com/questions/34806128/give-float-values-to-sendinput-for-mouse-movement?noredirect=1#comment57355144_34806128) is an issue I am facing with SendInput(). – newbie2015 Jan 15 '16 at 08:36

0 Answers0