Just want to share this to newbies. Once you get the logic behind the following events, it'll help you with more complex toggle in the future:
It's just a simple PAUSE command when you press ESC:
You will find the original tutorial on toggling states here:
Hope this helps alot for non-programmer noobs like me.