Record the time of each key press and release during typing #2966
Replies: 1 comment 3 replies
-
I think the easiest way to achieve this is to use the plugin-survey-text plugin (so that you show what a participant is typing on the screen). You can adapt the plugin to also include the time stamps of key presses as data: Using jsPsych 7.2.3, you can adapt the file plugin-survey-text.js as follows: On line 187 (before the comment that says //backup in case autofocus doesn't work), add the following:
This creates a data structure in which key presses are stored. It also adds an event listener to the first input field that listens to key presses. Note that with the way it is currently implemented, it will only work for the first input (the survey plugin allows you to use multiple input fields). It also only works in the specific case that your input field only has 1 row. To add the data to the output of the plugin, scroll a little bit down to the comment that mentions // save data. Here you can add the key_presses:
Using the plugin as follows will allow you to keep track of the key_presses:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I would like to start an experiment which asks participants to type things. Is it possible to record each time stamp when participant makes a key press or release, as well as showing what is typing in on the screen?
Thanks for help!
Beta Was this translation helpful? Give feedback.
All reactions