Display typed text input from keyboard (in code)

Hello, apologies for potential cross posting, but after searching the forum for 2 hours I’ve found many related posts, but not exactly what I want:

What I am trying to do:

  1. I’d like to work in pure code (though the builder is cool, i never got into it)
  2. I am displaying an image and then a text field. I want the user to type in about a paragraph of text via the keyboard.

Where I am stuck?
I am working with psychopy 2021.2.3 (on a mac, but the final thing will run on a PC). I can display the image and read a lot about editable textboxes, event-keys, and I tinkered with various code examples. In theory, I thought it shouldn’t be too hard to enter a while-loop and continuously update the textbox with the typed letters until a “return” is pressed (breaking out of the while loop). In practice, however, I cannot get this to work …

Is there any code snippet in pure python (found some online exps and youtube videos) that I could use as a template?

Thank you very much in advance for any tips. It is much appreciated.
best r

What examples have you tried? In what way didn’t they work?