[solved] OpenSesame doesn't respond to first keypress
Okay, so I'm really new to OpenSesame, but I did manage to make a simple validation study using short video clips. It runs perfectly, with only one problem. After each clip, two keyboard responses have to be given. I set the duration on key press, but the text display showing the response categories only disappears after the second keypress. First, I thought it was because I had forgotten to set the duration of the clip (this was still on keypress) but after I changed this to the duration of the clip, there was no difference.
My first question is: does anyone know what to do about this? I have a video clip, followed by a text display, followed by a keyboard response and a logger. I'm not sure if both keypresses are recorded in the log file, I don't have to analyze the data myself so I haven't figured out how the log file works, but I can upload one if it is helpful.
My second question is: I mentioned that two responses have to be given after each video clip. Do I need to add a logger after each keyboard response, or is one logger enough?
Comments
Hi Annemay,
Welcome!
As far as I can tell the problem is that you use the text_display item as a response collection item as well, by setting the duration to 'keypress'. So, first text_display collects one response, and then keyboard_response collects another response. The easiest way to get around this is by setting the duration of the text_display to 0 or (non-preferred) by omitting the keyboard_response. You can find a similar situation (using a sketchpad instead of a text_display) in the tutorial.
More info:
Hope this helps!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan and Annemay,
I have checked for other topics if there was a question like that i would ask, but i couldn't find. I have a problem similar to that Annemay have mentioned before.
I target some contiguous questions to the subjects via the form_text_input and collect the reaction times via the logger. My main purpose is to obtain the first keypress time following the question. But the programme is giving me the time that the subjects press the ENTER key and move on to the other questions. I have no interest in the whole answering time, i have to obtain exactly the first keypress. Is there an option for this purpose? For example can we add the first keypress as a "new variable"?
Hi Deniz,
I'm afraid the solution to your question is not trivial. It is not impossible, but it requires you to do quite some
inline_coding. Also, I don't think you should you use theform_text_inputhere. Instead, you could manually define a basic version of this item, with the addition that, the after the first key press a variable is created that contains the reaction time for this first stroke.The general procedure looks like this (all placed in an
inline_script):1) in a
whileloop, your prompt for subjects to write something (e.g. input())2) As soon as the subjects starts to type, you save the reaction time in a variable (In case the input() function doesn't stop until
Enterwas pressed, you can force it to break for any input and make the following actions depending on which key was pressed)3) In every iteration of the loop, you update a string containing everything that is already written and print it to the canvas (OpenSesame's
canvas.text())4) As soon as
Enterwas pressed, you break the loop and go to the next element.I hope this is enough, to get you started. Let us know if you need more help with it.
Good luck,
Eduard
Edit: This is actually not comparable to the issue annemay had. It would have make more sense, to open a new thread for your issue.