Jump to content

[Guide] Binding function keys to volume control keys


5 posts in this topic

Recommended Posts

Hi guys,

 

If you are like me, you don't have volume control keys and maybe want to assign function keys to volume control keys. (I simply suggest to use function keys because that's all I got as free keys on my Apple keyboard M2452. If your keyboard has multimedia keys or wheel, obviously you don't want to do this.)

 

I was looking for a way to bind unassigned function keys to volume control keys without using Apple scripts or thrid party applications. The reasons that I didn't want to use them are:

  • AppleScript runs slow and it shows up in Dock for a short period of time. (According to Rammjet, you can use Dock Dodger to avoid this short appearance.)
  • When AppleScript runs, it takes away the system focus from the current application. For example, a full-screened DVD Player shrinks back to a window of normal size because AppleScript takes the focus. (According to Rammjet, you can change the way that AppleScript lunches a script such that the system focus doesn't move to AppleScript.)
  • Without a Bezel icon, the user should solely rely on the sound to judge the volume level.
  • Usually third party applications which binds keys to scripts stay on Menu Bar or Dock and they need to be run at least once every time after reboot (or need to be registered as a Login Item.)

While I didn't find a perfect solution to my problem above, I found a satisfactory solution, which provides:

  • None of above.
  • It runs fast and whenever assigned function keys are pressed, the system receives corresponding virtual volume control key signals. Hence Apple original Bezel icons trivially show up.
  • This third party application doesn't stay anywhere on screen (and runs as a background daemon).

So this solution involves one application installation.

 

Here's a detailed demonstration of binding F9 key to Volume Down key. (Don't get scared. It's just step by step instructions.)

  1. Download and install ControllerMate. It requires rebooting the system. Reboot the system.
  2. Run System Preferences, select Keyboard & Mouse, and choose Keyboard Shortcut. Make sure that F9 key is not assigned to any actions. Close System Preferences.
  3. Run ControllerMate in Applications folder. Then under Window menu, select Keystrokes Palette. (You should see Volume Down, Volume Up, Mute, and Media Eject keys in Keystokes Palette window.)
  4. On the left panel of ControllerMate window, click Programming button and check Start Page to enable this diagram page (not for editing but for key binding action).
  5. On Palette window, choose Controller from the drop down list. Your keyboard icon should show up. Click your keyboard icon.
  6. Press F9 key to find the blinking F9 key icon on Palette window. Drag and drop the icon the the right panel of ControllerMate window. Drag and drop Volume Down key icon on Keystrokes Palette window to the right panel of ControllerMate window. Grab OFF in F9 icon to drop it on Volume Down icon in ControllerMate window. They should be connected.
  7. Save and quit ControllerMate.
  8. Hold down F9 key to see if a Bezel shows up while the volume is decreasing.

Note that if F12 is not assigned to any action, it serves as Media Eject key by default. So you may want to bind F9, F10, and F11 to Volume Down, Volume Up, and Mute respectively because this layout is the Apple volume control key layout. You can assign up to 10 keys without purchasing ControllerMate, which is good enough for this purpose. If you like it, you should buy it. Personally I found that it makes a sense to keep ControllerMate under Utility folder because it relates to device control not an application. Enjoy your volume control keys with Bezel icons.

 

--Stravaganza

 

P.S. As of today (11 February 2008) at my best knowledge, there's no application that catches volume key signals (because OS X intercepts them before applications receive them) and that there's no application which can generate volume key signals except ControllerMate. Hence if you find out either how to generate volume key signals or binaries in the file system doing volume control functions, you wouldn't need any additional application to be installed. If you find any of these, please report to the community. :)

 

P.P.S. It is not surprising that I am not the first one who asks the above (original) question. But it is surprising that some one already had the exact same (partial) solution and posted here, and I couldn't find it. Oh, well, what a pollution. Thanks to Mebster, here's the link to the little Q&A which happened ages ago. :P

Link to comment
Share on other sites

WOO - HOO.

 

This really seems like an overly complicated solution, but it did solve the problem I was having.

 

My volume control keys are in the form of a little dial on the side of my laptop, and work fine, though they don't know when to quit working... it'll just keep raising or lowering the volume all day. (and once it hits the min or max, it sits there beeping at me)

 

thread about this here: http://forum.insanelymac.com/index.php?showtopic=86248

 

At least with this program, I was able to bind volume down to a key, so when I accidentally bump my volume knob, I can press F8, which interrupts it, and it doesn't keep beeping at me for 10 minutes at a time.

 

If someone could point me in the direction of what config files osx uses to bind keystrokes, I'd be happy to see if I can work out a way of doing this that doesn't involve installing large crippled programs that were designed for something else.

Link to comment
Share on other sites

  • 10 months later...
  • 7 months later...
How can i asign ctrl+F12 to volume increase? as an example... When i press F12 this key now does brings up dashboard and increases volume... This is really annoying...

You, I believe, did not read the green section. Cancel the binding of F12 to Dashboard first in System Preferences (as mentioned in the second step in the green section of the OP).

Link to comment
Share on other sites

  • 11 months later...
Hi guys,

 

If you are like me, you don't have volume control keys and maybe want to assign function keys to volume control keys. (I simply suggest to use function keys because that's all I got as free keys on my Apple keyboard M2452. If your keyboard has multimedia keys or wheel, obviously you don't want to do this.)

 

I was looking for a way to bind unassigned function keys to volume control keys without using Apple scripts or thrid party applications. The reasons that I didn't want to use them are:

  • AppleScript runs slow and it shows up in Dock for a short period of time. (According to Rammjet, you can use Dock Dodger to avoid this short appearance.)
  • When AppleScript runs, it takes away the system focus from the current application. For example, a full-screened DVD Player shrinks back to a window of normal size because AppleScript takes the focus. (According to Rammjet, you can change the way that AppleScript lunches a script such that the system focus doesn't move to AppleScript.)
  • Without a Bezel icon, the user should solely rely on the sound to judge the volume level.
  • Usually third party applications which binds keys to scripts stay on Menu Bar or Dock and they need to be run at least once every time after reboot (or need to be registered as a Login Item.)

While I didn't find a perfect solution to my problem above, I found a satisfactory solution, which provides:

  • None of above.
  • It runs fast and whenever assigned function keys are pressed, the system receives corresponding virtual volume control key signals. Hence Apple original Bezel icons trivially show up.
  • This third party application doesn't stay anywhere on screen (and runs as a background daemon).

So this solution involves one application installation.

 

Here's a detailed demonstration of binding F9 key to Volume Down key. (Don't get scared. It's just step by step instructions.)

  1. Download and install ControllerMate. It requires rebooting the system. Reboot the system.
  2. Run System Preferences, select Keyboard & Mouse, and choose Keyboard Shortcut. Make sure that F9 key is not assigned to any actions. Close System Preferences.
  3. Run ControllerMate in Applications folder. Then under Window menu, select Keystrokes Palette. (You should see Volume Down, Volume Up, Mute, and Media Eject keys in Keystokes Palette window.)
  4. On the left panel of ControllerMate window, click Programming button and check Start Page to enable this diagram page (not for editing but for key binding action).
  5. On Palette window, choose Controller from the drop down list. Your keyboard icon should show up. Click your keyboard icon.
  6. Press F9 key to find the blinking F9 key icon on Palette window. Drag and drop the icon the the right panel of ControllerMate window. Drag and drop Volume Down key icon on Keystrokes Palette window to the right panel of ControllerMate window. Grab OFF in F9 icon to drop it on Volume Down icon in ControllerMate window. They should be connected.
  7. Save and quit ControllerMate.
  8. Hold down F9 key to see if a Bezel shows up while the volume is decreasing.

Note that if F12 is not assigned to any action, it serves as Media Eject key by default. So you may want to bind F9, F10, and F11 to Volume Down, Volume Up, and Mute respectively because this layout is the Apple volume control key layout. You can assign up to 10 keys without purchasing ControllerMate, which is good enough for this purpose. If you like it, you should buy it. Personally I found that it makes a sense to keep ControllerMate under Utility folder because it relates to device control not an application. Enjoy your volume control keys with Bezel icons.

 

--Stravaganza

 

P.S. As of today (11 February 2008) at my best knowledge, there's no application that catches volume key signals (because OS X intercepts them before applications receive them) and that there's no application which can generate volume key signals except ControllerMate. Hence if you find out either how to generate volume key signals or binaries in the file system doing volume control functions, you wouldn't need any additional application to be installed. If you find any of these, please report to the community. :thumbsup_anim:

 

P.P.S. It is not surprising that I am not the first one who asks the above (original) question. But it is surprising that some one already had the exact same (partial) solution and posted here, and I couldn't find it. Oh, well, what a pollution. Thanks to Mebster, here's the link to the little Q&A which happened ages ago. :D

 

 

Thanks so much I finally got my Rosewill Keyboard with the volume buttons working. now to get my {censored} radeon 2100 to work

Link to comment
Share on other sites

 Share

×
×
  • Create New...