In Eclipse, Ctrl+Q shortcut forces application closure. There are no warning messages AND if going to Windows -> Preferences -> Keys, there is nothing bound to Ctrl+Q and even if I bind something, it does not prevent closing.
I tried this trick and it worked for me, (Kepler Version)
Go to Windows -> Preferences -> Keys.
Close, you will see two close shortcuts Ctrl+F4 & Ctrl+W
Select any one
Close command & Now Click
Copy Command, so you will see another
Close Entry with no Key binding.
Click the newly created
Close command (that will have no binding now, i.e. Blank in the Binding section). Now in the
Binding section, assign Ctrl+Q as your bind. Click
Apply. Recheck in Eclipse whether Ctrl+Q is closing your application / opened files. It will close.
Again now go to Windows -> Preferences -> Keys.
Close, and Locate the binding which you have created
Close --> Ctrl+Q. Click that and select the
Unbind Command. Press
Apply. Now Ctrl+Q will do nothing.
Hope that helps.
The issue is not related to key binding. To fix the issue you must remove Ctrl+Q binding at the following file:
YourWorkspaceRootFolder \ .metadata.plugins\org.eclipse.e4.workbench\workbench.xmi
Remove the line that contains 'keySequence="CTRL+Q"', and Eclipse will never close again when pressing Ctrl+Q.