Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


volume control by USB keyboard or volume knob
#5
(02-08-2020, 07:29 AM)mtnbrit Wrote: So I figured out a quick and dirty solution that works for me.


Code:
sudo apt-get install triggerhappy

$vi /etc/triggerhappy/triggers.d/media.conf
KEY_VOLUMEUP     1 /usr/bin/mpc volume +1
KEY_VOLUMEDOWN   1 /usr/bin/mpc volume -1
KEY_MUTE         1 /usr/bin/mpc toggle

/etc/init.d/triggerhappy restart
Caveats:
1. Mute (knob press) actually pauses and un-pauses the player, which is arguably more useful. Also mpc doesnt include a simple way to toggle mute and un-mute, so it would need some script fu to save the volume setting and state around mute/unmute presses.
2. Volume changes aren't reflected on the web GUI. Would love to know if there is a shell command that can change volume and mute/un-mute mpd while correctly updating the GUI?

check out Kent's post...
http://moodeaudio.org/forum/showthread.p...7#pid11427
----------
bob
Reply


Messages In This Thread
RE: volume control by USB keyboard or volume knob - by DRONE7 - 02-08-2020, 07:44 AM

Forum Jump: