Hi, I am a starter with PsychoPy, and this is the first time I asked a question in the Discourse. I have tried to help myself and borrowed code from different posts but it still does not seem to work properly.
macOS Mojave: version 10.14.6
PsychoPy version: 2020.2.3
Standard Standalone? Yes
What are you trying to achieve?:
I am trying to gather the typed responses of participants for a memory study.
What did you try to make it work?:
The code I am currently using is:
textFill = ''
pkeys = key_resp.getKeys() if len(pkeys): if 'space' in pkeys: textFill += ' ' elif 'backspace' in pkeys: textFill = textFill[:-1] elif 'return' in pkeys: continueRoutine = False else: textFill += pkeys
I have also checked the other settings, the text is set every frame, and the key_resp is storing all the keys.
What specifically went wrong when you tried that?:
Nothing showed up when I used the keyboard. ‘return’ does not work, either.
I also tried to replace the key_resp.getKeys() with key_resp.keys, the opposite phenomenon seemed to happen. When I typed any letter once, it would repeat endlessly without stopping.
Hope everyone has a nice day!