Quit app by pressing Esc

Any idea on how should i quit the app by pressing Esc?

Via blueprint (just plug Esc input in to it):

Via C++ you can call same function you can call same function:

But you can close game more forcebly with RequestExit

Thanks. But i cant find the Esc input. Where is it?

I believe only Actors and Pawns can receive input. For pawns, escape will pop up automatically in the search list, and for actors, you have to enable input first.

Oh i didnt reply :o i thouth i did :o Do in PlayerController or Pawn, not sure if this gonna work in GameMode. You wshould have Esc node there