I’m working on PsychoPy 1.85.2 in Builder view to create an experiment. My goal is a Visual Dot Probe where a dot appears behind either an innocuous picture, or a picture of Alcohol. Participants must respond to the location of the probe with a key-press, and will have 1000ms to do so after stimulus presentation. The process then loops. This all works fine.
My issue is with needing to provide participants with feedback if they do not press a key. It is as simple a short ‘No Response’ text presentation if they do not respond within the 1000ms window. So far, since I am saving the correct key press into a .csv data file (with other information) for data processing, I check in a separate routine after stimulus presentation whether a key was logged for that presentation into that cell with the following:
if VisualProbeResponse.keys == ‘q’:
feedbackString = ’ ’
if not VisualProbeResponse.keys:
feedbackString = ‘No Response’
else:
feedbackString = ’ ’
feedbackString is defined in the text box of Response Text as $feedbackString so that it will display ‘No Response’. Since I do not need a text presentation for a correct, incorrect, or any other response, I have simply left a space after feedbackString.
The code does work, but in reverse? If I press nothing, the screen is simply blank for a moment before moving to the next stimulus presentation. If I press literally any key on the keyboard, even those not defined as allowed keys by my response Keyboard component, ‘No Response’ will show. I’m struggling because it doesn’t crash or break necessarily, it simply isn’t working as I expected it to.
Thanks for any help anybody can give! Looking to get this cleared up!