Confirmation when clicking "X" or Alt+F4

Alt+F4 trigger an application exit event/message which can be trapped.

Try for yourself. Open Notepad, type something, ALT+F4, it will ask you to save.


I’ve brought this up before. I’m perfectly aware that Alt+F4 is the default windows shortcut to close an application, but it should never do so without confirmation if it means data will be lost.

The current functionality feels like a dev feature that was left in by accident.

1 Like

No it isn’t, it’s simply a shortcut for close/exit. If an application isn’t responding, Alt+F4 won’t close it.


Good to hear the FACTS from someone, and not just assumed, made up “Misinformation”.

  • Yes, of course ALT-F4 can be trapped, and then the program can do whatever it likes after that.

  • Yes, or course it need to be error trapped in MSFS …
    with so many key Commands, its a MUST to prevent accidental closure of the sim.

100% gets my VOTE …


Believe me, you will see the need when during a long flight you press it by mistake while trying to take a screenshot.

It can be handled by the application. I’m a software developer and i do it all the time. Besides, what is the harm? It can be an option on the settings section. “Ask before closing” or something like that.


Not gonna lie, this is freaking hilarious lol. I can only imagine your reaction upon hitting Alt F4 by mistake.


same as ALT + L => flashlight … I pressed million times WindowsKey + L

I reported ticket, but only because after un-locking windows then all Lights of Airplane are off :joy:

1 Like

Like → :no_mouth: :frowning: :face_with_symbols_over_mouth: !!!

1 Like

I like it. I always exit the sim through Alt-F4 after finishing a flight. Saves the trouble of going through the menus. Never pressed it by accident.


Like everyone else said, alt-f4 is a shortcut to kill the program. It doesn’t warn you and it’s been like this since Windows 3.0. I thought this thread was intended as a joke initially to tell you the truth. Just try hitting alt-f4 now on your browser…it will kill it without warning. In fact, I want them to leave it this way. I don’t want to have to hit any other keys besides alt-f4 to kill the program instantly.


All the people that didnt know what they talking about said that :smiley:

There are 3 (4 if you include a crash) ways to exit a process on Windows :

  • Application Exit (ALT+F4 does this), clean shutdown (all process finalizers will called)
  • Application FailFast, ‘dirty’ shutdown (minimal finilizers are run, like when you get an OOM)
  • Process Kill, all bets are off (process has no chance to clean up)

Edit: These are similar to SIGHUP interupts on Linux.

Argue all you want. The majority of apps are not programmed the way you describe. like I said I don’t support this initiative because I WANT the program to shut off immediately without asking “are you sure?” when hitting alt-F4.

Neither do I :smiley:

Just telling you that they are :smiley:

We are trying to be virtual pilots. I feel one thing a pilot should be able to do is not to push the wrong buttons by accident. :smiley:

Focus! Use the force if you have to!

Kidding aside: can’t you just change the shortcut in the nVidia app to something less problematic? I, for one, like the quick exit without having to confirm.

1 Like

With so many “experts”, how can you tell who knows and who doesn’t? Hint – not this guy ^^^.

Another poster said that Alt-F4 triggers a Windows clean shut-down of an application. He is right – it’s just like pressing the X icon on the main window. A Window’s app gets a CanClose message, and can abort the close by returning False. This is commonly used in programs to avoid losing data, typically asking the user if they want to exit without saving if data has been changed. If no data has been changed, then they just allow the application to close without asking.

Want proof? Do the Notepad test by opening Notepad, typing in a few characters so that the data has changed, DO NOT SAVE THE FILE, then hit Alt-F4. What happens? Now try the same thing but pressing the X icon instead. What happens?

So it is Asobo’s choice to not currently trap the Windows CanClose message and allow the sim to close with no warning. They do ask if you’re sure you want to leave when using the Quit To Desktop option, but not with Alt-F4 or by pressing the X icon (my method).

It wouldn’t bother me if they trapped the exit – not just the Alt-F4 keystroked – and asked for confirmation. I run the sim in windowed mode, and I have closed it by accident.

Then I threw an adolescent tantrum, punched a hole in the wall, blamed Asobo for my last divorce, and smashed my flight computer with a sledge hammer. Quite the appropriate reaction to this life or death issue.


You telling me “that they are” isn’t going to change the fact that hitting alt-f4 will close your program without warning. Tell me, what common program do you have installed where alt-f4 doesn’t kill the program without warning? This behavior happens in all if not most MS applications including Office 365, Edge browser, and just about any other MS program.

If you really want to kill a process, just use the command line.

There is a handy app on Windows called taskkill.

TASKKILL [/S system [/U username [/P [password]]]]
         { [/FI filter] [/PID processid | /IM imagename] } [/T] [/F]

    This tool is used to terminate tasks by process id (PID) or image name.

Parameter List:
    /S    system           Specifies the remote system to connect to.

    /U    [domain\]user    Specifies the user context under which the
                           command should execute.

    /P    [password]       Specifies the password for the given user
                           context. Prompts for input if omitted.

    /FI   filter           Applies a filter to select a set of tasks.
                           Allows "*" to be used. ex. imagename eq acme*

    /PID  processid        Specifies the PID of the process to be terminated.
                           Use TaskList to get the PID.

    /IM   imagename        Specifies the image name of the process
                           to be terminated. Wildcard '*' can be used
                           to specify all tasks or image names.

    /T                     Terminates the specified process and any
                           child processes which were started by it.

    /F                     Specifies to forcefully terminate the process(es).

    /?                     Displays this help message.

    Filter Name   Valid Operators           Valid Value(s)
    -----------   ---------------           -------------------------
    STATUS        eq, ne                    RUNNING |
                                            NOT RESPONDING | UNKNOWN
    IMAGENAME     eq, ne                    Image name
    PID           eq, ne, gt, lt, ge, le    PID value
    SESSION       eq, ne, gt, lt, ge, le    Session number.
    CPUTIME       eq, ne, gt, lt, ge, le    CPU time in the format
                                            of hh:mm:ss.
                                            hh - hours,
                                            mm - minutes, ss - seconds
    MEMUSAGE      eq, ne, gt, lt, ge, le    Memory usage in KB
    USERNAME      eq, ne                    User name in [domain\]user
    MODULES       eq, ne                    DLL name
    SERVICES      eq, ne                    Service name
    WINDOWTITLE   eq, ne                    Window title

    1) Wildcard '*' for /IM switch is accepted only when a filter is applied.
    2) Termination of remote processes will always be done forcefully (/F).
    3) "WINDOWTITLE" and "STATUS" filters are not considered when a remote
       machine is specified.

    TASKKILL /IM notepad.exe
    TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
    TASKKILL /F /IM cmd.exe /T
    TASKKILL /F /FI "PID ge 1000" /FI "WINDOWTITLE ne untitle*"
    TASKKILL /S system /U domain\username /FI "USERNAME ne NT*" /IM *
    TASKKILL /S system /U username /P password /FI "IMAGENAME eq note*"

There is a logical fallacy called “Reasoning by Analogy”. It goes something like this:

Say you are playing around with overclocking your friend’s motherboard and everything’s working great. Then you see smoke start coming out of your CPU and the computer stops working. Being a genius with computers, you tell him that if you can just put the smoke back into the CPU, it will start working again.

Another example is that you are an alien and just landed in the middle of New York City. You observe that 30% of the people walking the street are carrying little, nervous, lap dogs. You conclude that as a population, 30% of all humans everywhere carry around these stupid little dogs.

Translation: Just because you personally have observed even 90% of all Windows applications close without warning when you hit Alt-F4 doesn’t mean that all applications work that way. It doesn’t even mean those 90% do, because perhaps you have chosen applications that do not have data that changes without automatically saving it continuously (Office 365, Google docs), do not have changeable/save-able data (web browsers), or you have not changed any data before closing it (open a Notepad file but don’t change anything).

It’s just really, really, really not smart to argue with a lot of experienced Windows application developers on the forum – oh, wait!!! UNLESS YOU’RE TROLLING US!!!

1 Like

The bulk of users here have XDA logic levels. No trolling should be expected.

A recent post of mine (albeit made when very drunk) was closed as it was considered trolling. I will try help out on bugs, but general discussion is over for me.

Losing a search or url you’ve just entered isn’t comparable with the consequences in flight simulator.

You also mention other microsoft apps, but they autosave constantly.

A confirmation dialog would only require hitting return or enter immediately after alt+f4. Why does that cause so much objection?