Mouse Location Not Resetting Correctly
Hey everyone,
Currently I am creating an OpenSesame experiment using an Eye-Link eye tracker. Each trial of the experiment displays a canvas containing a grid of tiles, and after the participants finish searching this display they press the spacebar. When the spacebar is pressed, the display changes to showing their mouse. They then use their mouse to select a tile in the display.
I've been able to get the all of this working using mostly in-line code. However, I can't seem to get the mouse to appear in its correct starting location each trial. Whenever the mouse appears, it appears in the location of the participant's previous mouse click from the previous trial (not the mouse's last location before the next trial, but the mouse's last click location). As soon as they move the mouse, it jumps to the starting location I have set in my script for the mouse. Interestingly, this problem ONLY occurs when running the experiment with the eye-link. If I run it on another desktop without the eye-link, the mouse always appears in the correct assigned starting location (maybe has something to do with how the mouse is displayed in dummy modes?).
I've attempted a number of fixes, this one seemed most intuitive to me but does not seem to work:
selection_mouse = Mouse(buttonlist=[1], visible=False, timeout=None)
selection_mouse.set_pos(pos=(380, 200))
selection_mouse.show_cursor(show = True)
c.show()
I've tried using the .flush() function in different parts of the code, I've tried setting the position and then overwriting the previous mouse element with a new one, but in any case, the program always seems keen on retaining that previous mouse click. The goal is to have the mouse appear at the coordinates (380, 200), but instead the mouse will appear at the previous click location and then jump to the coordinates (380, 200).
Any help people can provide would be much appreciated!
Comments
Hi,
the dummy code could indeed cause these issues. Hard to tell though...
But when you say the problem occurs only if an eyelink is installed on the machine, do you actually track the eyes or do you use the dummy mode? If dummy mode, does the problem also occur if you set it to the track eyes?
I don't really know how to fix it, but I do remember, setting mouse parameters (visibility, position, etc.) can be quite an unpredictable pain.
Eduard