Skip to content

Adjust relative mouse movement for mouse pointer speed  #43

@SanjoSolutions

Description

@SanjoSolutions

The documentation makes it appear as if one can achieve accurate mouse movement with it.

interception.mouse_position()
>>> 300, 400
# move the mouse by 100 pixels on the x-axis and 0 in y-axis
interception.move_relative(100, 0)
interception.mouse_position()
>>> 400, 400

It seems that the actual number of pixels moved is dependent also on the mouse speed setting (based on the info here https://github.com/learncodebygaming/pydirectinput/blob/a585d044aed678576fefd24e7ad0c5945ab52366/pydirectinput/__init__.py#L412C7-L417). In my tests it has moved more pixels than I've called move_relative with.

I suggest to update the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions