The current version of PsychoPy now provides a new keyboard
hardware class that can be used in place of the older event
functions:
https://www.psychopy.org/api/hardware/keyboard.html
Note that these functions provide a waitRelease
parameter that allows you to measure the duration of a keypress as well as its initial onset time. The timing ability is also drastically improved.
See here for an example:
Sorry that psychtoolbox lib wasn’t included in the win64 standalone. It is in the next release (3.1.1).
The idea of waitRelease is that, in a scenario where you want a duration to be reported we have to decide what to do about keys that are still currently held down (the press is incomplete - we don’t yet have all the data for those).
With waitRelease=true only key presses that have been completed are returned, so all are guaranteed to have a duration value, whereas with waitRelease=False a ke…
1 Like