I found solutions how to display typed responses using Builder, but I have trouble finding functions to do that in Coder…
While presenting a question something like this,
typedText = ''
textEntryCompleted = False
showText = visual.TextStim(myWin, text=typedText, pos=(0,-.5), color=(-1,-1,-1), height=0.1)
while not textEntryCompleted:
keyPressed = event.waitKeys()
if 'return' in keyPressed:
textEntryCompleted = True
elif 'space' in keyPressed:
typedText = typedText + ' '
else:
typedText = typedText + keyPressed[-1]
showText.text = typedText
showText.draw()
myWin.flip()
This doesn’t work with uppercase/lowercase stuff, but that is also possible using the ‘modifiers=True’ argument in event.waitKeys() and the Python string function .upper(), but the logic is a little more complicated.