You are here

Raspbian and media keys

Just got a Raspberry Pi3 and a bluetooth keyboard and annoyed that the media keys for doing things like change the column don't work ?
Just add these to ~/.config/openbox/lxde-pi-rc.xml after all the other <keybind> before the </keyboard>

<keybind key="XF86AudioRaiseVolume">
<action name="Execute">
<command>amixer set PCM 250+</command>
</action>
</keybind>
<keybind key="XF86AudioLowerVolume">
<action name="Execute">
<command>amixer set PCM 250-</command>
</action>
</keybind>

<keybind key="XF86AudioMute">
<action name="Execute">
<command>amixer set PCM toggle</command>
</action>
</keybind>

<keybind key="XF86AudioNext">
<action name="Execute">
<command>xmms2 next</command>
</action>
</keybind>
<keybind key="XF86AudioPrev">
<action name="Execute">
<command>xmms2 prev</command>
</action>
</keybind>

<keybind key="XF86AudioPause">
<action name="Execute">
<command>xmms2 toggle</command>
</action>
</keybind>
<keybind key="XF86AudioPlay">
<action name="Execute">
<command>xmms2 toggle</command>
</action>
</keybind>

<keybind key="XF86Search">
<action name="Execute">
<command>chromium-browser</command>
</action>
</keybind>

You can find a list of possible key codes here : http://wiki.linuxquestions.org/wiki/XF86_keyboard_symbols

Sections: 
topical-homopterousif you are reading this, don't click it as it will mark you as a spammer
if you are reading this, don't click it as it will mark you as a spammer