Save all keypresses but continue the trial just with one of two specific keys #3133
Replies: 3 comments
-
Hey @nikbpetrov did you have an extension that recorded all key presses? Or am I remembering the wrong thing? |
Beta Was this translation helpful? Give feedback.
-
I do, it's found here, but is a complete overkill for this use case, if you ask me (and it's still draft). @jovitabruening What I would do here, is preserve the Important: Implement RT timing in the same way as is done in the plugin file for |
Beta Was this translation helpful? Give feedback.
-
Thank you both for the suggestions and help! @both: Maybe I have misunderstood something about how an event listener works. I tried using jsPsych.pluginAPI.getKeyboardResponse. However, what I coded in the on_load function always gets overridden by the basic settings of the trials. In detail:
In previous experiments, I always provided the trial choices only with the keys of the corresponding tasks (e.g. 's' and 'a' for task '0'). However, jspsych does not seem to enter the event listener and the "valid_responses": [75, 76, 65, 83]" from jsPsych.pluginAPI.getKeyboardResponse does not matter. But if I provide the trial's choices with the keys of both tasks, the trial already terminates when the wrong keys are used and does not wait for the right ones. I cannot figure out how to use NO_KEYS and finishTrial to solve this. How can I either have jspsych enter the event listener or prevent the trial from ending too soon? Here is my code for the trial. If you have any questions about the code or code related to it, please let me know. var stim_pres_TSWP = {
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I am quite lost with a specific change I need to make to my experiment. In my jspsych experiment, I must present two stimuli in one trial. However, the participants shall only respond to one of the two tasks. The simultaneous presentation of the two tasks is already implemented (I'm using a table to draw the two stimuli and prompt the participant with an arrow to the according task). Currently I use the type: "html-keyboard-response" for the trials and my saved data also includes information about which task needs to be responded to.
Is there a way to save not only the participant's response to the prompted task but also if he/she presses the button for the not prompted task? However, the trial should only end and the experiment continue once the participant pressed the key for the prompted task.
Any help or suggestions are highly appreciated :)
Beta Was this translation helpful? Give feedback.
All reactions