So, I am using PTB to show visual stimuli via a touch screen. It is a simple 3AFC task, the stimuli are drawn on the screen and they stay there till one of the options is selected. The only way one can quit the experiment is by pressing the ESC key which the participant does not have access to (they have access only to the touchscreen).
Sometimes, the participant touches the screen randomly (and not just the stimulus) and the screen goes to the Windows desktop while PTB keeps running in the background. The problem is that the participant could get past PTB and go to Windows, which should never be the case.
Would love to hear some solutions!