In my experiment I am trying to have participants press and hold ‘space’ to start, after which they progress to a ‘fixation’ routine with a variable time lenght after which a routine start where they have to press on of several keys depending on stimuli. In this routine I also want to record the time when ‘space’ is released as a measure of movement start time, but I can’t figure out how. Everything works except I can’t figure out how to register the key release, when the key wasn’t pressed in the same routine.
This is how I regiester key press and hold to progress to ‘fixation’ (in every frame tab):
if kb.getKeys(['space'], waitRelease=False, clear=False): continueRoutine=False
this is how I am attempting to register and save key release time (in every frame tab):
if kb.getKeys(['space'], waitRelease=True): trials.addData("RT_release", myClock.getTime())
I don’t get any error messages, I just don’t get my key release time saved.
OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2021.2.3
Standard Standalone? (y/n) y
**What are you trying to achieve?: register and save time of key release, which was pressed and held in a preceding routine.