I am creating an experiment in which participants are shown lists of words and then later asked to recall as many words as they can by typing them. What I am trying to figure out is how to get all of the words that the participants type in to show up at the same time on the screen, in columns (like a list). Right now I only am able to get one word to show up at a time. I’m not really sure how to go about this. Here is the code that I’m using:
The first thing I have is the keyboard, named “Indi_response”, in which all characters are allowed, and all characters are stored. I have this set at constant.
Then I have a keyboard for an enter key which ends the routine.
Next, I have this code:
#In begin experiment: msg=' ' numkeys=0 #In each frame: templist=Indi_response.keys if templist.count('return')==1: Indi_response.keys.pop() Indi_response.keys=''.join(Indi_response.keys) Indi_response.rt=Indi_response.rt continueRoutine=False elif templist.count('space')==1: Indi_response.keys.pop() elif templist.count('lshift')==1: Indi_response.keys.pop() elif templist.count('backspace')>=1 and len(Indi_response.keys)>=2: Indi_response.keys.remove('backspace') Indi_response.keys.pop() msg=msg[:-1] elif templist.count('backspace')>=1 and len(Indi_response.keys)==1: Indi_response.keys.pop() elif (len(Indi_response.keys)-1) == numkeys: msg='' msg=msg.join(Indi_response.keys) numkeys=len(Indi_response.keys)
Finally, I have a text component that displays $msg (which is defined in the code), and is set to every frame.
Any ideas on how to fix this to display all responses?