Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

By default, Alt-F4 does not work in a UDK game.

How would I go about adding unreal script to cause the game to exit to desktop upon Alt-F4?


This is what I've tried:

; Primary default bindings
share|improve this question

That would be your DefaultInput.ini. If you add something along the lines of +Bindings=(Name="F4",Command="exit",Alt=True), that should do the trick. The next time you run the game, the UDKInput.ini will be rebuilt using a combination of DefaultInput.ini and the BaseInput.ini in Engine\Config.

share|improve this answer
Please see my update above. I have tried starting the line with "." or "+", but both do not work. I included the other commands in my update above to show where within DefaultInput.ini I have inserted the line for Alt-F4 – Brian Webster Jan 7 '13 at 18:12
A little further down in the file, F4 is being re-bound to the command "Playersonly". Comment that line out and you should be good-to-go! – Phillip Jan 7 '13 at 19:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.