psychopy.org | Reference | Downloads | Github

Text input field with PsychoPy 3.1.2

OS: macOS High Sierra 10.13.6
PsychoPy: 3.1.2

I am new to PsychoPy and I have been trying to design a cued recall test for my experiment. In this test, the cue word will be presented to participants with a blank text box next to it, and participants will be asked to type the target word for the presented cue.

I tried to use the prepared script from https://github.com/jacanterbury/PsychoPy-snippets. And I know that some people reported that it is working, but for me, it gives the following error:

n= len(theseKeys)
TypeError: object of type ‘KeyPress’ has no len()

I also attached the ss of the code I used.

Looking at the previous related topics, I think it has something to do with the version of PsychoPy I am using. Any ideas about how to fix this issue? Any help is highly appreciated!

2

Hi @eylul, I have put together a demo that writes user input on screen, it is similar to your task. It works in native (local) and online PsychoPy. Take a look at the task running at [1], and download a copy for yourself at [2]

[1] https://run.pavlovia.org/demos/textinput/html/
[2] https://gitlab.pavlovia.org/demos/textinput

Hi @dvbridges,

This is exactly what I needed. Thank you so much!!