This tutorial describes how to make multimedia keys like volume down, mute etc. work with XBMC. Though this was done with Xbian und Raspbmc on a Raspberry pi it should in theory work with XBMC on any platform.
Many modern keyboards sport special function keys for media and volume control. Though the same keyboards might work perfectly out of the box with your favorite Linux distribution, with Raspbmc or Xbian they might not. Fixing this can get frustrating, since XBMC uses it's own system for mapping keys.
In order to overwrite the default key mapping and add new ones, you have to create a special file, understand XBMC's key mapping syntax and find out the names for keys in XBMC. Programs like "showkey" won't help, since you can't use any of its output for this task. Follow this step-by-step guy and the missing key will work in no time
1. Creating a custom keymapping file
2. Understanding the keyboard.xml syntax
In the very basic example underneath the Mute and VolumeDown functions are mapped. Since they are placed in the <keyboard> section XBMC only execute them when coming from a keyboard. And because the are in the <global> section, they will work everywhere in XBMC. If you just want to make some multimedia buttons work, you won't have to get deeper into all the possibilities, but if you want to know how to e.g. map gamepad buttons, checkout this xbmc wiki article.
3. How to find out xbmc's name for keys
The fastest way to get this information is to activate the debugging log capabilites of XBMC and use its output
4. How to map any key to any function
4.1 Geek up the process
When enquiring for many key names, the command line tool "watch" can be very helpful. It updates the output of a command automatically, which makes manually reloading the log file unnessary
5. Restart to use the new keymap
To apply the changes, you can just reboot your Raspberry Pi through the XBMC interface. Alternatively you can also only restart XBMC:
You should now be able to enjoy the whole functionality of your multimedia keyboard. If it is still not working double check your keyboard.xml file for typos.