14

I used to close a running application by pressing ALT+F4. But, I realised that the application is still running and the correct way to close (quit) it is the combination of Ctrl+Q keys.

So, what is the purpose of ALT+F4 and how is it different from Ctrl+Q?

18

The shortcut Alt-F4 send a close message to the window, as when you press the little x button on the title bar. It is a windows manager configuration.

It depends upon the application whether to respond to this event closing all together the application, or iconize (i.e. like xchat can be configured) or other.

The Ctrl-Q shortcut you mention is not universal, every application can have its own. For example evince use Ctrl-W, some other use Ctrl-Q to close, Ctrl-W to close a single tab and Shift-Ctrl-W to close all tabs (but not all windows).

0
10

This entirely depends on the application.

By default, applications bind Alt+F4 such that it does the same as closing the window. For some applications that means quitting (like the Calculator), for others it might mean putting them in the background (like Empathy).

The job of Ctrl+Q is the developers' free choice, but convention dictates that it quits the application.

In short: Alt+F4 will normally do the same thing as clicking the X window button. If that only hides the windows, Ctrl+Q will normally quit the application.

7
  • Not 'If that only hides the windows,' it's 'closes the windows,'. – Oxwivi Jun 4 '11 at 16:44
  • @Oxwivi What do you mean by 'closes the window'? If it doesn't quit the application, then how is it different from 'hides the window'? – db42 Jun 4 '11 at 16:48
  • @db42, if you say hide the window, it gives the impression that the window is hidden with it's content intact. You don't close a Firefox window which returns to how it was before when you open a new window does it? – Oxwivi Jun 4 '11 at 16:52
  • 1
    hiding means minimize;so leaving it running where you use the window buttons on the panel to get it back; closing also removes it from the panel. (note: technically Unity has no panel anymore ;) ) – Rinzwind Jun 4 '11 at 16:53
  • When a window is hidden, it's technically destroyed. Such as when you click the [x] on empathy. But the application (what's called the 'main loop' in gtk) is still running. Clicking the Empathy icon in the messaging menu re-creates the window. – Stefano Palazzo Jun 4 '11 at 17:36
0

I have seen it in Skype in Microsoft Windows, that whether you click the cross button or Alt+F4, it will minimize the window. Avro keyboard will ask you if you want to close or minimize to system tray i.e. run in background(kind of) while most apps will end its process if the UI is closed as they don't serve any purpose if the UI is not available. So, Alt+F4 triggers UI to close. But the underlaying app may prevent default behavior based on developers choice or software design. Alt+F4 only applies to UI of a software, hence maintained by OS. On the otherhand, Ctrl+q is maintained by the respective application.

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.