Following a recent paper suggesting that response duration can provide unique information to reaction times, I am trying to record durations. According to the manual, duration should be accessible, but I get messages that its undefined.
Using the following code in ‘Every frame’, I can get the name of the response and the RT, but not duration.
if key_resp.keys: print("resp made") print(key_resp.rt) print(key_resp.duration) #for key in keys: # print(key.name, key.rt, key.duration) continueRoutine = False
I’ve tried with ioHub and psychtoolbox as the input keyboard backend and neither provide duration. They both give the error
AttributeError: 'Keyboard' object has no attribute 'duration'
I’ve also tried retrieving the key information, but that doesn’t work either.
if key_resp.keys: keys = key_resp.getKeys(['a','l'], waitRelease=True) for key in keys: print(key.name, key.rt, key.duration)
Is there something else I can try? Here’s a small test experiment:
test_resp_duration.psyexp (15.3 KB)