Bug 118948 - [KeyBindings] interactions: Provide ability to link Alt+F4 to Exit
Summary: [KeyBindings] interactions: Provide ability to link Alt+F4 to Exit
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2005-12-01 19:05 EST by Missing name Mising name CLA
Modified: 2019-09-06 16:16 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name Mising name CLA 2005-12-01 19:05:38 EST
In MS Windows, my understanding of Alt-F4 is to exit the application. Alt-F4 only closes the current window, if you have more than one window open.

There doesn't seem to be a key preference for Alt-F4

Also, when trying to define a key preference for Alt-F4 to define the exit command, the preferences window gets closed.

In MS Windows, my understanding of Ctrl-F4 is to close the current window. Currently, Ctrl-F4 is defined to close a file, but I can't find and command to close a window And Ctrl-F4 appears to do nothing even though it is defined to 'Close File'
Comment 1 Douglas Pollock CLA 2005-12-13 11:29:47 EST
Alt+F4 is an immutable native key binding.  There is no way to modify this key binding, and so it is not exposed through the Keys preference page.  It will also be hard to bind anything to Alt+F4 because the OS will intercept this key.  You should be able to do it by copying the text "Alt+F4" and pasting it into the key sequence field.

There is currently no "close window" command.  Please see Bug 58427.
Comment 2 Missing name Mising name CLA 2005-12-13 17:49:26 EST
(In reply to comment #1)
> Alt+F4 is an immutable native key binding.

In bug 58427 you said 'What is really happening is that we respond to the "close" event from the OS by shutting down Eclipse'

Which implies you could respond the the "close" event from the OS by putting up a dialog box asking the user if they really what to exit Eclipse or resume. I've seen this behaviour in other windows programs.

However, I originally said, that when 2 Eclipse windows are open, Alt-F4 closes the currently active window so it's not exiting Eclipse regardless of which keybinding is used to say "Exit Eclipse".

In fact your statement is misleading because if ALT-F4 is an immutable Exit Application, why have you stated the OS sends a "close"? Isn't close "close the current window"? And when there is only one window open then and only then would one expect the application to exit.
Comment 3 Douglas Pollock CLA 2005-12-16 11:19:38 EST
Okay, Bug 58427 covers Ctrl+F4 and close window.  Let's stop talking about those.

There is an Exit command, and you can bind it to any key that the window manager doesn't grab.  Windows XP grabs Alt+F4 and converts it into close event of some kind.  What you're asking for (and wasn't entirely clear from the description) is to be able to bind the close event to the Exit command.
Comment 4 Missing name Mising name CLA 2005-12-18 02:05:50 EST
(In reply to comment #3)
> Windows XP grabs Alt+F4 and converts it into close event
> of some kind.

Basically this statement is wrong. Alt+F4 is detectable by the applcation. Applications can choose to whatever it wants to do in response to Alt-F4. Take OpenOffice 1.1.4, for example. Open a new text document, type something and without saving, Alt+F4 OpenOffice. You'll be asked to save, discard or cancel. This shows Alt+F4 is detectable by the application and the developer of that application has made a deliberate choice on how the application will behave in response to Alt+F4.

> What you're asking for (and wasn't entirely clear from the
> description) is to be able to bind the close event to the Exit command.

My apologies for not being clear. I'm expecting Alt+F4 to Exit Eclipse. I'm expecting Exit Eclipse to be a command I can to bind any key sequence. I'm expecting to be able to bind Alt+F4 to any command. None of these is the case.
Comment 5 Michael Van Meekeren CLA 2006-04-21 13:14:20 EDT
Moving Dougs bugs
Comment 6 Paul Webster CLA 2006-09-28 11:01:32 EDT
There are currently no plans to work on this feature.

PW
Comment 7 Denis Roy CLA 2007-06-22 09:33:15 EDT
Changes requested on bug 193523
Comment 8 Eclipse Webmaster CLA 2019-09-06 16:16:02 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.