End routine after TWO key presses

Thanks again Michael - I’m being too hasty and not testing this stuff!

#beginRoutine Tab
thisResp = [] #make an empty list

#every Frame
keys = event.getKeys()

if keys: # if at least one key exists in the list,
    if 'escape' in keys: # now need to check for the quit key ourselves
        core.quit() 

     else: #add this frame keys to response list
        thisResp.append(keys)
        if len(thisResp) == 2:
					thisExp.addData('response',''.join(thisResp))
        	thisExp.addData('RT',t)
          contineRoutine = False #end routine.