Hi I’m trying to create a free association task in psychopy. I’m pretty novice in terms of the coding and while I’ve been able to get the task itself to work, I would like to show participants the previous word they type in for each subsequent free associate. Given my lack of coding experience, I really am not sure how to go about doing this and would greatly appreciate any help I can get.
In builder, I have a keyboard named key_response, text component with $screen_text in the text
screen_text = ‘’
if(“backspace” in key_response.keys):
if(len(key_response.keys) > 0): key_response.keys.pop()
elif(“return” in key_response.keys):
if(len(key_response.keys) > 2): screen_text = ''.join(key_response.keys) thisExp.addData("assn_response", screen_text) continueRoutine = False
screen_text = ‘’.join(key_response.keys)