Audio Keys

The audio keys or multimedia keys are simple to add. Add the following keybindings to your file ~/.config/openbox/lxde-rc.xml:

    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute">
        <command>amixer set Master 5%+ unmute</command>
    <keybind key="XF86AudioLowerVolume">
      <action name="Execute">
        <command>amixer set Master 5%- unmute</command>
    <keybind key="XF86AudioMute">
        <action name="Execute">
            <command>amixer set Master toggle</command>

As you can see, it uses the key ids XF86AudioRaiseVolume, XF86AudioLowerVolume and XF86AudioMute. It uses the comman amixer to actually change the volume etc.

Credits go to: Create LXDE Fn Key Shortcut for Brightness & Volume on Archlinux .


I’m using an Apple MacBook Pro - and this means, the brightness is controlled through the kernel driver apple-gmux. You can simply change the brightness by writing to special files under the /sys filesystem tree.

In order to make it simpler to add the key binding, the following shell script can be used:


if [ ! -e /sys/class/backlight/gmux_backlight ]; then
    modprobe apple-gmux

MAX=$(cat /sys/class/backlight/gmux_backlight/max_brightness)

echo "Current: $VALUE"
echo "Max: $MAX"


if [ "$1" = "-" ]; then
    NEW=$(echo $VALUE - $STEP | bc)
elif [ "$1" = "+" ]; then
    NEW=$(echo $VALUE + $STEP | bc)

if [ $NEW -gt $MAX ]; then
elif [ $NEW -lt 0 ]; then

echo "New: $NEW"
echo $NEW > $BL_FILE

It first loads the kernel module “apple-gmux” if necessary, reads out the current value and the maximum value. In case the first argument is a “+” it calculates the new value using bc.

Please note, that this script needs to be run as root, so you probably want to set it up via sudo using e.g. the following rule:

myuser ALL=(ALL:ALL) NOPASSWD: /home/myuser/backlight

And the final bit is the keybindings for XF86MonBrightnessUp and XF86MonBrightnessDown in ~/.config/openbox/lxde-rc.xml:

    <keybind key="XF86MonBrightnessUp">
        <action name="Execute">
            <command>sudo /home/myuser/backlight +</command>
    <keybind key="XF86MonBrightnessDown">
        <action name="Execute">
            <command>sudo /home/myuser/backlight -</command>

Reload openbox configuration

Use openbox-lxde --reconfigure in order to reload the new keybindings and use them immediately.