I have a very similar code component to @smile667 and I also want participants to see what they type while the word they need to type is displayed on the screen.
For info, I am using PsychoPy 2020.2.1 standalone version on MacOS 11.1.
My issue is that what participants type appends directly onto the end of the visible word. For example, if the word they need to type is ‘stutter’, this word is displayed on the screen and when the participant types ‘stutter’ it will appear like this:
What I want is the word ‘stutter’ to appear at the bottom of the screen but what participants type to appear in the middle of the screen .
@dvbridges can you help?
My code component at the moment is as follows:
modify = False
text.text = ' '
keys = event.getKeys()
if 'space' in keys:
text.text = text.text + ' '
elif 'backspace' in keys:
text.text = text.text[:-1]
elif 'lshift' in keys or 'rshift' in keys:
modify = True
elif 'return' in keys:
continueRoutine = False
text.text = text.text + keys.upper()
modify = False
text.text = text.text + keys
I have tried adding in the following into the ‘Each Frame’ tab without any luck:
keys.pos = (0,0)
Any help would be hugely appreciated!
SOLVED - I also had the word showing up in a text component which is why anything being typed had the appearance of appending directly onto the end of whatever was displayed in the text component! Once I made sure the text component was blank it worked fine!