We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
while True: print(mouse.is_pressed("left"))
When I press the left mouse button, I get a true until I release the mouse button. If I repeat this again, then I only get False.
Edit: I could notice when I move a window that I get True when I release a False. If I move the same window again, I get a false. It is all random.
mouse Modul Version 0.7.1 Tested with Python 3.7 x64 and 3.8 x32. I have Windows 10 x64.
The text was updated successfully, but these errors were encountered:
I have this problem too
Sorry, something went wrong.
I "workaround" this problem by using pynput instead.
from pynput import mouse is_mouse_pressed=False def mouse_hook(x, y, button, pressed): global is_mouse_pressed if button==mouse.Button.left: is_mouse_pressed=pressed listener = mouse.Listener(on_click=mouse_hook) listener.start() while True: print(is_mouse_pressed)
No branches or pull requests
while True: print(mouse.is_pressed("left"))
When I press the left mouse button, I get a true until I release the mouse button. If I repeat this again, then I only get False.
Edit:
I could notice when I move a window that I get True when I release a False. If I move the same window again, I get a false. It is all random.
mouse Modul Version 0.7.1
Tested with Python 3.7 x64 and 3.8 x32.
I have Windows 10 x64.
The text was updated successfully, but these errors were encountered: