mouse
mouse copied to clipboard
on_button mouse down event
mouse.on_button(btn_press, buttons=[mouse.LEFT], types=[mouse.DOWN])
This event is triggered not every time when the mouse button is pressed. It needs about a second cool down between presses to work properly but mouse.UP event works fine even when i'm jitter clicking.
I don't know if you still have this issue, but i found out that it is caused by the way the double-click is handled for windows : if a "down" is close enough to a previous event, it is interpreted as "double", not "down".
if (event.event_type == DOWN) and previous_button_event is not None:
# https://msdn.microsoft.com/en-us/library/windows/desktop/gg153548%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
if event.time - previous_button_event.time <= GetDoubleClickTime() / 1000.0:
event = ButtonEvent(DOUBLE, event.button, event.time)