Shortcut to switch between Today and Notifications in Yosemite

While it is possible to set a keyboard shortcut to bring up the Notification Center in Mac OS Yosemite, I cannot find a way to switch between the panels "Today" and "Notifications" via the keyboard - it only seems to be possible using the mouse/trackpad.

Is there anything I overlooked?


Solution 1:

Applescript:

tell application "System Events" to tell process "SystemUIServer"
    click menu bar item "Notification Center" of menu bar 2
end tell

tell application "System Events" to tell process "NotificationCenter"
    click radio button "Today" of radio group 1 of window "NotificationTableWindow"
end tell

Depend on what an user needs, whether it's to switch when the menu is pulled out, or to simply access Today or Notifications on demand, one can modify the above code and bind it/them to keyboard shortcuts.

Solution 2:

Just adding this based on fartheraway's answer (because he mentions how to get the Today tab to open).

Here's how to get it to open on the Notifications tab:

tell application "System Events" to tell process "SystemUIServer"
    click menu bar item "Notification Center" of menu bar 2
end tell

tell application "System Events"
    tell process "Notification Center"
        click radio button "Notifications" of radio group 1 of window "NotificationTableWindow"
    end tell
end tell

Now I just need to figure out how to run these off a keyboard shortcut :(

Solution 3:

As of Sierra, the menu bar layout has changed. The following should work:

tell application "System Events" to tell process "SystemUIServer"
    click menu bar item "Notification Center" of menu bar 1
end tell

tell application "System Events" to tell process "NotificationCenter"
    click radio button "Today" of radio group 1 of window "NotificationTableWindow"
end tell