I want the extra presses after the correct answer on the keyboard to be output to the data

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10):
PsychoPy version (e.g. 1.84.x):
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?:

What did you try to make it work?:

What specifically went wrong when you tried that?:
Include pasted full error message if possible. “That didn’t work” is not enough information.

I want the extra presses after the correct answer on the keyboard to be output to the data. However, only the first press should be accepted as an answer. What should I do?

extra key presses.zip (16.1 KB)
Hi, here’s a minimal demo that saves all the key presses and their corresponding reaction time. It also checks the first key press of each trial to see if it matches the correct answer.

WARNING User requested fullscreen with size [1536 864], but screen is actually [1920, 1080]. Using actual size
File “D:\Masaüstü\TASX\TASX_lastrun.py”, line 530, in
trials.saveAsExcel(filename + ‘.xlsx’, sheetName=‘trials’,
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\data\base.py”, line 324, in saveAsExcel
dataArray = self._createOutputArray(stimOut=stimOut,
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\data\trial.py”, line 444, in _createOutputArray
tup = eval(strVersion) # convert back to a tuple
File “”, line 1
[‘space’], [‘space’], , , [‘space’]

I’m not sure I’m understanding. Did the task crash or was this just a warning message? If it did crash, then you can look at the message in the stdout window.

the task was crash

Would you mind sharing the Traceback error message? You can find it in the stdout window on your Runner View