Responses are recorded before keyboard component start time

OS : Mac OS Monterey
PsychoPy version : 2021.2.3
Standard Standalone? (y/n) yes

What are you trying to achieve?:

Hello everyone,

I am using the builder for the first time as I would like to launch my experiment online through Pavlovia in the future. I am currently experiencing an issue with the timing of keyboard responses. As I am doing a study on time pressure the timing of responses is very important. In one condition I want participants to give a response in under two seconds, while in the other condition I want participants to have to wait two seconds before they can make a response.

The issue I am experiencing is that responses are recorded before the specified start time of the keyboard component. Sometimes even in the routine before the routine in which I want to record responses (a fixation cross routine). This is an issue of course as I need them to not be able to respond before two seconds have passed in the no time pressure condition and I don’t want them to be able to respond before even seeing the stimuli in the time pressure condition.

I have specified the start time of the keyboard component and set it to force end of routine so that the next trial is initiated when a response is recorded.

I put the keyboard component at the bottom of the routine panel as I know that components are initiated top to bottom within a routine, so I figured putting the component that needs to happen last at the bottom would make sense? I also tried it with the keyboard component at the top but the issue remained and in fact, strangely enough, when I put it at the top then the next trial started after two seconds whether or not I had made a response.

I double checked the output files and indeed the responses are recorded in the negative (e.g. -0.5) when I click before the two seconds have elapsed.

If anyone knows why this is occuring and how I can correct it I would be very grateful!

Hi, do you mind sharing your task so that I can see specifically how everything is set up?

Sure!

The issue is within the medLot_trials and medLot_TP_trials loop. What I want it to be ideally is to have a fixation (in separate routine because I’ll eventually adapt it to be randomly drawn rather than fixed duration), then I’m presenting participants with two binary lottery choices and they have to press left or right to make a choice between the two.

You can ignore everything after these loops as it is a repetition with a different set of lotteries and another task. Please also note that it’s still a work in progress!

Thanks for taking a look at it!

P.S. because I’m new to the forum I couldn’t attach all the files necessary, so the WTP_trials loop won’t work but you don’t need it for the loops in which the timing issue occurs.

conditions.xlsx (9.6 KB)
timepressure_moretries.psyexp (263.6 KB)

Hi, so in your keyboard component, the Discard previous box was unchecked. I believe it will now work if you check those boxes.

That worked! Thanks a lot!