A lot of games use keyboard ‘ESC’ for pause menus, backing out of UI etc. Currently in the ShooterGame sample, you can only send an Escape to the game in Standalone mode. In Play In Editor (PIE) mode the editor responds to the keypress by stopping the game.
It would be great if we could simulate Escape presses in Play In Editor (PIE) mode, for example by pressing Shift+ESC or another key binding to avoid stopping the game session.
Thanks for the quick reply! I just tried this but it still seems to use Escape as well as the new binding to stop the game. I’ve got source access so I’ll dig in and find out why it’s still using Escape. Cheers!
I could use an answer to this too. Trying to test functionality related to Escape key handling and it’s not quite working in Standalone but there’s no way for me to debug it in “New Editor Window” mode like I’d normally do. Setting a new binding in Editor Settings → Keyboard → Play World doesn’t make a difference; Escape still closes.
I just tested the solution below which works in 4.10.1. Add the following lines to the bottom of DefaultEngine.ini in your project’s Config folder, then restart the editor.
Checking into this I’m not sure what location you’re referring to as the Defaultinput.ini in the UE4 Main Directory still only resides in template project folders. So, for instance, if you modify the DefaultInput.ini for the Vehicle Template (for UE 4.11), then every 4.11 project you start with that template will have that functionality. However, if you modify your project’s DefaultInput.ini it will override the inputs from the UE4 main directory.
On the other hand, if you do not modify the DefaultInput.ini in the Main Directory then you can choose to add this functionality on a project to project basis. (Location: [YourProject]>Config>DefaultInput.ini.
A couple of notes: You do not have to add the script in the specific location I mentioned before, you can simply add the script to the bottom. Also, DefaultInput.ini does not exist in the Shooter Game example’s project folder, so this may be adding to the confusion.
-Let me know if you do not find this to be the case and/or provide the location in the UE4 main directory you are referring to in your comment if different from this explanation.
Hi ,
Default input and Player input were in two different places. The main directory is where I found the Player input. That was the part that I found confusing. I hope this helps.