GameBlender: Remove Escape Key

I am developing a FPS game in Blender.
Nearly half of the work is over - 17 Animated Chars with Logic, weapons, explosions., Only the levels are remaining to be created.

But I have a touble now. Blender player quits when Escape is pressed in fullscreen mode.
Can anyone give me a compiled latest version 4.1 or 4.2a with the Escape ‘key quit : feature’ removed.

wasent there something mentioned here earlyer that if you attach a brick to a sensor and set it to be a keboard set to the escape key
it makes it not do anything ?

and just testing it it does lates blender build the 2.24a

like so

SENSOR keyboard set to “ESC” <> AND <> nothing (or make it like bring up a menu)

hope that helps

There may be something in here:

It works only with previous versions of blender (3.x - something that i started my game with). Not with the latest versions.
The code has to be changed. I have the information as to where the code should be changed (from one of the threads here). But i need someone to compile the changed code

dude do what i said to do

i JUST tried it and it DOES work

could you please send me the .blend file ([email protected])

sure ill post a tiny demo of this here in just a munite im tweaking a few things

Heres the demo and how to work it

Press esc to get the tiny box in the corner click on that with the mouse over it to exit
should work fine

Um…we’re talking about fullscreen runtimes. This does not work in fullscreen runtimes.

it doesent? thast odd just so i konw here your talking about when you save a runtime from blender and run that correct?

Yes. It doesn’t work in a fullscreen runtime.

It works in windowed mode, but not many games use this mode for the finished product.

OOOH my bad i should tested that more
your right it does not work on a full screeen runtime
Sorry about that

as i told before the only way is to change the source.
i know what to change in the source. (remove 3 lines)
but someone with c knowledge has to compile it

ok peoples i’ll try make a blender with that… but i only have windows so i cant make a linux or mac blender

i wonder if i can remember how to code it

here it is
yay only took 1/2 hour

Scaboots: Could you submit a patch or something to Blender? I don’t see any reason they would not want it in there.

Hi scaboots,
Thanks for your compiling it. But i require blender player. Not Blender.
I have compiled blender (although it compiled without icon) trying to compile blender player gives me error. i am trying again.
if you can please try to compile blender player with ‘fullscreen escape quit removed’

ok i’m uploading the blenderplayer

here it is

the blender player dosen’t work !
in fullscreen it quits when escape is pressed

i hope you know what to change (i got it from some thread)

bool GPG_Application::handleKey(GHOST_IEvent* event, bool isDown)
bool handled = false;
if (m_keyboard)
GHOST_TEventDataPtr eventData = ((GHOST_IEvent*)event)->getData();
GHOST_TEventKeyData* keyData = static_cast<GHOST_TEventKeyData*>(eventData);
if (fSystem->getFullScreen()) {
if (keyData->key == GHOST_kKeyEsc) {
m_exitRequested = KX_EXIT_REQUEST_OUTSIDE;
m_keyboard->ConvertEvent(keyData->key, isDown);
handled = true;
return handled;

lines 790 through 807 in source\gameengine\GamePlayer\ghost\GPG_Application .cpp

remove the underlined text

ok uploading a new one… and i tested it this time


scabootssca: you but can compile 2.34 without ESC? Please!!!

Thanks a lot scabootssca. It works fine.

You can be sure i’ll mention your name when i Finally (!!) finish my game .

By the way, I have been trying to compile. blender gets compiled. but compiling WITH_BF_PLAYER (using scons & mnigw) player gives error. in GPG_APPLICATION.cpp file startengine. what compiler do you use