No Command+Q again prompt to quit app?

On most Mac apps I use, hitting Command+Q on accident instead of Command+W (like Chrome to close a tab) will pop up some text saying to hit Cmd+Q again to quit... with PHPStorm it just quits, which is a giant pain in the butt especially when I have to have multiple projects open (often).

Is there some way to have it do this?

I'm not talking about the Confirm Exit which blocks shutdown; just for Cmd+Q accidental hit.

7

No, there's no separate setting for this.

The problem is discussed at https://youtrack.jetbrains.com/issue/IDEA-148980 (feel free to vote/comment). But I would just rather suggest to remove cmd+q shortcut in Preferences | Keymap: Main menu > File > Exit.

-1

Unfortunately removing Cmd+Q shortcut does not work in IDEA 2019.2 (version I tested); the Cmd-Q behaviour seems hardwired.

My workaround is the wonderful 'Karabiner' keystroke interceptor program for MacOS which allows you to (for instance) 'swallow' Cmd-Q IF it is held for less than 3 seconds, IF the frontmost application bundle is "com.jetbrains.intellij" 

5
Avatar
Permanently deleted user

I can confirm that removing the Cmd+Q shortcut doesn't work.

3

An update from a developer: https://youtrack.jetbrains.com/issue/IDEA-211301#focus=streamItem-27-3429904.0-0

> To avoid accidental quit in IntelliJ IDEA please turn this setting on:

16

I can confirm removing keymap Exit(Cmd + Q) doesn't work in this version: `IntelliJ IDEA 2022.2.2 (Ultimate Edition)`

0

Still doesn't work. I don't like this accidental exits, it's so frustrating when you have 9 projects opened in one window as tabs (merged windows), and arranged in some way. After restart all projects opens in separate windows, and after “merge all” there is wrong ordering.

I think it's not supposed to work like this for such complex applications with big working context as Intellij IDEA.

0

If you reading this then I understand all the pain that that you felling. Please fix it 

2

In 2024.2.1 you broke this feature again. The configuration gets lost after upgrading.

0

Removing the shortcut will not work, you need to enable the Confirm Application Exit option.

0

请先登录再写评论。