• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[APP] Button Mapper - Customize your hardware buttons

Search This thread

lukeoverhere

Member
Feb 17, 2015
10
0
@flar2 - should i enter anything else here to have a button mapped to start/stop the Button Mapper with intents?

ACTION: -
PACKAGE: flar2.homebutton
COMPONENT: -
DATA: -
KEY:VALUE: flar2.homebutton.PAUSE_REMAPPING
KEY:VALUE: flar2.homebutton.RESUME_REMAPPING

*check 'start as activity?
*and does it change if I'm intending to use a button other than home?
 

u777

Member
Jan 11, 2021
6
3
The assistant button item in the button mapper app disappeared today suddenly. I don't know the reason. Why did it disappear? The assistant button item does not appear anymore when any version of the button mapper is installed, so I can"t remap the assistant button. How can I recover the assistant button item in the button mapper?
buttonmapper-assistant-jpg.jpg
buttonmapper-jpg.jpg
 

RemcoNL

New member
Jun 10, 2021
1
0
Hi, using BM Pro on Pixel 4a with all the latest updates.
When using VolumeDown key for Scroll Down it either does'nt respond at all or scrolls down just a tiny bit.
I would really like an actual Page Down / Swipe down action to occur without having to use Tasker/AutoApps.
Apps i would like to scroll in are various. Google feed, Newspaper app, Gmail, website in Chrome, ...

>> Is it possible to actually scroll down a whole page (screen height)?
 

nishanloshan

Member
Mar 31, 2021
23
2
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.




.
Do i need to root to access certain functions?
 
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.




.
will it replace the original buttons?
 

bubbablacksmith

Senior Member
Feb 24, 2017
57
15
Sorry if this has been asked before.

When I use button mapper to remap a button to a shell command, I get a "Starting: intent...." toast notification every time I press the button.
The button works exactly as I'd like, but I just don't like this notification.

Is there a way to supress this notification so that it doesn't appear at the bottom of my screen every time I use the button?

I am using Button Mapper on an Nvidia Shield Android TV (latest version).
Thanks

EDIT: wow, you know what? I just figured it out not long after posting this comment.

adb shell appops set flar2.homebutton TOAST_WINDOW deny

Now no more toast notifications. Yay.
 
Last edited:

Estyaah

New member
Dec 26, 2010
2
0
I'm using a Poco X3 pro with Miui 12.5 and I have an issue: I can configure double click "volume -" to launch the camera app, but it works only when I'm in the button mapper app. If i'm on my main screen or on another app, the button is not launching the camera app while I see that button mapper is well working according to the notification. It seems to be a lack of permission somewhere, but I'm a little lost with that... Any idea ?
 

sjamie

Senior Member
Aug 6, 2011
8,523
4,300
An update for Android 11 was already released
@flar2 I've been using this app for years and can't imagine living without it. Recently, I've been unable to restore my settings after a clean ROM flash. The exported settings file is simply not detected/visible in the app. Is this a new bug introduced with A11 ROMs? The app will only see a newly exported settings file but none that were previously created.
 

flar2

Recognized Developer
Jun 11, 2012
18,613
87,430
Southwestern Ontario
elementalx.org
@flar2 I've been using this app for years and can't imagine living without it. Recently, I've been unable to restore my settings after a clean ROM flash. The exported settings file is simply not detected/visible in the app. Is this a new bug introduced with A11 ROMs? The app will only see a newly exported settings file but none that were previously created.
Not sure, might be a permissions issue. But next update this will have to change completely because of new restrictions to storage access
 
  • Like
Reactions: sjamie

sjamie

Senior Member
Aug 6, 2011
8,523
4,300
Not sure, might be a permissions issue. But next update this will have to change completely because of new restrictions to storage access
It's weird because if I export settings now, I can import those settings but I just can't import any previous exported settings. BM has access to the appropriate folders. Strange.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    @flar2 can you do revision for Android 11?

    I really hope for the app update.
    An update for Android 11 was already released
    1
    @flar2 I've been using this app for years and can't imagine living without it. Recently, I've been unable to restore my settings after a clean ROM flash. The exported settings file is simply not detected/visible in the app. Is this a new bug introduced with A11 ROMs? The app will only see a newly exported settings file but none that were previously created.
    Not sure, might be a permissions issue. But next update this will have to change completely because of new restrictions to storage access
  • 133
    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.




    .
    30
    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