Hi everyone,
I am using Psychopy version 2020.1.3 on a Windows 10 machine. What I am trying to achieve is to minimize/maximize the psychopy window every time I need to calibrate the eye tracker. To experiment with this I have created a demo task (without eye-tracking) with two routines (1st routine contains a ‘Start’ text component and 2nd routine an ‘End’ text component). In the first routine there is also a code component with the below code in the each frame tab:
if event.getKeys(keyList=['l',]):
win.winHandle.minimize()
win.winHandle.set_fullscreen(False)
win.flip()
elif event.getKeys(keyList=['b',]):
win.winHandle.maximize()
win.winHandle.set_fullscreen(True)
win.winHandle.activate()
win.flip()
elif event.getKeys(keyList=['k',]):
continueRoutine=False
With this code, I am able to minimize/maximize the psychopy window or proceed to the next routine using a specific letter. It works fine.
However, when I use the exact same code in a demo task WITH eye-tracking, I have issues with maximizing and activating the psychopy window once I have performed the calibration. The minimization works fine, but when I press ‘b’ which is the letter I use to maximize/activate the psychopy window, it just doesn’t work.
I have tried all the things that are mentioned here python - PsychoPy reopen window - Stack Overflow but to no avail.
What I’m missing here? Thanks in advance for your help.