Control volume through retroarch with keyboard.
-
I'm using the PIgrrl 2 and it's really cool the only thing I wish I could do is use the two unused buttons on the top left of the screen to control the volume, they go through the gpio pins as keyboard presses ( #3 key for the top button, and #2 key for bottom button)
I tried editing the retroarch config file for volume up and down btn/key but nothing worked. What am i missing?
-
The volume settings you referenced are 'hotkeys' and generally work in conjunction with whatever button you have set to the 'Select' function. As such, you're top two buttons should work as long as you also press 'Select' at the same time.
-
I have a similar setup, I use some of the buttons on my arcade controller to change the volume + mute.
This is the mixer volume, so not the retroarch specific sound level (if there is a difference).Anyways these are the notes I took when setting this up some time ago:
Use triggerhappy to configure the keymappings, this works for keyboards as well as controllers and GPIO, I believe.
https://www.raspberrypi.org/forums/viewtopic.php?t=53916&p=411882
https://github.com/notro/fbtft-spindle/wiki/GPIO-keyboardset the deamon user to pi:
$sudo nano /etc/init.d/triggerhappy
and update the following line:
DAEMON_ARGS="--daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.socket --pidfile $PIDFILE --user pi /dev/input/event*"then, create config file:
$sudo nano /etc/triggerhappy/triggers.d/volumectrl.conf
containing:KEY_VOLUMEDOWN 1 /usr/bin/amixer sset PCM,0 2dB- KEY_VOLUMEUP 1 /usr/bin/amixer sset PCM,0 2dB+ KEY_MIN_INTERESTING 1 /usr/bin/amixer sset PCM,0 1+ toggle
and restart the triggerhappy deamon with:
$sudo invoke-rc.d triggerhappy restart
or
$sudo service triggerhappy restart
or
$sudo /etc/init.d/triggerhappy reload
whatever... (I could not be bothered to figure out what the difference was).
-
Yes, the hotkeymapping for volume works in retroarch, I mapped them for my needs
If I press select + joystick down for example, my volume goes dowm
-
@Zigurana's suggestion looks like a great solution.
Ha! I just noticed your name. "You fight like a Dairy Farmer!"
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.