I’m trying to get the mouse cursor to return to the centre of the screen after each loop in my online experiment. Offline / locally, I’ve used the following in a (Builder) code component to achieve this:
mouse = event.Mouse()
mouse.setPos((0, 0))
but this doesn’t seem to work online. I get the error:
TypeError: Cannot read property ‘Mouse’ of undefined
My sense (after a quick google) is that this isn’t possible in JS, and could be a nightmare if it were (advertisers stealing your mouse to “encourage” clicking on particular buttons).
While we try to mimic the Python engine as much as possible some things will never be quite the same in browser studies.
Quick follow up since this conversation is over a year old - the setPos Command (or any other comand to manipulate the position of the mouse) is still not possible in psychoJS for online experiments, or?
Hi there! Still can’t reset position as far as I am aware I am afraid, will need to get participants to move their mouse to a location to start the trial
Actually, as I tried to get across above, I would be surprised if this is ever possible because browsers making that possible will be a disaster for malicious websites that want you to click on certain things.