I am using Psychopy3 on a MacBook (stnadalone).
I am trying to add a component to my experiment where a routine is only displayed to participants if they press a certain key. I know this is covered in conditional branching but it does not seem to be working and I’m not quite sure why.
What I have tried so far
I have used the following code:
if your_keyboard_component_name.keys.lower() != ‘v’:
continueRoutine = False
as suggested by @Michael in
conditional branching topic. So i added this to my routine at the ‘begin routine’ part, using the name of the keyboard on my previous routine.
it gives me the following error:
AttributeError: ‘list’ object has no attribute ‘lower’
So when I use the code without the “.lower()”, then it will skip the second routine regardless of what I press.
And this is me trying it on a simplified version of my experiment. after figuring out how to make it skip only under the condition I press the key ‘x’, then I will have to figure out how to use it on my experiment which is a bit more complicated (I think).