From fb2ad412242e60cad5ea9531546158aa70ab9e7b Mon Sep 17 00:00:00 2001 From: Becky Gilbert Date: Fri, 9 Apr 2021 13:41:31 -0700 Subject: [PATCH] move WebAudio keyboard RT seconds-to-ms conversion from audio-keyboard-response plugin to getKeyboardResponse --- jspsych.js | 2 +- plugins/jspsych-audio-keyboard-response.js | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/jspsych.js b/jspsych.js index 331e39dd..e051b9df 100755 --- a/jspsych.js +++ b/jspsych.js @@ -2337,7 +2337,7 @@ jsPsych.pluginAPI = (function() { } parameters.callback_function({ key: key, - rt: rt, + rt: rt_ms, }); if (keyboard_listeners.includes(listener_id)) { diff --git a/plugins/jspsych-audio-keyboard-response.js b/plugins/jspsych-audio-keyboard-response.js index 75d80144..93d785f4 100644 --- a/plugins/jspsych-audio-keyboard-response.js +++ b/plugins/jspsych-audio-keyboard-response.js @@ -155,9 +155,6 @@ jsPsych.plugins["audio-keyboard-response"] = (function () { jsPsych.pluginAPI.cancelAllKeyboardResponses(); // gather the data to store for the trial - if (context !== null && response.rt !== null) { - response.rt = Math.round(response.rt * 1000); - } var trial_data = { rt: response.rt, stimulus: trial.stimulus,