Skip to content

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

@Goatghosts

Description

@Goatghosts

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions