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)
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:
This function:
returns a set containing button 1 on windows upon the second
dragcommand