Tuesday, April 24, 2012

Change OSX volume keyboard shortcut

There isn't a way to customize the keyboard shortcut to increase or decrease (i.e. change) the volume in OSX. That's unfortunate, because it's difficult to hit the fn button in the far bottom left of the keyboard and the F12 button in the far upper right of the keyboard if you're holding a beautiful baby like Bronwyn Massey.

This article provides instructions on how to make your own keyboard shortcut to change the volume on your mac with Applescript and Quicksilver. Since Applescript comes with OSX, you'll only need to download Quicksilver (http://qsapp.com/). Quicksilver is a very handy app that helps you quickly launch programs and has a global hotkey feature for free (vs. Alfred that requires you to buy their powerpack).

1. Get the Applescript code here or in my GitHub repo (https://github.com/jwsy/ChangeVolumeApplescript) and paste it into the Applescript Editor. You'll have to repeat these steps for each individual script.     
 2. Test the code by hitting the Run button. You should see the syntax highlighting and a growl notification in the upper right. If you don't have growl, just delete lines 6-12.

3. Save the script with File Format: Application. You'll need to move the resulting DVolume.app into the /Applications/Utilities folder or somewhere that Quicksilver will index in its catalog. OSX might prevent you from saving directly to /Applications/Utilities, so you might have to save to your desktop first and then copy it to /Applications/Utilities.

4. Finally, open your Quicksilver preferences and create a new HotKey (i.e. keyboard shortcut) in the Triggers tab.

Creating a keyboard shortcut is easy in Quicksilver ^_^

I set the keyboard shortcut to option+F3. Note that I'm using my F keys as standard function keys as shown below in the Keyboard settings. If you don't have this checked below (no check is the default setting), you can set the shortcut to fn+F3.