pydirectinput icon indicating copy to clipboard operation
pydirectinput copied to clipboard

Mouse movement not working

Open Fabbbr0 opened this issue 1 year ago • 2 comments

''' import pydirectinput while True: pydirectinput.move(100, 0) print("hek") ''' The mouse dosent move

Fabbbr0 avatar Apr 01 '24 11:04 Fabbbr0

I tried several game, all in windowed mode. I checked how well library track mouse position, here are the results:

  1. Deep Rock Galactic (dx12)
    • mouse tracked perfectly
  2. cs2
    • mouse position didn't worked at all
  3. half life 2
    • mouse position changed but right away moved to the center of the window
  4. 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.

kezif avatar Apr 05 '24 12:04 kezif

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

rdp avatar Jul 19 '24 07:07 rdp