Wait until correct key is pressed #1241
-
I am a bit stuck. I want to present a stimulus and record every key press and its RT until the correct key is pressed. So stim on, start clock, then record every key and RT. The last record will be when the correct key is pressed. Any advice gratefully received, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi Philip, You'll need to modify a plugin to do this. You can set the jsPsych/plugins/jspsych-html-keyboard-response.js Lines 123 to 128 in 6bcb624 Every time a response is made it calls this function jsPsych/plugins/jspsych-html-keyboard-response.js Lines 105 to 119 in 6bcb624 You'll want to edit this so that jsPsych/plugins/jspsych-html-keyboard-response.js Lines 90 to 95 in 6bcb624 For consistency with other plugins, you'll want to use |
Beta Was this translation helpful? Give feedback.
-
As ever, really helpful Josh thanks Philip. |
Beta Was this translation helpful? Give feedback.
Hi Philip,
You'll need to modify a plugin to do this.
html-keyboard-response
is probably the right starting point.You can set the
persist
parameter totrue
on thegetKeyboardResponse()
method. This will allow you to gather more than one response.jsPsych/plugins/jspsych-html-keyboard-response.js
Lines 123 to 128 in 6bcb624
Every time a response is made it calls this function
jsPsych/plugins/jspsych-html-keyboard-response.js
Lines 105 to 119 in 6bcb624