Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Mouse key mapping

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mouse key mapping

    So I am building myself a TV box on the Rasberry pi 4 with the Lineage OS 17.1 adpted for Pi 4 by Konstang running Android 10 (regular Android, not ATV).

    Is there any way to remap the mouse buttons? Only left click works. When I left long click to get context menus I'll get it in some apps like square home launcher, but not in Nova launcher, e.g. the app drawer to drag icons to the desktop or get the context menu to uninstall, edit the icon etc. Also in browsers, long press with the mouse doesn't bring up context menus to open links in new tabs or to download images.

    I have tried key mappers, but the mouse buttons aren't registering as events and no key code is produced, so I don't think it's an issue with changing the generic.kl file. Where else in the Android system would I need to look to remap the mouse?

    #2
    You using some fancy gaming mouse? Generic mouse keys inputs should have registered. Normally on Android the mouse left-button is enter and the right-button is back.

    Haven't used these build.prop codes since Android 7 Nougat (don't know if they will work with Android 10) :
    Code:
    ro.softmouse.leftbtn.code=23
    ro.softmouse.midbtn.code=-1
    ro.softmouse.rightbtn.code=-1
    Where [ -1 ] is default, I believe can be changed to any number listed in generic.kl - still not 100% on that though.

    Comment


      #3
      Originally posted by RiCkLaR_atvX View Post
      You using some fancy gaming mouse? Generic mouse keys inputs should have registered. Normally on Android the mouse left-button is enter and the right-button is back.

      Haven't used these build.prop codes since Android 7 Nougat (don't know if they will work with Android 10) :
      Code:
      ro.softmouse.leftbtn.code=23
      ro.softmouse.midbtn.code=-1
      ro.softmouse.rightbtn.code=-1
      Where [ -1 ] is default, I believe can be changed to any number listed in generic.kl - still not 100% on that though.
      Thanks. OK I will give these a try and give feedback. It is just a regular PC mouse and keyboard.

      Comment


        #4
        Originally posted by RiCkLaR_atvX View Post
        You using some fancy gaming mouse? Generic mouse keys inputs should have registered. Normally on Android the mouse left-button is enter and the right-button is back.

        Haven't used these build.prop codes since Android 7 Nougat (don't know if they will work with Android 10) :
        Code:
        ro.softmouse.leftbtn.code=23
        ro.softmouse.midbtn.code=-1
        ro.softmouse.rightbtn.code=-1
        Where [ -1 ] is default, I believe can be changed to any number listed in generic.kl - still not 100% on that though.
        OK so I tried this with the values you provided and it didn't work. I will try look at the codes in generic.kl and see if mapping the mouse buttons to any of those codes makes a difference.

        Comment


          #5
          Ok using the codes from generic.kl had no effect. Any other ideas to fix the mouse?

          Comment


            #6
            Hmmmmmmm

            If you have available/and or have not already tried.

            Maybe

            Remove Dongle/Mouse from Pi Board and test on other Device/OS
            Confirm all functions working.

            Test other wireless mouse/dongle on Pi Board

            Test wired Mouse on Pi Board

            Test Wireless Mini Keyboard/Mouse Button Function.On Pi Board

            Comment


              #7
              Originally posted by freddy View Post
              Hmmmmmmm

              If you have available/and or have not already tried.

              Maybe

              Remove Dongle/Mouse from Pi Board and test on other Device/OS
              Confirm all functions working.

              Test other wireless mouse/dongle on Pi Board

              Test wired Mouse on Pi Board

              Test Wireless Mini Keyboard/Mouse Button Function.On Pi Board
              This mouse I use on my Windows PC and it functions as expected, I've tested on my M8S Max TV box running Android 7 and there again it functions as expected.

              However on the Pi I now see that right mouse button brings up the context menu to open new tabs, download images in Chrome since I've made the previous build prop changes. However Nova launcher app drawer context menus are still not working with left mouse button long press. However in Square home launcher and the default launcher the long press produces context menus. Maybe the issue is Nova launcher itself not being compatible with the Pi? I've seen custom ROM developers have modified their ROMs to be compatible with Nova launcher. How would one do that?

              I'll try test my wireless mini keyboard on the Pi to see if there's a difference.

              Comment


                #8
                Nice Job !!!!

                So All Functions are there in ROM they have been assigned Diff Key....

                Or Whatever you Did in Build Prop EDit.

                If It Aint Broke/Dont Fix It

                Keep Testing

                How many Launchers Do you Need?

                You Have Resolved The Issue Pretty Much...

                If you need a Custom ROM for Nova to Work..

                How Bad do you Need Nova?

                Comment


                  #9
                  I prefer Nova over Square home, but it's not essential. Yeah all working.

                  Just need to get the display to match my TV now without clipping on the edges. That I've solved with a DPI resolution app, it just breaks video playback on a couple apps if I add padding to decrease the image size. So need to switch padding to default when I use those apps. I've also adjusted overscan in the Pi boot config but that also breaks video playback on these apps. Not sure if there's anything else I can do, other than switching padding back and forth

                  Comment


                    #10
                    Originally posted by Mandrake View Post
                    I prefer Nova over Square home, but it's not essential. Yeah all working.
                    I prefer Lawnchair2 over Nova launcher or Square Home. When was the last time Nova was updated? Nova is now considered for Legacy framework only if they don't update it for the latest versions of Android. Lawnchair2's last update I believe was to make it fully compatible with Android 9 and I currently run it on my Android 10 phone with no issues. Give it a try on the Pi if looking for more customization than the standard LineageOS launcher provides.

                    Comment

                    Working...
                    X