Skip to content

[Windows] ctrl.mouse_buttons_down returns incorrect id(?) #243

@knausj85

Description

@knausj85
  • Windows 10
  • v0.1.4-110

I use the below action to drag & stop dragging via a single voice command. My primary and secondary buttons are NOT switched on Windows.

Despite the call with button=0 below:

ctrl.mouse_click(button=0, up=True)

This function:

ctrl.mouse_buttons_down()

returns a set containing button 1 on windows upon the second drag command

    def mouse_drag():
        """(TEMPORARY) Press and hold/release button 0 depending on state for dragging"""
        button = 0
        if app.platform == "windows":
            button = 1
        print(str(ctrl.mouse_buttons_down()))
        if button not in ctrl.mouse_buttons_down():
            # print("start drag...")
            ctrl.mouse_click(button=0, down=True)
            # app.notify("drag started")
        else:
            # print("end drag...")
            ctrl.mouse_click(button=0, up=True)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions