Multiple keyboard components

If this template helps then use it. If not then just delete and start from scratch.

OS: Win10
PsychoPy version: 2020.3.5
Standard Standalone

Hi, I’m a very amateur PsychoPy user so sorry if this seems like an obvious fix.

I’m trying to create a sequence of 5 numbers that the participant has to encode and recall after doing a task. However, I want the participant to go at their own pace, so presenting them with one digit and then they press the spacebar to go to the next digit.

To do this I created a routine called ‘Encoding’ and had 5 text components with a keyboard component after each one.

I tried changing the timings of the components to see if it would affect anything but when the spacebar is pressed, it goes to the next routine and not the next text component. I even tried unchecking the ‘Force end of routine’ box but this resulted in the keyboard having no effect and the text component just following the timing.

I know I can create separate routines but this is not ideal and if there is a way I can have all this in one routine would be great.

Many thanks!

You need to use a loop to loop through the numbers and have a space bar routine at the end of the loop.

Hi Sal, thank you for replying.

So I would have the encoding routine, with one text component and a loop around the routine? How would this be set out in an excel file may I ask?

You would just add the data like you would with any other variable.