Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse does not confirm exit when hitting command + q

I generally close tabs while using Eclipse with command+w, however, sometimes hit command+q by mistake. Even though I have Eclipse set-up to warn me when exiting (Preferences -> General -> Start-up and Shutdown, "Confirm exit when closing last window"), this shortcut seems to bypass the warning, which is quite annoying.

Is there a solution to this same as the way Chrome presents a warning when hitting this shortcut? A hack in some plist file maybe? Google searches have not helped much.

like image 805
arin Avatar asked Mar 30 '13 00:03

arin


1 Answers

OK, so having the same problem with Safari and doing a google search led me to this Apple discussions page. Basically following these steps (via @evenhuis) you can re-map the quit shortcut to any other menu function:

  1. Go to System Preference > Keyboard.
  2. Choose Keyboard Shortcuts
  3. Click Application Shortcuts
  4. Press the + button
  5. Under Application choose Eclipse
  6. For Menu Title input "Show All". (You could use some other innocuous menu option here)
  7. For Short Cut use ⌘Q
like image 126
arin Avatar answered Nov 08 '22 15:11

arin