pydirectinput
pydirectinput copied to clipboard
Mouse movement not working
''' import pydirectinput while True: pydirectinput.move(100, 0) print("hek") ''' The mouse dosent move
I tried several game, all in windowed mode. I checked how well library track mouse position, here are the results:
- Deep Rock Galactic (dx12)
- mouse tracked perfectly
- cs2
- mouse position didn't worked at all
- half life 2
- mouse position changed but right away moved to the center of the window
- ultrakill
- same as half life
From what I learned - Ben used SendInput win32 function. Also modern "hacks" (that utilize ahk) uses mouse_event win32 function.
That's kinda odd, since the docs for mouse_event say Note This function has been superseded. Use [SendInput] instead. Maybe they are using a different path? See also https://stackoverflow.com/a/74720974/32453