I have a MacBook Pro 2015 with macOS Sierra 10.12.4 installed. I have a question about confirming dialogs.

I use WebStorm from JetBrains to write code. After some actions I can open Commit dialog. By the way the commit dialog opens with Command + K shortcut. Here is this dialog:

I write some text and after that I need to press the Commit button (submit form).

The problem: I can't do this with a shortcut. I tried Command + enter. I assumed this would work, because submitting this dialog (and any other dialog like this, not only in this programm) is done by control + enter, so I assumed on Mac it must be Command + enter.

It is not only with this dialog, it also doesn't work in other applications either.

What is the hotkey to confirm dialogs on Mac?

  • Is this a Java application? – oa- May 19 '17 at 9:12
  • Yes it is Java app – Sharikov Vladislav May 19 '17 at 9:15
  • Given that the button label starts with a C, you could try Command + C. Since it is in fact a drop-down menu and not a single-click button I would expect the menu to appear. Unless of course the Cancel button is in the way, because it too starts with a C, which is rather inconvenient. – Samir Apr 14 '19 at 7:35

In general in macOS, you can select the default dialog button (highlighted blue) with Enter.


Enter selects the button on the right.

If you have All Controls enabled in System Preferences → Keyboard → Shortcuts, then a blue outline can be moved around controls using ⇥ and ⇧⇥, with Space used to confirm. In the screenshot, Space selects the button on the left.

However, specifically for this question you are referring to IntelliJ. They have a history of not following Apple HIG and there does not appear to be a keyboard shortcut to press the Commit button on that window.

Click this button to commit the selected files, or hover your mouse over this button to […]


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .