keypress not detected #2240
Unanswered
jelkastojanov
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone! For my experiment, I need to create a new plugin. I have built a skeleton of it following this tutorial: https://www.youtube.com/watch?v=XQcsFwAmbiw
For now, I just want participants to see some short instructions and press a button on a keyboard to continue. It seems pretty straightforward, but when the experiment reaches this point, the 'continue' keypress (space) is not registered and the TypeError 'v.toLowerCase is not a function' pops up which points me to the original jspsych.js file and to the following line:
var valid_lower = parameters.valid_responses.map(function(v) {return v.toLowerCase();});
Here's the plugin code (non-related chunks of code are commented out so they shouldn't cause problems):
plugin.trial section
Main task code initiating the plugin:
(Variable displayCards has been included in the timeline, and it is displaying properly, the problem is only the keypress.)
Does anyone have an idea of what might be the issue? Thank you very much!
Beta Was this translation helpful? Give feedback.
All reactions