Disable Escapekey?

How do I disable the escapekey. When I am in a game and press escapekey, I want to show the ingame menu rather than quitting the game directly.

Thanks in advance

Have never tried, but as I understand, if You catch the esc key with a keyboard sensor the default behavior is automatically disabled.

Try it, and correct me if I’m wrong.

… and do not forget to enable quit with another method :wink:

I tryed it before but did not work. I don’t know why thats why I asked this question. But it works. I just tryed it, its working now.

@ Monster:
Yes, I will quit the game like this - ingamemenu->mainmenu->quit.

Thank you both for your reply.

Be careful. Without the esc key, you’ll have no way to quit the game. What if something breaks with your menu? Then you can not exit the game engine without closing Blender (and potentially loosing work). What I recommend is to do all of your logic with something like the accentgrave/tilde key while debugging. Then, before you release, change to the esc key. This way you can still create your menu, and you have a way to bail if things break.

yes i agree or you can just set a key like say backspace and then have it attached to quite game actuator.

If you use the escape key in an sensor, the default quit action is disabled by default, I have no idea why that wouldn’t be working for you. Also, if you do get stuck in the game you can just exit Blender like normal(click the red X) then find where Blender saves the quit.blend, when you load that up it will have all the work up to the point where you started the game.

What I do for safety is rig up “Q” to quit when I put in the escape key. I then have that in multiple places: the level itself, the camera etc. this means that I can’t accidentally delete the safety. Just remember where you put them so you can get rid of them when you have it all sorted out.

Also, with 2.5 you can go to the tmp (linux. I am sure there is a windows alternative) folder, and if you quit blender from an inescapable game (ie the close button) it will put a file “quit.blend” there. Just don’t reboot and you’ll be fine and not lose any work.
Also try the recover last session button in the file menu.

There is 0% chances to loose my work. Bcos I never run the game without saving it. And I always save two files at a time. I always save my files as a version no, like - mygame1 after that mygame2 and after that mygame3 etc right after a little progress. And yes sdfgsdfg, windows also have temp folder from where it is possible to get your work. @sdfgeoff
Anyways, as I said in my post that I tryed it and it did not work and thats why I asked it here. Then when I tryed again it worked. Actually it is still not working. It only works when I play the game inside blender but in stand alone it quits directly. Is it happening bcos I am loading my blend file as external file in blenderplayer?

Thanks for your reply.