Description of the problem:
Hi,
In my experiment I have slider response followed by key press (space) to go to next trial. I have observed that sometimes participants are pressing space without responding on the slider. I loose data in such situations. I want to hold the trial until slider response is given then only the “space” press should work to go to next trial.
That does seem to get rid of the error, but it doesn’t seem to result in the intended behavior (prohibiting key press until sliders contain a response).
I have two sliders so it is slightly different from the above example, but it doesn’t seem to work in the minimal case of a single slider either. Any ideas?
For the sake of record keeping - I realized the “force end of routine” in the keyboard component was overriding the code component. Of course, once I unchecked that, it worked as expected.
Although I guess a weird thing is that if the participant presses “space” before responding, once both sliders are clicked then it will automatically move on without a key press. The ideal situation would be that the “force end of routine” key press would have to occur after the slider response, so that accidental presses wouldn’t be “counted”.
Nice! This totally worked. For anyone trying to achieve this in the future - I had to put this code in a new code component with the “Auto” translation designation to get it all to work properly.
I am currently using this code and it’s working perfectly fine. The only issue that now occurs is that when a participant wants to use the slider AFTER pressing space it immediately takes the first response on the slider and moving the slider is no longer possible. If you don’t press space before using the slider it’s still working completely normal. How is it possible to fix that so my participants can still change the response on the slider until pressing space to end the routine?