Time response on first key

You could use the time from the built-in clock:

# Begin routine
firstKeyTime = None  

# Each Frame
keys = event.getKeys()
if 'escape' in keys:
    core.quit()
else:
    if keys:
        if firstKeyTime is None:
            firstKeyTime = t  # Time from routine start to first key press

# End routine
thisExp.appData("firstKeyTime", firstKeyTime)
1 Like