From 3580b297679492157308600d63c05681b6d844f0 Mon Sep 17 00:00:00 2001 From: Becky Gilbert Date: Wed, 17 Feb 2021 13:55:55 -0800 Subject: [PATCH] change key_press to response in html-keyboard-response plugin #638 --- docs/plugins/jspsych-html-keyboard-response.md | 2 +- plugins/jspsych-html-keyboard-response.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/plugins/jspsych-html-keyboard-response.md b/docs/plugins/jspsych-html-keyboard-response.md index 34c94b6b..201d0a87 100644 --- a/docs/plugins/jspsych-html-keyboard-response.md +++ b/docs/plugins/jspsych-html-keyboard-response.md @@ -22,7 +22,7 @@ In addition to the [default data collected by all plugins](/overview/plugins#dat | Name | Type | Value | | --------- | ------- | ---------------------------------------- | -| key_press | string | Indicates which key the subject pressed. | +| response | string | Indicates which key the subject pressed. | | rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. | | stimulus | string | The HTML content that was displayed on the screen. | diff --git a/plugins/jspsych-html-keyboard-response.js b/plugins/jspsych-html-keyboard-response.js index 361236d0..017c13ad 100644 --- a/plugins/jspsych-html-keyboard-response.js +++ b/plugins/jspsych-html-keyboard-response.js @@ -89,9 +89,9 @@ jsPsych.plugins["html-keyboard-response"] = (function() { // gather the data to store for the trial var trial_data = { - "rt": response.rt, - "stimulus": trial.stimulus, - "key_press": response.key + rt: response.rt, + stimulus: trial.stimulus, + response: response.key }; // clear the display