OSweb:keyboard with event type keyrelease seems to not work sufficiently
Imagine an experiment in which participants are asked to reproduce a certain duration by holding spacebar. After each reproduction, I would like to provide them with feedback about the total duration they have been holding the spacebar.
I used to do this with some inline script, but for OSweb I thought about a way to do this with the keyboard items. My strategy is two use two keyboard items.
Let me explain this with the attached working example.
I am displaying a simple text sketchpad item ("display untill key release") for a duration of 0 seconds. This sketchpad is then 'catched' by the first keyboard item ("keyboard_response_press") that continues if the spacebar is pressed. If this is true, it continues to the second keyboard item ("keyboard_response_release"). Now, the trial only continues after the spacebar is released. If true, it continues to an inline javascript item in which I can calculate the duration of the spacebar press by using the automatically logged variables in opensesame: time at which this feedback item was presented ("vars.time_feedback") and the second keyboard (vars.time_keyboard_response_release"). That is: "vars.rt = vars.time_feedback - vars.time_keyboard_response_release"
Now this strategy is working fine when running it in Opensesame, but doesn't when testing it in OSweb. It seems that in OSweb after a single keypress the keypress remains always 'true' (registered as pressed) and therefore each trial immediately continues to the next...
I am running this on the newest version 1.3.9.0 osweb...
Any help would be hugely appreciated!
josh
-------------------------------------------------
I just tried a very simplified version with a single keyboard item with event type set to 'keyrelease'. Again, when running in OSweb it seems that it always directly continues to next items. In other words, it doesn't wait until I release the key. could this be a bug for the keyboard items with event type: keyrelease?
Comments
Hi Josh,
Your strategy makes sense, unfortunately Key release is not supported in Osweb. See here for a list of currently (non)supported functionalities: https://osdoc.cogsci.nl/3.3/manual/osweb/osweb/#supported-functionality
Best wishes,
Eduard
Alright, thanks for the reply. Should have checked out that list better.