How do I make the mouse invisible in a Psychopy touch screen experiment?

909 views
Skip to first unread message

Maria W

unread,
Mar 11, 2015, 12:23:33 PM3/11/15
to psychop...@googlegroups.com
Hi,
 
I've programmed a touch screen experiment in Psychopy and it seems to be working. However I have problems getting the mouse to be invisible whilst the experiment runs.
I imagine there must be a really simple way of doing this but I can't seem to work it out!
 
I think I might be able to use psychopy.event (class psychopy.event.Mouse(visible=True, newPos=None, win=None), and set the mouse visiblility to "False".
However when I try to enter this line of code into the coder it doesn't seem to work (I've only used the Builder so far so the code doesn't make much sense to me yet!).
 
Any advice on how to make the mouse invible would much appreciated.
 
Cheers,
 
Maria

Michael MacAskill

unread,
Mar 11, 2015, 4:45:40 PM3/11/15
to psychop...@googlegroups.com
Hi Maria,

The visibility of the mouse can be an attribute of the window itself.

In Builder, check the experiment settings dialog and look for the "Show mouse" checkbox on the "Screen" tab.

In Coder or Builder, you can toggle mouse visibility in code as required via:

win.setMouseVisible(False) # or True as required

I guess you might also need the window to be full screen? But this is usually a good idea for performance reasons anyway.

Regards,

Michael

Maria W

unread,
Mar 12, 2015, 6:09:12 AM3/12/15
to psychop...@googlegroups.com
Hi Michael,
 
 Thanks very much for your reply.
 
Unfortunately that doesn't work for me (the "Show mouse" checkbox was already unticked and I've tried the code solution, too).
 
I think the problem is to do with the touch screen environment: When I start the experiment the mouse is not visible, but as soon as I make a touch screen response the mouse pops up where I touched the screen, and stays there until I make a different response (then the mouse moves to the new location).
 
I wondered whether I should specify (when using the code) which screen I am referring to, so I have tried putting "Screen = 2" above your suggested "win.setMouseVisible(False)". But again no luck!
 
Perhaps I am putting the code in the wrong location in the experiment? Though I've tried quite a few different places!
 
Thanks for your help anyway!
 
Maria

Maria W

unread,
Mar 12, 2015, 1:22:53 PM3/12/15
to psychop...@googlegroups.com
Hi again,
 
I just wanted to say that I have managed to make the mouse invisible by going into the Elo Touch control panel. HOWEVER... in doing so the mouse on my desktop computer screen also disappears which is of course not very convenient!
 
If anyone has a better solution (that doesn't leave me trying to "blindly" find my cursor!) that would make me very happy.
 
Cheers,
 
Maria
 
  
Reply all
Reply to author
Forward
0 new messages