RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    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

    Control volume through retroarch with keyboard.

    Scheduled Pinned Locked Moved Help and Support
    5 Posts 4 Posters 15.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      Belowstupid
      last edited by

      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?

      mediamogulM 1 Reply Last reply Reply Quote 0
      • mediamogulM
        mediamogul Global Moderator @Belowstupid
        last edited by

        @Belowstupid

        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.

        RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

        1 Reply Last reply Reply Quote 0
        • Z
          Zigurana
          last edited by

          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-keyboard

          set 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).

          If tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

          1 Reply Last reply Reply Quote 3
          • T
            Threepwood
            last edited by

            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

            mediamogulM 1 Reply Last reply Reply Quote 0
            • mediamogulM
              mediamogul Global Moderator @Threepwood
              last edited by mediamogul

              @Threepwood

              @Zigurana's suggestion looks like a great solution.

              Ha! I just noticed your name. "You fight like a Dairy Farmer!"

              RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              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.