Restore Safari’s Downloads Keyboard Shortcut

July 22nd, 2011

I’m pretty excited about most of the enhancements in OS X Lion, and in Safari 5.1, which was released along with it. But one of the most annoying changes in the version of Safari that ships with Lion is the removal of any keyboard shortcut for showing and hiding the active downloads list.

Downloads used to be shown in a completely separate window, which could be toggled using the keyboard shortcut Cmd-Opt-L. In Lion, they appear in a popover panel attached to the toolbar of whatever browser window you happen to be using. Unfortunately, there is no keyboard shortcut to toggle the appearance of this popover.

Using FastScripts and a simple UI Scripting script, I was able to restore this functionality, so that Safari on Lion toggles the panel using the familiar Cmd-Opt-L shortcut.

Download the “Toggle Downloads Popover” script

Download the script, and copy it to:

[Home] -> Library -> Scripts -> Applications -> Safari

Here it will show up in FastScripts (or Apple’s script menu) only when Safari is the front-most app. You can also assign it a keyboard shortcut, like Cmd-Opt-L, that will only be active when Safari is active.

Important: If your Mac is not configured to run with English as the primary language, the script will not work without a minor adjustment. You will need to open up the script and change the text string “Downloads” to the language-specific description for the downloads panel in your language. For example, to make it work with Safari running in Spanish, you would change the string to “Descargas”.

I find it very useful to be able to popup the panel when I am checking on the status of a long download, or when I want to check quickly whether I already downloaded something I had intended to. Hope this script works well for you as well!

19 Responses to “Restore Safari’s Downloads Keyboard Shortcut”

  1. David Says:

    Thanks, Daniel, this is great. One issue: is it just me, or does full-screen mode break AppleScript? Neither this script nor the typical “Open URL in Chrome” scripts seems to work in full-screen mode, even though both still work in normal mode…

  2. Dave Lehman Says:

    Same here: does not work in full-screen mode. But great idea otherwise– thanks!

  3. Daniel Jalkut Says:

    Interesting observations about Full Screen Mode. I’m seeing the same thing, but not for all scripts. Maybe apple disables GUI scripting in full screen mode?

  4. Ron L. Says:

    Thanks Daniel!

  5. Thankful Says:

    Thanks, I was missing this shortcut. Finding a little icon on the toolbar is a pain.

  6. Thankful With Comments Says:

    I previously thanked for this, but it only works when the Downloads icon is in the menu bar. If you’ve switched away to another window or closed the window with the download, you’re out of luck with this shortcut. Maybe someone can come up with a more general solution.

  7. Wolter Rose Says:

    For those of us who prefer the toolbar hidden occasionally:

    try
    click (first button of tool bar of window 1 whose accessibility description is localizedDescription)
    on error
    click menu item “Show Toolbar” of menu 1 of menu bar item “View” of menu bar 1
    click (first button of tool bar of window 1 whose accessibility description is localizedDescription)
    end try

  8. Rob Says:

    “You can also assign it a keyboard shortcut, like Cmd-Opt-L, that will only be active when Safari is active.”

    I’m finding the keyboard shortcut active in all apps, not just safari. I think this is just me, because I saw that once before (and was why I removed keyboard shortcuts from my FastScripts).

  9. Daniel Jalkut Says:

    @Rob – Did you put the script in the “Applications/Safari” subfolder of your scripts folder? If it’s not in that “magic” application-specific directory, then the keyboard shortcut will be considered global instead of application-specific.

    Daniel

  10. Rob Says:

    That would be it, wouldn’t it! What a noob! Have only been using this for how many years and I missed that.
    Thanks, Daniel.

  11. Chris Says:

    Would still prefer Apple to put this back in. Even the internal help file lists CMD-OPT-L for downloads…

  12. Daniel Jalkut Says:

    @Chris – I agree, and I have reported a bug to Apple asking for the shortcut to be restored.

  13. Anonymous Says:

    Here’s to hoping Firefox puts their download window in a popover panel soon, there were designs for this last year. Great that people can enjoy this feature in Safari though!

  14. Zev Eisenberg Says:

    Nice script, Daniel! Any chance you could add a test for whether Safari currently has a window open? I often close all windows while downloading something. Right now when you run the script with no windows open you get:

    Error Number:System Events got an error: Can’t get window 1 of application process “Safari”. Invalid index.
    -1719

    I tried to do it myself but my AppleScript foo isn’t up to it. (Read: I have no AppleScript foo.)

  15. Daniel Jalkut Says:

    Hi Zev – yeah, it should be reasonably easy to do something like that, but I have to admit I’m a little overwhelmed with other stuff now, so I might not get to revising the script for some time. Glad you like it!

  16. Michael Song Says:

    Mahalo for your tip.
    This is probably a basic question, but I’d like to know how to reverse this process as well.

  17. Elad Says:

    Great!
    I added an if focus statement before acting, just in case other application use the same shortcut.

    Instade of Fast Script, I recommend using Apptivate from the App Store.
    It’s just all you ever wanted from an keyboard activation app, and it’s cheeper.

  18. Daniel Jalkut Says:

    Michael: It all depends on how you decide to set up the keyboard shortcut. If you’re using my FastScripts tool, you could reverse the process by deleting the keyboard shortcut setting for the script.

    Elad: One of the nice things about FastScripts is if you set a keyboard shortcut for a specific application, it will only make the keyboard shortcut active while the application is active. I haven’t had a chance to check out Apptivate yet.

  19. Andy Lee Says:

    In 5.1.1 “Show Downloads” has been added to the View menu, and the old shortcut restored. I recently discovered this by accident when I forgot I wasn’t on my older machine.

Comments are closed.

Follow the Conversation

Stay up-to-date by subscribing to the Comments RSS Feed for this entry.