How can I add punctuations to my feedback?

Hello,
I’m working on an experiments were participants are required to provide feedback.
I was able to add codes for basic punctuation from here Typed response: punctuation but I was not able to do the same for some other punctuations {!,@,#,$,%,^,&,*,()}… does anyone how can I do that?
I also want to allow participants to leave the experiment when they press escape(while giving feedback).
If anyone could help me with that, I would appreciate very much.

You don’t need to use code for that anymore. make sure you are using the latest version of PsychoPy and use the new TextBox2 class instead of TextStim, which takes care of editing for you:

Hi! Thank you for your quick response.
I didn’t know they have this new function… can I use this even if I have more questions on a loop?

I haven’t used it myself, but yes, it just works like any other component in terms of how you would use it on multiple trials within a loop.