Adding Conditional Changes in Sequence based on Keypress
I am working on creating a psych experiment. My goal is to create an experiment where a photo is shown for 2 seconds. After, participants are given the choice to press "1" to see the image again for 4 seconds or "9" to see a black screen for 4 seconds.
I have found that keyboard responses only collect keypresses and cannot change the sequence of the experiment. Is there a way to override this/change it with adjusting the code in the script? I have tried rewriting the sketchpad script (where the image is shown) to "show if: keypress=1" but this has been unsuccessful.
Looking for tips from someone with a more extensive background in coding!