Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

End the Feedback screen with ONLY one allowed key from the keyboard

Hi,

My Feedback screen has now "Keypress" duration, but I would like the feedback screen to stay until the "space" is pressed, but not any other key.

I could try to add a keyboard after the feedback to implement that but, since I have a logger at the end of the trial, I am scared that another keyboard is going to make the logger act weird.

Any idea about how to implement that?

Thank you very much

Comments

  • Hi Mayte,

    I could try to add a keyboard after the feedback to implement that but, since I have a logger at the end of the trial, I am scared that another keyboard is going to make the logger act weird.

    Adding another keyboard_response will indeed have some side effects, because it will take the response into account in the feedback variables (e.g. acc and avg_rt). As a no-side-effects alternative, you could use a simple inline_script, like so:

    my_keyboard = Keyboard(keylist=['space'])
    my_keyboard.get_key()
    

    Cheers!
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • edited February 20

    Hi!

    Thank you very much for your reply. I set the feedback duration to 0, add this inline_script and is working perfectly.

    But now I have another problem and I do not have any idea about how to approach it.
    I have two buzzers for my subjects I configurated them as keys from the keyboard, "1" and "2" (using one dongle USB for both). I want to see if they coordinate to do it more or less at the same time. To do that (I am not good with coding, so I did everything with the GUI), I have a first screen with a keyboard, registering "1" and "2" responses. As soon as one of the keys is pressed, the program select one of two loops (to do that, I use the conditions in the sequence). So, if the buzzer1 is pressed, I move to another sketschpad. If the buzzer2 is pressed before 3000ms, I have a feedback screen. If not, I have a feedback screen and a sample...and same if buzzer2 is the first to be pressed.

    Now, my problem is that if both buzzers are pressed more or less at the same time, the program only recognizes one of them (the first one). Do you have any idea about how to fix that? I can be flexible with everything in the experiment, except the fact that I need to know which buzzers have been pressed the first one, and how much time (miliseconds) elapses until de second buzzer is pressed (less than 3000ms = succeed; more than 3000ms = fail)

    Sorry for all the questions, but I am new with opensesame and I have a lot to learn. Thank you very much!!
    PS: Should I move this question to a New Discussion?

  • Now, my problem is that if both buzzers are pressed more or less at the same time, the program only recognizes one of them (the first one). Do you have any idea about how to fix that?

    Do you mean that the second key press gets lost? If so, this might be because at the start of a sequence, pending key presses are flushed by default. (But you can disable that in the controls of the sequence.)

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

Sign In or Register to comment.