Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Touchscreen make the mouse invisible before first touch

Dear folks,

for a new experiment i will use a touchscreen. For this i am using the mouse functions.

However, before the first 'touch or mouseclick' it seems impossible to make the mouse invisible.

I have tried my_mouse = Mouse(visible=False). In this case the mouse is not visible, but i does not collect mouseclicks either and therefore the experiment gets stuck. Same for Mouse.show_cursor(False).

This occurs only for the first mouse click. Afterwards i can set it to False and everything works fine. It looks weird to see a mouse if you are supposed to touch with your fingers. I was wondering whether i can change the color of the mouse for the first occurence to white (as my background color). Do you know how to do that? Any further suggestions?

I am using the OS 3.2.8 with Expyriment backend and only inline scripts as always ;)

Thanks in advance,



  • Hi Stephan,

    Changing the color of the mouse is not possible easily (OS calls the system mouse), but you could try to have a mock click. I don't know exactly what is happening under the hood, but if you check the code for mouse.get_click(), you might be able to identify the function call that causes the mouse to disappear, and manually call the function as the very first thing in your script. Check github for the code!

    Does that make sense?


    Buy Me A Coffee

  • Hi Eduard,

    i now found out that my other post also has to do with same problem. This is great because it reduces my problems to only one ;)

    Here is what i found out about the other post. I was able to collect touchscreen 'clicks' without seeing the mouse by using my_mouse = Mouse(visible=False).However, the (x,y) coordinates of the following clicks were not correct. To me they appeared quite random. Additionally, -960 for x and -540 for y appeared very often (I did not touch the edges of the screen). Well, i solved the other problem by setting my_mouse = Mouse(visible=True).

    Still, i am not able to make the mouse invisible. I also tried mouse().show_cursor(False), but it has no effect. With github do you mean this?

    Another idea: Is it possible to set the mouse behind my stimulus picture?

    Best regards,


  • Hi Stephan,

    Sorry for the delay. I mean this file:

    However, the (x,y) coordinates of the following clicks were not correct.

    This sounds to me, as if the screen is shifted systematically. Can you find out in which direction the shift occurred and whether it is indeed systematic. If so, you could subtract the shift, and would have correct click coordinates.

    I'm a little confused. Did you now manage to hide the mouse or not? You say both things here, sort of...



    Buy Me A Coffee

  • Hi Eduard,

    the link seems to be for the droid backend right? I am using xperiment backend on a usual computer. Only the screen is special and has the additional function of touch ;)

    I do not believe that the screen is 'shifted'. It looks more like the left up edge of the screen is logged for the x,y coordinates if i set the mouse invisible.

    Yes, i managed to hide the mouse. However, if i do so the x,y coordinates are not correct. In contrast, if i show the mouse they are correct. The coordinates are important for me, so hiding the mouse with incorrect values is not a solution. Does this make sense?


  • edited October 2019

    Hi Eduard,

    I am still having this problem along some others. Here is my experiment. The idea is that you press a start button and hold it pressed until the deep tone (starting signal) has come. Then follow the numbers and go back to the starting position.

    I am using Win7 and Expyriment Backend.

    I found out that if i put the Mouse invisible the touch screen does not work anymore. Nevertheless the mouse still works fine (only that you guess into the dark with the mouse).

    Another problem i had, is that with touch you need to press the starting button, lift it, and press again. This is not needed with the mouse. (Using the same code, of course) . In psycho backend i had the impression that this problem does not appear. However, psycho does not support click_releases.

    Another problem i had, is that the x,y coordinates are not correctly detected with touch, but they are with the mouse. In both examples i pressed always correct.

    Output Touch:

    [2019-10-29 17:55:34,823:process:152:INFO] Starting experiment as ExperimentProcess-45
    Expyriment 0.9.1b2-11-gc100ee8 (Python 2.7.13) 
    [2019-10-29 17:55:36,342:legacy:185:INFO] sampling freq = 48000, buffer size = 1024
    [2019-10-29 17:55:36,545:experiment:450:INFO] experiment started
    [2019-10-29 17:55:36,546:experiment:454:INFO] disabling garbage collection
    [2019-10-29 17:55:36,755:xpyriment:79:WARNING] took 28.0 ms
    0 0 (-960, 432)
    1 0 (215, -78)
    2 0 (158, -58)
    3 0 (-149, 82)
    4 0 (-116, -170)
    5 0 (51, -250)
    6 0 (-171, -252)
    7 0 (-276, -137)
    8 0 (89, 77)
    9 0 (262, -127)
    10 0 (101, 40)
    [2019-10-29 17:55:54,811:experiment:462:INFO] experiment finished
    [2019-10-29 17:55:55,036:experiment:538:INFO] enabling garbage collection
    [2019-10-29 17:55:55,092:process:158:INFO] experiment finished!

    Output Mouse:

    Expyriment 0.9.1b2-11-gc100ee8 (Python 2.7.13) 
    [2019-10-29 18:14:49,640:legacy:185:INFO] sampling freq = 48000, buffer size = 1024
    [2019-10-29 18:14:49,844:experiment:450:INFO] experiment started
    [2019-10-29 18:14:49,845:experiment:454:INFO] disabling garbage collection
    [2019-10-29 18:14:50,058:xpyriment:79:WARNING] took 33.0 ms
    0 1 (-92, -52)
    1 1 (282, -59)
    2 1 (102, -56)
    3 1 (-325, 158)
    4 1 (-111, -269)
    5 1 (121, -264)
    6 1 (-297, -257)
    7 1 (-315, -44)
    8 1 (295, 155)
    9 1 (288, -263)
    10 1 (-32, 150)
    [2019-10-29 18:15:08,736:experiment:462:INFO] experiment finished
    [2019-10-29 18:15:08,937:experiment:538:INFO] enabling garbage collection
    [2019-10-29 18:15:08,992:process:158:INFO] experiment finished!
  • Hi Stephen,

    your experiment is not accessible (page does not exist). Can you retry uploading? And if it does not work again, use some filesharing platform (e.g. wetransfer)?

    But that sounds like something that is not easily fixed. Can you maybe construct a minimal example and post an issue on github? That is, if we are sure that things are really not working (and not just due to wrong settings)


    Buy Me A Coffee

  • The experiment is a minimal example of only one trial.

  • Does it work if you don't have a touch pad? I just got a serious of very annoying beeps...

    Buy Me A Coffee

  • Yes with the mouse it works. The beeps are the starting signal. You shall keep the starting button pressed until the different sound comes. Then go through the numbers (from 0 to 9) and finish with the black button.

    An explanation for the output:

    • each line is one click
    • the first number is the button number
    • the second number is 0=false, 1= correct, which means the click/press was in the right box on the screen
    • the tuple are the x,y coordinates of the click/press
  • Sorry Stephen, I haven't read your earlier comments carefully. I just tested whether I can reproduce the error you describe and I couldn't. But then, I only have a mouse available and can test with a touch pad, so that it was a pretty useless test. Sorry...

    So yeah, I have no idea what could be the reason for that descrepancy, particularly given that both touch and mouse are handled by Opensesame with the same code. The problem appears to be on a more lower level. Perhaps related to what you described in the other discussion.

    Buy Me A Coffee

  • I still did not solve the issue of the touchscreen.

    I found out that in very rare occasions my code ran well. But most of the time the (x,y) coordinates were not correctly logged in OS. There is a strange bias in the coordinates, which even increases if i touch the same position several times: x coordinates add up to -960 after several presses and y coordinates to -539. So even different coordinates are logged for the same touch/position.

    I installed different drivers of the touch screen, but that did not solve the issue.

    I also put the touch screen in a fix position either in horizontal plane or vertical plane, but that did not solve the issue neither.

  • Does the bias increase in discrete steps? Have you posted this issue on github? This sounds like something that needs fixing, but then, if I am not mistaken, the droid backend is not really developed anymore? So, not sure how useful this would be. In any case, try your luck and put it on github. Your chances for a fix are higher there than here.


    Buy Me A Coffee

  • Dear developers (and other interested in using touchscreen),

    i now switched to Experiment Builder. Luckily, we have a dongle. ;)

    The problems do no appear there. Hence, the issue seems to be a problem of the combination of OS with Touchscreen (in Windows).



Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games