Give visual feedback based on response without ending trial

Ok, just to clarify, your participants will respond multiple times during a single 5 second recording? If so, and each visual feedback lasts 2 seconds, it seems there is little time for giving feedback for more than 2 responses.However, if this is your design, you could do the following:

Begin Routine

text = visual.TextStim(win=win, name='text', text='+',height=0.3)
startTime = None 
RTs = []  # Create new list for holding RTs

Each Frame

keys = event.getKeys()
for key in keys:
    if 'q' in key:
        core.quit()  # quit key
     elif 'space' in key:
        RTs.append(t)
        startTime = t

if startTime is not None:
    if startTime+2 >= t:  # present for 2 seconds from key detection
        text.draw()

End routine

for idx, rt in enumerate(RTs):
    thisExp.addData("RT{}".format(idx), rt)  # Add an RT column to data file for each RT
1 Like