Hi Chencan,
Thanks for the update.
>> is it possible that the drawing is directed to the experiment window, which is occluded by the blank calibration window
This is not possible, but the opposite is. ;) i.e, the psychopy experiment window could be occluding the initial calibration window, while the iohub keyboard events are still being sent to the calibration window that you can not see.
When you call 'runSetupProcedure', is your experiment window blank before calling 'runSetupProcedure' ? My guess it is.
The work around I have found for cases where the calibration window is hidden by the experiment window (it does not happen on all computers / graphics cards / OSs , not sure what the variable is that makes the issue occur or not) is to add the following code before and after each time you call runSetupProcedure(), assuming 'self.window' in the code below is holding the psychopy experiment window, and 'eyetracker' is holding the hub.devices.eyetracker device:
# minimize the psychopy experiment window
#
self.window.winHandle.minimize()
# call the iohub eye tracker calibration / setup routine
#
eyetracker.runSetupProcedure()
# restore the psychopy experiment window
#
self.window.winHandle.maximize()
self.window.winHandle.activate()
I have only tried this on windows, but in the cases where the issue that I think you are reporting has occurred, this fixes the issue.
Please let me know if it also fixes the issue for you.
Thanks again,
Sol