I would like to let you know that 2024 version of psychopy has a keyboard handling bug which causes misses of the “press” keyboard events. Have to actually press a button for 10-20 times before it gets detected.
in the “time line” editor, I add two “trial” blocks
the first one has a text “hello” shown for 10s and a keyboard which waits for a button press.
the second one has a text “bye” for 3s.
the idea is as soon as a button is pressed, the slide advances…
in 2022 version, the task works correctly and responds to a button press.
in 2024 version, the first slide sits for 10 seconds as it cannot get a button press..
(well, If I press 10-20 times, eventually it gets is)
This sounds like the non-slip timing error. Try setting the max duration in Routine Settings. I’ll link to a relevant post later if you haven’t sorted it out.
I would like to thank you for the link. it is very educational and some of the “artefacts” described there (like black screen) I have also
observed. The practical recommendation to leave each component duration blank and use “routine settings” → flow-> duration (if I understood correctly) to set one common duration is an interesting one.
However, there is still no explanation of what “non-slip timing” is and the provided link does not appear to be relevant (at least
without an explanation how it is relevant). I found this link
which again does not explain what “non-slip timing” is, but maybe it means an accumulation of time-related errors.
on that page, it is not clear how/why waiting until a timer has reached a certain value relates to a screen refresh period.
Unfortunately, again even if it is true (for some strange reason), I do not understand how this might be related to “missing” keyboard events.
keyboard events are “latched” by the operating system which means that once an event is generated it is stored in a buffer/queue until it is has been read or cleared.
Since I observe a massive loss of “press” buttons events, there is a mechanism which clears the buffer/queue without checking it.
it is a bug…
as I said earlier, in 2022 version, the effect is not observed.
so there appears to be a problem caused by changes between the two versions
I don’t think your keyboard event is missing. I think that it is ending the routine (screen goes black) but failing to move on to the next routine (because the routine is set to a fixed duration). The solution I give here tells PsychoPy not to fix the duration of this routine.