Keyboard shortcut to select Application "quit unexpectedly" dialog

When encountering an application "quit unexpectedly" dialog box in OS X, sometimes the focus on that dialog box is lost. With only a keyboard, how does one restore focus back to that window? cmd+tab and similar do not work.

(I've wondered this for YEARS. Any help is greatly appreciated.)


Solution 1:

Those windows are shown by the UserNotificationCenter process, so you can focus them by opening UserNotificationCenter with Alfred or Launchbar.

It is also possible to disable the crash report dialogs completely:

defaults write com.apple.CrashReporter DialogType none

This script can also be used to focus other windows shown by background processes:

tell application "System Events"
    repeat with p in {"UserNotificationCenter", "SecurityAgent", "CoreServicesUIAgent"}
        if exists process p then
            tell process p
                if windows is not {} then
                    set frontmost to true
                    exit repeat
                end if
            end tell
        end if
    end repeat
end tell

SecurityAgent shows password dialogs and CoreServicesUIAgent shows Gatekeeper and quarantine dialogs.

Solution 2:

You can use Voiceover to activate it - it's not exactly convenient, and binding a hotkey to an applescript is probably better, but this method works without any scripts or third-party tools. Voiceover needs to be enabled for this to work, but you can do that through the keyboard too if you're stuck. Once enabled, the following sequence allows you to activate system dialogs:

  1. switch voiceover on with cmd+F5
  2. open Application Chooser by typing ctrl+option+F1 twice
  3. navigate to System Dialogs using the arrow keys and press return (or the right arrow)
  4. press the down arrow to select the dialog in question and hit return
  5. switch voiceover off again with cmd+F5