Prevent logging early key response
Hi All,
I was wondering of someone could help me out with the following problem. We have a task where participants have to put their answer into the form_text_input widget. The problem with this is that it already registrates an unwanted early (single) keypress that was made during the stimulus presentation (with sketchpad). How can we prevent this from happening? We want a empty answer screen (or the possibilty to press two keys). We already tried to turn off/on the keypress flush option, but this did not work.
Does anyone know how to solve this problem?
Thanks in advance!
Best,
Smiddy
Comments
Hi Smiddy,
where did you do the keypress flush option? In a keyboard response item? If so, what was the duration of it then?
I am surprised that this can happen. I would have expected that the text input form automatically flushes all the keypresses, but if not, what you can do is indeed flushing it manually. If the keyboard response item doesn't work, you can try to do it with Python code (in an inline_script, see here).
If that doesn't do it, could you share your experiment, so I can see what is going on?
thanks,
Eduard
Hi Eduard, thanks for your quick response. I turned the keypress flush off in all sequences. It's not in a response item. Therefore, I don't think it's possible to code with inline script.
I putted the OpenSesame experiment in the attachment. It's in Dutch. The problem arises when the mathematical problems starts. If you press for exampe 4 on the first equation that is showed, this answer is already registered into the form_input text widget. Hopefully you can figure out how to prevent this from happening...
Thanks!!
Ah, I see what you mean. @sebastiaan, it seems impossible to flush keyboard responses before a text_input widget/form. I'd consider this a bug, or is there anything that I'm missing here?
Eduard
Hi @SMD1990 and @eduard ,
Thanks for pointing this out. 👍️ This is indeed strange behavior and filed an issue for it. For now, a simple way to flush the keyboard is to insert an empty
sequencejust before theform_text_input, because asequenceby default flushes the keyboard.— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
@sebastiaan and @eduard. Thanks for finding the solution. It works fine now!!!