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

The mouse.DOWN type hook does not work correctly. #137

Open
Goatghosts opened this issue Feb 26, 2024 · 0 comments
Open

The mouse.DOWN type hook does not work correctly. #137

Goatghosts opened this issue Feb 26, 2024 · 0 comments

Comments

@Goatghosts
Copy link

On my Windows 11 system, this piece of code does not work correctly. The code is not able to detect every click and display the corresponding message in the console. In this case, the mouse.UP event works correctly, but it does not suit me at all. Try checking it for yourself and maybe you will notice the problem too.

def main():
    mouse.on_button(lambda: print("Mouse down"), buttons=mouse.LEFT, types=mouse.DOWN)
    try:
        while True:
            time.sleep(0.01)
    except KeyboardInterrupt:
        pass
    finally:
        mouse.unhook_all()


if __name__ == "__main__":
    main()
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

1 participant