This is another in a long line of computer history trivia questions. It is very much related to this question.

How did Alt + F4 become the close keyboard shortcut? I always used that close command on Windows but found it curious that Fedora 40 also had that shortcut standard. Now I'm certain with Linux being highly customizable you can bind keyboard shortcuts to whatever you heart desires, but it was curious to me that a Linux distro would mirror the Windows shortcut like that.

Maybe there is some interesting computer history related to the Alt + F4 command that is worth recording here for prosperity.


2 Answers 2


AltF4 doesn’t come from Windows; it comes from IBM’s Common User Access (CUA), part of its Systems Application Architecture. This was implemented on IBM mainframes, and in OS/2 Presentation Manager and Windows — it’s fair to say though that it’s the latter that popularised it.

Raymond Chen explains that function keys were chosen over alphabetic keys to avoid problems with localisation and differences in keyboard layout, and “Close” was assigned F4 because that’s what was available when it came time to assign it a key.

OSF/Motif 2.0 explicitly aimed to align with CUA, so AltF4 came to Unix-style systems then (if not earlier). I don’t remember the history of AltF4 in GNOME (which is what Fedora uses), but it’s been used to close windows there for a long time — if not based explicitly on CUA, perhaps indirectly because it’s a well-known shortcut, and there’s not much reason not to use it. At the very least, since it’s well-known, it’s the safe option to use to close windows; anything else would be liable to surprise users.

  • 6
    Of course, Macintosh had a much friendlier one, Cmd+Q for Quit, and many Windows programs adopted that (CTRL+Q) as well.
    – user8356
    Commented Jun 5 at 16:27
  • 51
    @user8356 friendlier in languages where the word for “quit” starts with Q... Commented Jun 5 at 17:57
  • 24
    You're right, the Mac shortcut is only mnemonic in English. Windows does favor languages in which the word for "Quit" starts with "F4" :-)
    – user8356
    Commented Jun 5 at 19:48
  • 12
    @user8356 My experience has been that Alt+F4 means "close current window" and, in applications where Ctrl+W is implemented but doesn't mean "close current tab", they're synonymous, while Ctrl+Q is implemented as "quit entire application". ...and I just checked my copy of the CUA book and it agrees. Alt+F4 = Close (Closes active window). Still trying to find a mention of a standard quit whole application key combo.
    – ssokolow
    Commented Jun 5 at 21:39
  • 6
    It might be worth noting that the on old keyboards, function keys were arranged in a cluster on the left. On my 286, I recall ALT+F4 (and other shortcuts) being very easy to key in using only the left hand. It didn't require the hand gymnastics required on modern keyboard. (Also, Ctrl+W comes from the Macintosh (or maybe Lisa?), Cmd-Q is quit, Cmd-W is "close window").
    – Seth
    Commented Jun 6 at 6:55

Function keys tended to be chosen rather then Alt+letter as it was common for space on keyboards for printed function key label strips. It also saved requests to have different shortcuts depending on the user's language.

IBM was first, and then on it was easier to copy IBM unless you had a good reason not to.

If you have only used a laptop keyboard you can fully understand how well function keys worked.

  • 1
    "If you have only used a laptop keyboard you can fully understand how well function keys worked." <= so true; esp. with the original IBM keyboard style where the function keys were on the left of the alphabetic keyboard, instead of the top row.
    – davidbak
    Commented Jun 6 at 16:18
  • 2
    @davidbak It's where they belong!
    – Raffzahn
    Commented Jun 6 at 23:15
  • 1
    @Raffzahn - ABSOLUTELY! As I point out in my blog post on keyboards, here - search for "an extremely serious flaw" ...
    – davidbak
    Commented Jun 7 at 3:27
  • 2
    you can fully understand how well function keys worked. <--- did you mean "can't fully understand"? Commented Jun 7 at 7:47
  • 1
    @i486 Windows (and max) are relatively recent. Even Text based menus used to be uncommon as they used up memory and it was much cheaper to ship a printed function key strip with the software then for customers to buy more memory. Text based menus seem to have become common with 16 bit systems. Commented Jun 7 at 8:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .