Enable escape key when serial port is open

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2020.1.3
Standard Standalone? (y/n) If not then what?: y

What are you trying to achieve?:
I am running an EEG experiment coded on the Builder.
At the beginning of the experiment, I am opening the serial port to be able to send triggers. I am closing it at the end of the experiment.
However, when the port is open, the escape key is not working to quit in the middle of the experiment.
The only way to quit before the end is to close completely PsychoPy with Ctrl+Alt+Delete but then it is not saving any data.

What did you try to make it work?:
I tried to open and close the port for each trigger but this is not an optimal solution as I need to send few triggers per trial.

That’s an interesting one, could it be that the port used by the Parallel component is the same port used by your keyboard? You could try adding a Text component set up to show any keypresses, so as to test whether any are being picked up at all. You can copy the demo keyNameFinder to do this.

Thanks for your answer. I’ll try that but I think it is taking the escape key into account because the screen freezes when pressing Esc but it doesn’t quit the experiment screen and this is where I need to completely force PsychoPy to close.