Here is a simple example of how disable escapekey works. Primarily, it is used when you want to do something (delete some stuff, change screen rez, etc.) before the game actually exits.
` HOW DISABLE ESCAPEKEY WORKS BY LBFN 6 SEPT, 2010
sync on : sync rate 60
backdrop off : hide mouse
disable escapekey
sw = screen width() / 2 : sh = screen height() / 2
repeat
cls
ink rgb(255,255,0),0
center text sw,sh - 50,"Press ESC....go ahead, I won't quit."
if keystate(1) = 1
ink rgb(255,0,255),0
center text sw,sh,"Ahh...I feel you pressing it, but I'm not stopping!"
endif
ink rgb(255,255,255),0
center text sw,(sh * 2) - 50,"If you really want to quit, press the SPACEBAR."
sync
until spacekey() = 1
cls
center text sw,sh,"See.....told you."
sync
wait 1000
end
So many games to code.......so little time.