Key binding #826
Answered
by
jodeleeuw
AustinThoughtLab
asked this question in
Q&A
Key binding
#826
-
Is there a way to bind keys within an experiment? For instance, in an experiment where participants press F or J depending on stimulus length, is it possible to indicate at the beginning of the experiment that F = short and J = long or vice versa? |
Beta Was this translation helpful? Give feedback.
Answered by
jodeleeuw
Jul 2, 2020
Replies: 1 comment 3 replies
-
I'm guessing that you mean in the experiment data file so that it is clear what each key means? Is that right? If so, you could use: jsPsych.data.addProperties({
short_key: 'f',
long_key: 'j'
}) This will add two columns to your data for every trial indicating the mapping for short and long. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
jodeleeuw
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm guessing that you mean in the experiment data file so that it is clear what each key means? Is that right?
If so, you could use:
This will add two columns to your data for every trial indicating the mapping for short and long.