mouse icon indicating copy to clipboard operation
mouse copied to clipboard

mouse 0.7.0 - mouse polling hate 125-1000hz

Open penahuse opened this issue 5 years ago • 2 comments
trafficstars

Hello guys!

I installed mouse 0.7.0 by pip install mouse.

This mouse api works fine on an aplication designed to mouses 125hz, but i cant use on 1000hz polling rate because it make slow moves.

how can i "import mouse" and hook it to a 1000hz mouse? is it possible?

the code i use win32api.mouse_event and mouse.is_pressed.

Sorry my bad english.

I thank any help.

penahuse avatar Dec 06 '19 22:12 penahuse

Hi @penahuse

Right now, if you use functions that capture mouse events, they are going to be processed as often as the OS sends them in. I guess that makes a problem for extremely high refresh rates.

And to be honest I don't see an alternative. I couldn't find any alternative API's that give a different view into the mouse, and the code is already as lean as it gets (https://github.com/boppreh/mouse/blob/master/mouse/_winmouse.py#L136). Have you tried other tools, like AutoHotkey or PyAutoGUI? Do you know how they handle it?

Finally, you should still be able to inject fake events without affecting the performance of the real events.

boppreh avatar Dec 06 '19 22:12 boppreh

@boppreh Hi!

Thank you for the fast answer. I appreciate that!

Yeah, i tried AutoHotkey. It workf fine but i found a python code that do the same but more effective. I dont know PyAutoGUI, and to be honest i dont know how tu use it in this code that i mentioned (because my poor progaming skills).

Anyway i thank you for trying to help!

penahuse avatar Dec 06 '19 22:12 penahuse