I ran into problems using event.waitKeys method. When I set the timeStamped attribute to True, it does not return anything and just leaves it blank.
Here’s my code:
from psychopy import visual, event, core import sys win = visual.Window( size=[400, 400], fullscr=False, allowStencil=True, color=[-1, -1, -1], units='pix' ) fixation = visual.ShapeStim( win=win, vertices=((0, -20), (0, 20), (0, 0), (-20, 0), (20, 0)), lineWidth=2, closeShape=False, lineColor="white", units='pix', ) fixation.draw() win.flip() clock = core.Clock() clock.reset() response = event.waitKeys(timeStamped=True) time = clock.getTime() print time, response win.close() sys.exit()
And here’s what I would get:
Still, if I set the attribute to clock, I would normally get something like this:
0.868468999863 [('i', -1.8378880023956299)]
which is also abnormal and beyond me. Does anyone here know what is wrong?