Including key response within a loop

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?:
I am trying to include key response in an experiment that comprise video stimulus randomized through a loop.
What did you try to make it work?:
I tried :

  • to write the name of the column (“allowed keys $ = cle”, set every repeat) referring to an external list (loaded when I created the loop)
  • to let it blank
  • to write the expected keys directly ("allowed keys$ = ‘v’,‘b’).
    What specifically went wrong when you tried that?:
    My experiment is an experiment that include videos that need a response from the participant, and videos that does not need a response. Since I randomized the videos, when I click on “force end of routine”, the videos follow one another until a video that does not require a response ends, so without a response from the participant. At the end of this video, the videos stop following one another and a blank screen appears, without creating a stoppage of the experience. When I don’t click “force end of routine”, only one video works at first, then a blank screen appears.
    The key response are the same for every video.
    The thing is that I don’t necessarily want that the key response force end of the routine, but there is this blank screen after the first video. (When I try to run the script without the key response component, it worked).
    ![Capture d’écran 2022-03-15 à 16.27.05|456x354](upload://4o
    ![Capture d’écran 2022-03-15 à 16.26.03|544x500](upload://eO

    DDj4cnLgTI09cK1GOCtigT66I.png)
    kGTo1U9WLMVefgvvbJkSkBZSh.png)

Thank you in advance for your reply!

Include pasted full error message if possible. “That didn’t work” is not enough information.