Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to be able to open a file with a simple keyboard shortcut. It's always going to be the same file. I want to do this because I have an encrypted disk image that I'd like to mount quickly and easily. So if I'm in Chrome and I want to download a file to the disk image, I could click "ctrl + 1 + 2 + whatever", the drive would be mounted, and then I could save the file to the mounted drive.

I'm running Mac OS X 10.6.4.

share|improve this question
Why not just leave it mounted while you're using the machine? – jtbandes Aug 8 '10 at 19:48
up vote 7 down vote accepted

Wow, my first answer was actually completely wrong about OS X—I actually discovered this today, but a large part of the improvements to automation that Apple made for 10.6 make it possible to accomplish this through the use of services.

Open Automator from the Applications folder and choose the Service template. Specify Service receives no input in any application at the top. Then define your workflow however you want, either by using the Get Specified Finder Items and Open Finder Items actions, the Run AppleScript action, or the Run Shell Script action, and save the workflow as "Mount My Encrypted Disk Image" or whatever. It'll be automatically added to the services menu.

To assign a keystroke to this service, go to System Preferences -> Keyboard -> Keyboard Shortcuts -> Services, and assign a keyboard shortcut to "Mount My Encrypted Disk Image," which should appear under General.

share|improve this answer
I used the Get Specified Finder Items and Open Finder Items action in that order in my automater workflow. When I assigned the keyboard shortcut it was not immediately obvious to click in the empty space to the right of the service name. Your directions were dead on. I am really impressed. I honestly wasn't expecting an answer for this question. Thank you so much! – Brian Aug 12 '10 at 4:12

OS X cannot do this on its own. You can define custom keyboard shortcuts, but only for existing menu items in any application.

There is 3rd party software that can accomplish this. I personally use Keyboard Maestro (the last version they released that was free—still works in 10.6!) but that is now shareware. QuickSilver seems to be another alternative; that's free but has some significant extra functionality—not sure how much of that you could turn off. Butler is a cheaper alternative to Keyboard Maestro.

If you do further research on this, what you're really looking for is "Keyboard Macros."

share|improve this answer
I'll spend sometime with both programs and see if they can do what I need. – Brian Aug 10 '10 at 4:18

You must log in to answer this question.

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