UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Silence slider button usage

    Scheduled Pinned Locked Moved Oneplus 5/5T
    5 Posts 2 Posters 384 Views 1 Watching
    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.
      • mihaelM Offline
        mihael
        last edited by

        Oneplus 5T has on the left side of the phone a slider button that is used to put the phone on silent mode when the slider is on the top position. That works very well.

        But the button has three positions and the middle position has no different signification from the bottom position.

        I would like to have, for example, the multimedia muted on the middle position. By multimedia I mean the sounds from the music application or from a website. I see the multimedia volume slider in uVolMan - that is where I got the name for it.

        Is there any way I can create a script where I map the middle position of the silence slider to the muting of the multimedia volume?

        K 1 Reply Last reply Reply Quote 0
        • K Offline
          kugiigi @mihael
          last edited by

          @mihael I guess it's possible. If volume of different audio roles can be adjusted via script, maybe it's gsettings for example. Then you can use evtest to check the details like the keycode of what the toggle use for each state. Then you can go from there. This is just a high level I can think of and I can't help you further 😅

          mihaelM 1 Reply Last reply Reply Quote 1
          • mihaelM Offline
            mihael @kugiigi
            last edited by

            @kugiigi Great start, thank you! And how can I adjust the volume of multimedia from bash?

            K 1 Reply Last reply Reply Quote 0
            • K Offline
              kugiigi @mihael
              last edited by

              @mihael I don't know. Perhaps check the source of uVolman. If this is something that can be simple, I can also try creating a custom patch for Lomiri to give you these functions.

              mihaelM 1 Reply Last reply Reply Quote 1
              • mihaelM Offline
                mihael @kugiigi
                last edited by

                @kugiigi Hello again.

                Through evtest I can monitor /dev/input/event2: tri-state-key but then I don't find something similar anywhere in gsettings... I am stuck here and any hint in the right direction would be much appreciated!

                Thank you!

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