[APP] Button Mapper - Customize your hardware buttons

Search This thread

maskawisewin

Member
Dec 1, 2013
7
0
Is it possible to change the OnePlus 7T screenshot button combination with root? Currently it's volume down + power. I do see only single button maps can be set, however with root is this possible? The community is complaining on Reddit that it is extremely easy to take accidental screenshots. I take at least one a day.
 

marciozomb13

Senior Member
Apr 30, 2012
1,450
2,582
Rio de Janeiro
Samsung Galaxy A51
Is it possible to change the OnePlus 7T screenshot button combination with root? Currently it's volume down + power. I do see only single button maps can be set, however with root is this possible? The community is complaining on Reddit that it is extremely easy to take accidental screenshots. I take at least one a day.
Power button cannot be remapped, so no.
 

Srormer89

Member
Oct 17, 2014
46
0
Button mapper volume keys help

Hey hello !
I bought the app, i have galaxy A70 and i enabled custom volume buttons. Nothing works, it's like the app do nothing... Any help plz ?
 

hkboy44

New member
Feb 2, 2020
4
1
Some here, though mine was working perfectly until I upgraded to the Samsung OneUI 2 thing recently, nothing work now for my Note 9 either.
 

flar2

Recognized Developer
Jun 11, 2012
18,840
87,834
Southwestern Ontario
elementalx.org
Hey hello !
I bought the app, i have galaxy A70 and i enabled custom volume buttons. Nothing works, it's like the app do nothing... Any help plz ?

Some here, though mine was working perfectly until I upgraded to the Samsung OneUI 2 thing recently, nothing work now for my Note 9 either.

Uninstall and reinstall, then make sure you exempt Button Mapper from battery optimization. Samsung is getting really bad for killing accessibility services lately. It should be a huge no-no, as many disabled people depend on this and other accessibility apps
 

hkboy44

New member
Feb 2, 2020
4
1
Uninstall and reinstall, then make sure you exempt Button Mapper from battery optimization. Samsung is getting really bad for killing accessibility services lately. It should be a huge no-no, as many disabled people depend on this and other accessibility apps

Thx, It is working now. All I did was adding Button Mapper to the list "Apps that won't be put to sleep" in Device care, no reinstall was required.
 
  • Like
Reactions: flar2

madkiran

Senior Member
Jan 27, 2013
420
79
Vizag
OnePlus Nord
hi.. I have button mapper pro version installed on my device (running Android 10 Havoc)
I recently got Realme buds wireless 2 neckband. I would like to do tasker task when I click one of those 3 buttons (vol + / - and answer / reject button). I tried detecting those buttons with autoInput but no button (AIkeycodename) is detected. also tried with button mapper to ad button by going ad button > clicked on + > pressed the button on my blutooth neckband but no button is detected... can anybody help me do this ?

any help would be appreciated.. thanks
 

marciozomb13

Senior Member
Apr 30, 2012
1,450
2,582
Rio de Janeiro
Samsung Galaxy A51
hi.. I have button mapper pro version installed on my device (running Android 10 Havoc)
I recently got Realme buds wireless 2 neckband. I would like to do tasker task when I click one of those 3 buttons (vol + / - and answer / reject button). I tried detecting those buttons with autoInput but no button (AIkeycodename) is detected. also tried with button mapper to ad button by going ad button > clicked on + > pressed the button on my blutooth neckband but no button is detected... can anybody help me do this ?

any help would be appreciated.. thanks
Plain simple answer, if the button is not detected, can't be remapped.
 
  • Like
Reactions: madkiran and flar2

BlizzardX

Member
Feb 9, 2020
7
1
Auckland
Hi

I've just purchased a Sony 55X9500G Bravia TV (New Zealand model so might have a different code in other parts of the world). Its running Android TV 9 and I've just installed button mapper in an attempt to remap a couple of Sony specific buttons on the remote such as 'Guide' and 'TV' to something more useable with Kodi.

I'm able to select them for remap and its working great in that respect except that I need to remap actions to an equivalent keyboard button, e.g. Guide = E. I understand that E is a keycode built in to Android and so shouldn't be a custom one but I can't seem to find the right area to enter in a standard keycode or button press... can anyone point me in the right direction?

Thanks,

Chris
 

flar2

Recognized Developer
Jun 11, 2012
18,840
87,834
Southwestern Ontario
elementalx.org
Hi

I've just purchased a Sony 55X9500G Bravia TV (New Zealand model so might have a different code in other parts of the world). Its running Android TV 9 and I've just installed button mapper in an attempt to remap a couple of Sony specific buttons on the remote such as 'Guide' and 'TV' to something more useable with Kodi.

I'm able to select them for remap and its working great in that respect except that I need to remap actions to an equivalent keyboard button, e.g. Guide = E. I understand that E is a keycode built in to Android and so shouldn't be a custom one but I can't seem to find the right area to enter in a standard keycode or button press... can anyone point me in the right direction?

Thanks,

Chris

You would use the custom keycode action for that. It allows you to specify the keycode sent by the button. Here is a list of keycodes: https://elementalx.org/button-mapper/android-key-codes/

A note about the two custom keycode methods:

"Custom keycode"
-100% reliable
-but requires adb command after every reboot

"Custom keycode ver. 2"
-one-time adb setup
-lower latency
-but less reliable (does not trigger in certain situations)
 

BlizzardX

Member
Feb 9, 2020
7
1
Auckland
You would use the custom keycode action for that. It allows you to specify the keycode sent by the button. Here is a list of keycodes: Removed URL as I can't post one with less than 10 posts!

A note about the two custom keycode methods:

"Custom keycode"
-100% reliable
-but requires adb command after every reboot

"Custom keycode ver. 2"
-one-time adb setup
-lower latency
-but less reliable (does not trigger in certain situations)

Thanks Flar2; do you know what the certain situations maybe? Being a TV rather than phone it will have different querks no doubt but this seems to be the best way I''m going to be able to get the remote to be more adaptable.

Looks like I can do debug via wifi, presume this won't cause an issue in the way the app works with its instructions?
 

BlizzardX

Member
Feb 9, 2020
7
1
Auckland
Ok so I can ADB in to the TV via the LAN connection but unfortunatley your button mapper tool is expecting a USB connection which I cannot do... Is there any other way around this?

---------- Post added at 08:08 AM ---------- Previous post was at 07:28 AM ----------

I could probably adb the command itself if you have a script for revision 2 of the keycode? I'm already in to the TV using adb but as I don't have root I don't think I can browse the data directory and hunt for the script!
 

flar2

Recognized Developer
Jun 11, 2012
18,840
87,834
Southwestern Ontario
elementalx.org
Ok so I can ADB in to the TV via the LAN connection but unfortunatley your button mapper tool is expecting a USB connection which I cannot do... Is there any other way around this?

---------- Post added at 08:08 AM ---------- Previous post was at 07:28 AM ----------

I could probably adb the command itself if you have a script for revision 2 of the keycode? I'm already in to the TV using adb but as I don't have root I don't think I can browse the data directory and hunt for the script!

Scroll to the bottom of setup.buttonmapper.app and you will find the manual adb commands. You can execute these over wifi
 
  • Like
Reactions: BlizzardX

BlizzardX

Member
Feb 9, 2020
7
1
Auckland
Scroll to the bottom of setup.buttonmapper.app and you will find the manual adb commands. You can execute these over wifi

Ah so its the same script no matter which revision of keycode I'm attempting to use? Cool, I found the codes yesterday but didn't want to run it as I wasn't sure if there was a different script for the rev2 approach.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Hello, how do I use Button Mapper on my Panasonic TV with Android TV?
    I searched in the settings but did not find the accessibility service
    to start Button Mapper.
    Can't remap mini keyboard buttons on android tv?
    The TV has Android 9 TV

    adb connect [YOUR TV's IP ADDRESS]:5555
    adb shell pm grant flar2.homebutton android.permission.WRITE_SECURE_SETTINGS

    See setup.buttonmapper.app
    1
    How do you reach it?
    On android 13 Samsung style you have to go to Settings, Advanced Features, Labs, swipe for split screen
  • 146
    p2142635636.jpg



    Button Mapper allows you to remap any action you want to physical or capacitive hardware buttons. This includes volume buttons, camera button, home button on Samsung devices and capacitive home, back and recents, Bixby, Active Edge, LG assistant button and many buttons on game controllers and other hardware. It does NOT work with onscreen home, back and recents buttons (i.e. soft keys or the navigation bar).

    You can launch shortcuts, apps or actions to single press, double tap and long press for hardware buttons.





    Download on XDA Labs:
    https://labs.xda-developers.com/store/app/flar2.homebutton

    Limitations:
    -does not work when the screen is off (unless rooted)
    -only works with hardware buttons, not onscreen buttons (i.e. navigation bar)
    -power button cannot be modified
    -there can be quirks with some devices due to non-standard hardware and software implementations by various manufacturers. I try to fix them, but sometimes it's difficult if I don't have the device to test.




    .
    32
    Examples of things you can do with this app:

    -Lockscreen peek: press and hold the home button to quickly check your lockscreen messages, release to turn off the screen (requires PRO VERSION)
    -Launch an app by long pressing the home button
    -Swap the back and recents buttons (capacitive buttons only, like on Samsung Galaxy or Asus Zenfone or One Plus One)
    -Use the home button to the turn the screen off from the homescreen on your Samsung Galaxy (requires PRO VERSION)
    -Control the button lights on your Samsung Galaxy. Turn them on or off, or change the length of time they light up
    18
    Big update!


    After many weeks of work, I've released an update that adds many new features and improvements, and fixes some longstanding bugs.

    The new version is rolling out to a small number of users on the Google Play Store.
    You can download the new version now on XDA Labs.



    Download on XDA Labs:
    https://labs.xda-developers.com/store/app/flar2.homebutton

    Pixel 2 Active Edge
    The Pixel 2 battery drain was caused by remapping Active Edge with root and not enabling screen off actions. It has nothing to do with the method that I use to remap the Edge squeeze, it was caused by a typo in the options logic. There are a lot of myths about how this app handles Active Edge. First of all, it does not consume battery and does not slow down your system. Such claims are false (notwithstanding the bug, which is now fixed). The method for remapping Active Edge does not scan through every logcat message. With root, it's 100% reliable and you will never see the Assistant and will remain in your current app. Without root, you will occasionally see the Assistant and it may bring you to the homescreen. The only limitation is you need to use English language until Google enables the Assistant for other languages.

    Root Command
    You can now remap buttons to a root command. This offers unlimited possibilities for power users. Obviously this requires root! It's available in the Pro version only

    Custom Key Codes
    You can also remap buttons to custom key codes. This means you can fully remap game controllers, tv remotes and other hardware attached to your device. I've compiled a list of key codes that are recognized by Android here. This requires root, unfortunately. It's available in the Pro version only.

    MIUI
    MIUI does some really stupid things to Android. In order for Button Mapper to work correctly, you need to grant the "Autostart" permission and disable battery optimization. If you do not grant the autostart permission, swiping Button Mapper away in recents will kill the service. If you do not set battery optimization to "No restrictions", then Button Mapper's service will be killed every 10 minutes or so.

    To grant these permissions, in go to the menu at upper right in Button Mapper and select "Introduction." Swipe to the screen title Permissions and follow the instructions.

    Samsung volume bug
    I tracked down a few obscure bugs on Samsung phones, including the volume scaling bug that I could never reproduce. This occurred when the volume buttons were remapped and then later the "Bixby only" option was selected without rebooting.

    Pirating this app
    Don't install pirated versions of this app (or any app that uses Accessibility or root), even just to try for a few minutes. Because it uses Accessibility Service and root, you must fully trust the developer. Using a pirated version of any root app gives hackers carte blanche on your device.



    • New actions:
      -toggle BlueTooth
      -headset key press
      -change keyboard
      -root command (requres root and PRO)
      -custom keycodes (requires root and PRO)
    • Android TV support
    • Screen off only option (requires root and PRO)
    • Fix battery drain on rooted Pixel 2
    • Update translations
    • Fix volume change for screen off actions
    • Improve Bixby handling
    • Fix volume bug on S8/Note8
    • Improve UI
    • Add 180 rotation to swap volume orientation setting
    • Improve root handling
    • Improve MIUI behaviour
    • New intro
    • Add feedback form
    • Speed and memory optimizations
    • Many other bug fixes and improvements



    .
    15
    Button Mapper update!

    There is an awesome new update for Button Mapper rolling out. You can get it on XDA Labs now, and on the Play Store in the coming days. This update improves volume button behavior, has fixes for Android Pie, improves Bixby remapping, lots of updates for Blackberry devices and adds a bunch of new actions, such as fullscreen mode, invert colors, toggles for NFC, airplane mode and mobile data, broadcast intents, Greek and Arabic languages, plus the usual bugfixes.

    Download on XDA Labs:
    https://labs.xda-developers.com/store/app/flar2.homebutton

    I want to highlight two important new features.

    First, the broadcast intent action (pro version only!). With this action, you can use a button press to broadcast an intent, which is Android's way of communicating between apps. This opens up literally endless possibilities. For example, if you have my High Brightness Mode app installed, you could enter flar2.hbmwidget.TOGGLE_HBM for long-press of volume button to toggle high brightness mode.

    The second feature is a new option to disable volume button remapping when the volume panel is showing. For example, if you have long press volume down mapped to toggle the flashlight, when the volume panel is showing, holding down volume will turn the volume down rather than turning on the flashlight. Once the volume panel disappears, holding the volume button will once again toggle the flashlight. I think this makes the volume button behavior more intuitive, so it's enabled by default. This can be turned off if you don't like it, the option is in Advanced options->Volume panel bypass.

    Please enjoy, and don't forget to leave a positive review if you find Button Mapper useful.
    12
    Version 0.66 is now released. It will roll out slowly on the Play Store, if you want it now, get it from XDA Labs
    https://labs.xda-developers.com/store/app/flar2.homebutton

    This version has tons of small fixups: volume button behavior is vastly improved, activities open right away after pressing home, everything is faster, and there are more options. Also quite a few UI improvements. New actions include toggle mobile data (root only), toggle wifi hotspot (Nougat and lower only), toggle autobrightness and clearn notifications. There is a new option to enable pocket detection, so actions won't occur while the phone is in your pocket (requires pro version).

    For Android P users, I've fixed the volume buttons to default to media and added an option to force them to control ring volume like older versions of Android.

    There is now an option to lock the screen in a way that allows you to unlock with the fingerprint. Rooted users could always do that, now unrooted users can too.

    I've also added an option to force audio routing through the speaker while Pressy, MiKey or other headphone jack buttons are plugged in. I don't have one of these devices, but it should all work.


    Changes:
    Pocket detection (pro)
    Toggle auto brightness
    Toggle Wifi hotspot (Android 7 and lower)
    Toggle mobile data (root)
    Clear notifications
    Compatibility with Android P
    Option to use speaker with Pressy, MiKey, etc
    Global bypass option
    More long press duration options
    Receive incoming phone calls with home button (Samsung)
    Add Spanish
    Update translations
    UI improvements
    Optional lock method that allows fingerprint unlocking
    Fix AOD crash with screenshot action (Samsung)
    Optimizations and bugfixes