Changing the default Esc + Q buttons to quit.
in OpenSesame
Hello everyone! We are running experiments with children in OpenSesame. After testing it on a few classes, we noticed that some children press random keys on the keyboard, one even exited the experiment herself. To avoid this, is there a way to change the default Esc + Q to exit? Possibly making it somewhat more complicated for them to exit?
Thank you in advance!
Simona
Comments
Hi Simona,
When the Escape key is pressed, the
exp.pause()function is called. By default, this function shows a pause screen, waits for a key press, aborts the experiment if the user presses Q, and resumes otherwise.But you can override this behavior with a custom function that can do whatever you want. For example, if you add the following to the prepare phase at the very start of the experiment, then pressing Escape will no longer do anything.
def my_custom_pause_function(): print('I don\'t do anything right now, but I could!') exp.pause = my_custom_pause_functionIt also possible to change OpenSesame such that Escape no longer calls
exp.pause(). But that's a bit more involved, and probably not necessary in your case.I hope this helps!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan!
Thank you for your reply. That's perfect, that way we can make it *even* more complicated to exit the experiment for the kids!
Thanks again!
Simona