Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mouse 0.7.0 - mouse polling hate 125-1000hz #42

Open
penahuse opened this issue Dec 6, 2019 · 2 comments
Open

mouse 0.7.0 - mouse polling hate 125-1000hz #42

penahuse opened this issue Dec 6, 2019 · 2 comments

Comments

@penahuse
Copy link

penahuse commented Dec 6, 2019

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.

@boppreh
Copy link
Owner

boppreh commented Dec 6, 2019

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.

@penahuse
Copy link
Author

penahuse commented Dec 6, 2019

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants