Create a script call "amixertoggle" and save it in /usr/local/bin:
#!/bin/bash
amixer $1 sset Headphone toggle
amixer $1 sset Speaker toggle
amixer $1 sset PCM toggle
amixer $1 sset Master toggle
Edit file $HOME/.config/openbox/lxde-rc.xml and replace block that has "XF86AudioMute" to call our script. For example:
...
...
<keybind key="XF86AudioMute">
<action name="Execute">
<command>amixertoggle -c 1 toggle</command>
</action>
...
...
(" -c 1" above is for machine, where the mixer control is actually on card 1. If doesn't work, we can try different number)
Reload the modified file lxde-rc.xml by doing:
openbox --reconfigure
That's it. Everytime we press "Mute" button on our PC keyboard, the mute/unmute will toggle.
#!/bin/bash
amixer $1 sset Headphone toggle
amixer $1 sset Speaker toggle
amixer $1 sset PCM toggle
amixer $1 sset Master toggle
Edit file $HOME/.config/openbox/lxde-rc.xml and replace block that has "XF86AudioMute" to call our script. For example:
...
...
<keybind key="XF86AudioMute">
<action name="Execute">
<command>amixertoggle -c 1 toggle</command>
</action>
...
...
(" -c 1" above is for machine, where the mixer control is actually on card 1. If doesn't work, we can try different number)
Reload the modified file lxde-rc.xml by doing:
openbox --reconfigure
That's it. Everytime we press "Mute" button on our PC keyboard, the mute/unmute will toggle.