Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

form_text_input mouse-cursor

Hey guys,

after using a form_text_input the mouse-cursor is visible and in the middle of the screen. That could distract our participants. Does anybody know, how I can make the cursor invisible?



  • RoelofRoelof Posts: 102

    Hi Artur,

    I can't seem to find a solution: one line that sort seems to be handy:
    which hides the mouse if executed, but it seems that the mouse is called when the text display is executed, which would , I think call for some sort of a custom function, maybe @eduard knows ho this might work

  • eduardeduard Posts: 1,105


    One solution (a little ugly though), is to put a mouse response after the form. In that mouse_response change the timeout to 0 and unselect the box for Visible mouse cursor.

    Does that help?


  • DPrecDPrec Posts: 23

    Hi All,

    Some time ago I had a similar problem, and (with Eduard's help) we fixed it by adding the following lines at the beginning of the the inline script (on the run sequence) that produces every trial:

        ### Hide Mouse
        ms = mouse()

    If you only use the standard OpenSesame objects, you can simply add an inline_script containing the mentioned lines at the beginning of your trial loop.

    Hope that helps!

    Thanked by 1eduard
  • eduardeduard Posts: 1,105


  • RoelofRoelof Posts: 102

    This doesn't solve the problem of the visibility of the cursor during the text input item though, when I tried these lines they only hide the mouse before or after the text input item, but not during. Guess that is not quite essential though

  • eduardeduard Posts: 1,105

    Oh shit,

    Yes, I haven't read the discussion properly (obviously). I'll have a look later today or tomorrow, whether it is something that can be changed.


  • Hi Artur,
    I had the same problem before.
    The inline script should be placed after the form containing text_input.
    Hope that works!


  • eduardeduard Posts: 1,105


    The only way I found to fix it, is to modify the source code of Opensesame (just writing a wrapper function does not work as the mouse object is invoked quite deep inside).

    So on your computer you have to find following file: libopensesame/widgits/_form.py. In this file you need to comment the lines 173 #self.mouse.show_cursor() and 198 #self.mouse.hide_cursor()

    This should do the trick. However, this changes the mouse visibility for all forms. Therefore, you won't see a mouse in multiple choice items as well (which could be a little annoying). I'll have a look whether the mouse functionality in forms can be improved in future releases.

    GOod luck,


    Thanked by 1Roelof
  • RoelofRoelof Posts: 102

    That is great Eduard, thanks for looking into it, attached a text file with the code, and full link;
    \YOUR FOLDER HERE \ opensesame_3.1.9-py2.7-win32-1\opensesame_3.1.9-py2.7-win32-1\Lib\site-packages\libopensesame\widgets

Sign In or Register to comment.