psychopy.org | Reference | Downloads | Github

keyboard.getKeys() record keypress at key press rather than key release

Hello,

in our experiment participants are supposed to wait until a beep ends and then press a key. We’re recording the key presses with keyboard.getKeys() (for time accuracy.)
The next interval is supposed to start when the button is pressed. However, with keyboard.getKeys() it currently starts when the button is released.
This can lead to situations where the participant is pressing the button before the beep occurs and release it afterwards (worst case: this will mess up our reaction times).

I have checked the documentation but can’t seem to find a way to record key presses on key press rather than key release using keyboard.getKeys(). Any help would be appreciated!