Warning: a work in progress
I’ve been toying with enabling multi-touch on touch screen devices for another project and have something that I hope might help you
run link: https://run.pavlovia.org/lpxrh6/multitouch_demo
files link: Pavlovia
Essentially you monitor for ongoing touch events in the way that @aforren1 describes. This is implemented by replacing the addMouseEventListeners
in the core module I therefore import a custom psychojs library here. You can then check inside your experiment how many ongoing touches there are by checking the length of psychoJS.ongoingTouches
. For your purposes, you would want to check this was 0, which would mean there were no current touch events.
This is still a work in progress so needs tweaks and improvements, but I hope that you find it helpful. Let me know if you have questions,
Becca
EDIT: I notice that the version I shared here might be an old version where the circle is always assigned the first touch event, for your purposes you only need to know nTouches, so this should be ok, but I’ll be updating the demo with the more recent update asap