Reply To: Response time limit

PennController for IBEX Forums Support Response time limit Reply To: Response time limit

#6404
Jeremy
Keymaster

Hi Rosa,

I am not able to reproduce your keypress problem: the experiment does proceed to the next trial as soon as I press the spacebar when I see the “Press SPACEBAR” message, regardless of whether or which key I pressed during the 2000ms. Do you have another Key element named “spacebar” in your trial by any chance, or any other conflicting Key element in a Header or a Footer? You could also try disabling Key elements after you’re done with them, e.g. add getKey("response").disable() before your “spacebar” Key element (but again, I can’t identify your problem so it’s just a wild guess)

Regarding the conditional feedback messages, you can do something like this:

getKey("response")    
    .test.pressed()
    .success( getKey("response").test.pressed(row.answer)
        .failure(newText("negative feedback", "Wrong answer!")
            .log()
            .print()
            .center()
            .cssContainer({"font-size": "160%", "color": "red"})
        )
    )
    .failure(newText("slow", "Too slow...")
        .log()
        .print()
        .center()
        .cssContainer({"font-size": "160%", "color": "red"})  
    )

Let me know if you have questions

Jeremy