0
\$\begingroup\$

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?

Update

This is what I've tried:

; Primary default bindings
.Bindings=(Name="F4",Command="exit",Alt=True)   
.Bindings=(Name="F10",Command="ToggleInventory")
.Bindings=(Name="SpaceBar",Command="GBA_Jump")
\$\endgroup\$
2
\$\begingroup\$

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.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ 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 \$\endgroup\$ – Brian Webster Jan 7 '13 at 18:12
  • 1
    \$\begingroup\$ 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! \$\endgroup\$ – Phillip Jan 7 '13 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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