**Most UE4 users know that pressing escape while testing your game will exit out of the simulation of whatever you were doing. Maybe you are wanting to use escape as an inventory keybind or for your main menu. I’ve noticed that new users have asked about this in the past, well look no further for you have found this guide!
- Open your project, obviously.**
2. Click the “Edit” menu and choose "Editor Preferences"
3. With the “Edit” menu open, go the the “General” tab and click “Keyboard and Shortcuts”.
**4. Once you’ve clicked “Keyboard and Shortcuts”, search “Stop” in the search bar, and find “Play World (PIE/SIE)”, you can **then change the keybind to whatever you want. If it says that shortcut is already in use choose something else.
this does not seem to work anymore. I have tried changing this and escape still exits PIE.
EDIT: After some digging the Escape key is now hard coded into the source. if you want to disable this now you have to use a source build and edit the source.
the file is located at Engine\Source\Editor\UnrealEd\Private\Kismet2\DebuggerCommands.cpp
you want to modify the following line:
UI_COMMAND(StopPlaySession, "Stop", "Stop simulation", EUserInterfaceActionType::Button, FInputChord(EKeys::Escape));
I changed mine to:
UI_COMMAND(StopPlaySession, "Stop", "Stop simulation", EUserInterfaceActionType::Button, FInputChord(EModifierKey::Control, EKeys::Q));
and now escape no longer exits, control-Q does.
Hope this helps OP and anyone else who finds this
The funniest thing is that I looked for this post to discover that the default shortcut to stop the game in UE5 is now Shift+Esc
It’s nice that they finally changed it!
That’s funny because I had just changed it to that exact key combo before scrolling to the end of this thread.