OS : W10 and Mac
PsychoPy version : 2020.1.3
Standard Standalone y
Apologies if this has been asked and answered before, I cannot find anything relevant on the forum.
The question is about a delay registering clicks using a touchpad which does not occur when using a mouse.
I have an exp whereby Ps are required to respond using either the mouse or the trackpad.
They can respond
- by pressing the left button of their mouse once or tap they trackpad once i.e. single click.
- by pressing the left button of their mouse twice or tap they trackpad twice i.e. double click.
Logic.
I have two routines, each containing a mouse component, a polygon and a code component. The first routine is for the single click and ends when a click occurs within the polygon and and the mouse is released. The second routine is for the double click and it lasts for 200ms.
While using a mouse, the double click works just fine, when using a trackpad either under Windows or under MacOS the double click does not work. It seems to me that it takes sometime to register the first tap before it moves to the second routine.
Could you please someone advise?
Below the code components.
First Routine
Begin Routine
mouse_was_down = False
Each Frame
if singleClick.isPressedIn(polygon):
singleClickLeft = buttons[0]
contninueRoutine = True
mouse_was_down = True
if mouse_was_down == True and not singleClick.isPressedIn(polygon):
mouse_was_down = False
continueRoutine = False
Second Routine
Begin Routine
mouse_was_down2 = False
Each Frame
if doubleClick.isPressedIn(polygon_3):
doubleClickLeft = buttons[0]
contninueRoutine = True
mouse_was_down2 = True
if mouse_was_down2 == True and not doubleClick.isPressedIn(polygon_3):
mouse_was_down2 = False
continueRoutine = False