Reproduce morse sequence on keyboard

Win10 - PsychoPy-2022.2.3

Hello.
I am a beginner at Psychopy who only used the builder so far, so please don’t hesitate to answer with very basic explanations and solutions as I may have overlooked them.
I am currently trying to set up an experiment in which the participant has to listen to a morse code sequence with long and short beep sounds. For instance, a simple sequence could be “long/short/long”.
The goal is to have the participant reproduce this sequence on the keyboard by pressing the space bar for a short or long time. For instance, to answer after having heard the sequence “long/short/long”, the participant would press the space bar rather longly, then shortly, and then long again.
Thus, I would like to store for how long the space bar is pressed for each little segment, so three durations for one answer.

So far, I have approached the problem from two different angles:

  • try to have a trial/keypress
  • in one trial: in Data > Store > all keys

The second idea seems more promising as it recognizes that the space bar was pressed three times and it write down the beginning of when it started to be pressed (see image below)
psychopy

However, so far, it does not seem like the duration of each key is being recorded. I have played around with the settings a lot without much success. The answers I find online are all giving code without explaining it, so please, if the only answer is to give up on the builder and use the coding section, make sure to explain it a little.

Thanks in advance for any answer!
This is also my first post on here, so please indicate me if I can add anything to make this post clearer.

Hi @L_Ota, here is a demo that should help: Rebecca Hirst / type_dynamics_demo · GitLab

Thanks, this was helpful!

1 Like