[solved] How to get out of sequence without stopping the experiment
Hello there!
I'm currently doing a thesis research. My research is about priming. I want to prime anti social behaviour with a game. Afterwards I want participants to ''help'' an other study where they need to ''measure'' reaction time. They need to press on ''q'' as fast as possible when they see a circle. They can't decide for themselves when they want to stop.
I want to make a ''stop'' button with the keypress p. But how is this possible without stopping the whole experiment (so not pressing on escape). Thank you.
Comments
Hi there!
I assume you already have the first part running? (i.e. press q as fast as possible). How to go about realizing this stop button might depend on how you've constructed the experiment so far.
For instance, if there is a loop repeating indefinitely (with a circle appearing every iteration) you could add a second button option to the code that collects keyboard responses:
And later, in the loop, I assume you have something like response = my_keyboard.get_key(). Here, you add the command:
Now we're out of the loop and will continue in whichever way you want.
Let me know if it works. Good luck!
Josh