Record numbers of keys pressed, rather than reaction time

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10):
PsychoPy version (e.g. 1.84.x):
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?:
Trying to build the d2 concentration test. I need the number of times the response keys got pressed during a trial.
What did you try to make it work?:
Used every possible setting.
What specifically went wrong when you tried that?:
Include pasted full error message if possible. “That didn’t work” is not enough information.
The data sheet just shows the reaction time for the keys.

Thank you so much for your help!

Hi, psychopy doesn’t save the number of keys pressed by default but you can custom save this within your csv output.

Assuming the name of your keyboard is key_resp, you would need a code component and at the End Routine tab, use this snippet

thisExp.addData('n_keypress', len(key_resp.keys))
1 Like