| Reference | Downloads | Github

Textbox issue with letter appearing

PsychoPy version - 2021.1.4
OS - Windows 10

Hi there,

I am trying to create an experiment where participants take a recognition memory test. After the words are done being shown, there is a brief questionnaire at the end where participants are asked if they noticed patterns in the words (eg, did you see any compound words? If so, type them in the textbox below).

I designed the code for the questionnaire part to be two routines joined by a loop. In the first routine, the question appears and if the answer is ‘y’, a textbox and some other writing should appear. If the participant answers ‘n’, the code should just move onto the next question. The problem I am having is when they answer ‘y’, more often than not the letter will show up in the textbox, which is no good. I am attaching photos of how it looks in the Builder. I am also uploading the .Py file and the .xlsx files used.

Thank you in advance for any advice!

(Routine 1, where participants are asked the question)

(Routine 2, where participants write their response if they answered ‘y’ to the question)

TestingWords_1 is the file for the 48 words in the main trial. Testing_Questionnaire.xlsx is the five questions in the questionnaire.

TestingWords_1.xlsx (9.3 KB)

Testing_Questionnaire.xlsx (10.5 KB) (40.2 KB)

Testing_Questionnaire.psyexp (40.7 KB)

It sounds to me like you need a command to clear the keyboard at the beginning of the trial section of your code. The one I’ve seen in a similar experiment was:


I would put it in Routine 2 in the “begin routine” section of the code. Good luck!


why do have two keyboard-components for ‘y’ and ‘n’?

Best wishes Jens

Hi there,

This worked perfectly. Thank you very much!

If the participants answers ‘y’ to a question, it should then prompt a second screen to come in with the textbox and another line of text (Examples.text). If they answer ‘n’ to a question, the code should just move on to the next question. So two different keyboard-components for two different outcomes.