Running a code script if the experiment was exited using the escape key

Here’s a couple that might help