Hi, in my experiment participants reply to stimuli by writing a word and I would like to record the time it takes them to press the first key. I’m not sure how to do that, especially as I do not have a keyboard response in the experiment (I need the participants to see what they are writing which uses the code and text response). I’ve tried just adding "thisExp.addData(“timereposne”, t), but it gives the time it takes to finish a routine which is not ewhat I want.
this is what I have in the code right now, could you tell me what I should add?
Begin Experiment import string allLetters = list(string.ascii_lowercase)
Begin Routine textFill = ''
Each Frame keys = event.getKeys() if 'escape' in keys: core.quit() else: if keys: if keys == 'space': textFill += ' ' elif keys == 'backspace': textFill = textFill[:-1] elif keys in allLetters: textFill+=keys showresponse.setText(textFill)
Each Routine thisExp.addData("textResponse", showresponse.text) if showresponse.text.lower() == answercorrect.text.lower(): correctResp = 1 thisExp.addData("correct", 1) else: correctResp = 0 thisExp.addData("correct", 0)