| Reference | Downloads | Github

Keeping a text component up through multiple loops

OS: Windows 10
PsychoPy version: v3.1.3

What are you trying to achieve?:
I have a text component that has custom code that allows the participant to type letters that show on the screen. I want the letters they type to stay up on the screen for a few loops and for them to be able to add to the letters.
What did you try to make it work?:
I am going to post a bunch of code and screenshots now.

This screenshot shows my flow and the component that I would like the typed letters to appear on.

As you can see I have a text component that shows the letters the participant types.

This is in the begin routine of my offloadcode component

offloadscreen = ''

This is in the every frame routine of my offloadcode component

if("backspace" in keyoffload.keys):
    if(len(keyoffload.keys) > 0):
elif("space" in keyoffload.keys):
    keyoffload.keys.append(' ')
offloadscreen = ''.join(keyoffload.keys)

The choice trial routine is also showing a letter for one second using the textpracword component.

What specifically went wrong when you tried that?:
This allows the participant to type during the one second that the letter is shown, but once the next letter is shown it refreshes or starts over. How do I make it keep the letters up and allow the participant to add to it every loop.

I think if I can get a piece of code that makes it start by showing the letters typed in the previous loop unless the ReportWord routine is run it should work.

Here is my experiment file, go crazy. Let me know if I can provide more information. Please.
cognitiveoffloading10_30.psyexp (45.0 KB)