Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Use one button for volume control without using hotkeys.



  • ok so after looking around for a way to control the volume without a hotkey and not finding what i wanted, i decided to do some experimenting. this might not work for everyone but it may give you an idea. first my equipment.
    Raspberry pi 3
    ultimarc ipac2 v2 (set as keyboard)
    arcade buttons (2 8-way joysticks, 6 buttons/player, coin and start button/player, volume up and volume down, power button)

    ok so first i found out which buttons i was using for hotkey. mine was (5).
    next figured out i wanted (tab) for volume up and (esc) for volume down.
    next i went into retroarch.cfg and found the volume controls and changed them to (tab) and (esc) accordingly.
    then i went to ultimarc's website and downloaded the software for setting up the ipac2.
    i went in and set up the buttons to look like my layout.
    then took the volume up an volume down buttons and set them to macro 1 and macro 2.
    then go to the macro screen and set macro 1 to 5,tab and macro 2 to 5,esc.
    save it and test it.
    hope this helps.



  • @djsnapper Might I suggest that you take a look at using a GPIO pin for volume. That is what I do, and the beauty of this solution is that you don't need to wire it to the ipac, no special configs there, and with a script you can send Any command to the Pi triggered by the button. In other words, you can send a command line to the system to control volume system-wide, not just in retroarch emulators.

    I have two dedicated buttons for volume on my system--one for volume up and the other for volume down. They issue commands such as /usr/bin/amixer -q -c 0 sset PCM 1dB+ unmute nocap for volume up and can be used in Emulation Station, any emulator--even Pixel desktop if that is important.

    I happen to have GPIONext software running to handle the pin mapping making it a little easier to configure, but honestly, a simple python script would have been sufficient.

    This is a much better situation for me that dealing with hotkeys limited to RetroArch.



  • @caver01 said in Use one button for volume control without using hotkeys.:

    I happen to have GPIONext software running to handle the pin mapping making it a little easier to configure, but honestly, a simple python script would have been sufficient.

    Hi Sir, I tried to use GPIONext to up/down to volume but unable. Would you please share your setup / configs on it then i can see to where i'm doing to mistake..



  • @ooskay I am away from my setup, and I don't even know where a config lives for GPIOnext. You might ask questions about GPIOnext on the github repo. The developer has been very friendly and helpful users in the past.

    If you want to go the stripped down route, you can find examples of raw python scripts that setup GPIO pins for input all over the internet. In my opinion, the key to making a script successful is to define OS commands as a function that gets called when the GPIO pin is triggered using EDGE detection method. The script ends in a Pause loop or a while loop so it never terminates.

    Then, you just need to launch the scrip at startup. Sorry to be so abstract about it, but it was definitely a learning process and everyone has a different config than you.



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.