Pressing key duration

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:

1 Like