boppreh / mouse

Hook and simulate global mouse events in pure Python
MIT License
900 stars 135 forks source link

DirectX / DirectInput support #16

Open pwang00 opened 6 years ago

pwang00 commented 6 years ago

Hey,

I tested mouse 0.7.0 on a DirectX game, and it seems as if click() and press() work fine, albeit with hiccups in performance. However, move() does not work within the game, though it does outside of the game window.

I'm fairly certain this is due to the game's use of DirectInput, and from what I've seen with Python DirectX mouse support, many other users have been having a similar issue.

Is there any workaround that will allow this library to work with DirectX, or anything else that you can suggest?

bengardner commented 3 years ago

If you are only interested in sending events, you can try using pydirectinput. That uses SendInput() instead of mouse_event() and keybd_event() to send events. It doesn't capture.

mouse_event() and keybd_event() have been superseded by SendInput().