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

How to add volume control via hotkey? [Solved]



  • I want to add audio volume control via hotkey+up/down. I have read the RetroArch configuration documentation (https://github.com/RetroPie/RetroPie-Setup/wiki/RetroArch-Configuration) and as I understand it I should edit the .cfg file for my controller (ControlBlock arcade pad) in /opt/retropie/configs/all/retroarch/autoconfig. In this location there is a file called ”ControlBlock Arcade Gamepad.cfg” but when I try to open it with sudo nano it just gives me an empty file under the name ”ControlBlock” in nano. Also, pressing ctrlX doesnt return me to the command line, it drops me to the empty file ”Arcade” and from there ”Gamepad”. I suspect I just don’t know how to use Linux.. Can a filename have spaces, what am I doing wrong?



  • It's because the file name has spaces in it. Because of them, nano saw it as three separate files. You've to put the path and file name in quotation marks, like this:

    nano "/opt/retropie/configs/all/retroarch/autoconfig/ControlBlock Arcade Gamepad.cfg"
    

    sudo shouldn't be necessary in this case. It would run nano with administrative rights, but the controller config files belong to the normal user pi, so you can edit them with the normal rights of this user.



  • @Clyde Thanks. And for anyone following up this question I was easily able to add audio volume control (via hotkey + D-pad up/down) to the config file mentioned earlier. Like this: input_volume_up_axis = ”” inside the quotation marks I copied the number for the up axis, which was -1 in my config file.



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.