If you have a keyboard that does not have eject and volume controls natively (like Das Keyboard), you can map them using KeyRemap4MacBook (it works for more than MacBook though!). This is kernel level mapping, so the keys act native, contrary to solutions provided by Quicksilver or Spark.
Download and install KeyRemap4Macbook. Despite the name, it works for any Mac, not just the Macbook.
You can search through the preferences and see if any of the built-ins work for you. I chose to do my mappings manually, as it allows you to map any key to any key.
Open up your private.xml through the "Misc & Uninstall" tab of KeyRemap4Macbook. The following code maps Insert, Home, and Pageup to Volume Down, Up, and Mute respectively. Those keys are pretty useless anyway, so you probably won't miss them. If you wanted to map them to something else, you can do that here. If you want syntax on different keys, you can find them documented here:
/Library/org.pqrs/KeyRemap4MacBook/prefpane/checkbox.xml.
Here's the code:
<?xml version="1.0"?> <root> <list> <item> <name>Volume Keys</name> <appendix>Up, Down, Mute</appendix> <identifier>remap.volumeKeys</identifier> <autogen>--KeyToConsumer-- KeyCode::PC_INSERT, ConsumerKeyCode::VOLUME_DOWN</autogen> <autogen>--KeyToConsumer-- KeyCode::HOME, ConsumerKeyCode::VOLUME_UP</autogen> <autogen>--KeyToConsumer-- KeyCode::PAGEUP, ConsumerKeyCode::VOLUME_MUTE</autogen> </item> </list> </root>
<autogen>--KeyToConsumer-- KeyCode::PC_PRINTSCREEN, ConsumerKeyCode::EJECT</autogen>
Mac OS X Hints
http://hints.macworld.com/article.php?story=2011051714140216