Amazon's Early Black Friday Deals are going live now. Check out here.

How to Remap Capacitive Buttons on Android

You can swap, remap and change actions of capacitive buttons on both the rooted and non-rooted Android devices.

In this post, we will see 2 different ways to do this task. Let’s get started.

Swap and Remap Capacitive Buttons

Rooted and Non-Rooted Android Devices

Install and open Button remapper (no root) app.

Tap Switch and then "Continue" button on the popup. Enable the Accessibility services for the app.

We need to create actions to swap and remap keys. Keep in mind that the free version can only allow you to create two actions. If you need more, then you need to get the premium version.

Swap

You can swap capacitive buttons if you are not comfortable with the current position of the buttons.

For this instance, I’m using a device with three capacitive buttons (Back, Home and Recent Apps). And, I just want to swap Back and Recent Apps button.

Here is how we can do it:

  • chevron-right
    Tap + icon and select Short and long press option.
  • chevron-right
    Choose Back from Key drop-down list and Recent apps from Action drop-down list.
Creating action to swap back and recent apps
  • chevron-right
    Tap + icon and select Short and long press option again.
  • chevron-right
    Now choose Recent_Apps from the Key drop-down list and Back from Action drop-down list.
Back and recent apps swapped

That’s it. The buttons are swapped now.

Keep in mind that it has only swapped the buttons short press action. The long press action of the corresponding buttons is no longer work.

Remap

You can remap capacitive button as per your wish. Keep in mind that not all the actions need root. But, some do like Menu.

In this instance, I’m going to remap recent apps button with Camera and the following steps can make that happen:

  • angle-double-right
    Tap + icon and select Short and long press option.
  • angle-double-right
    Choose Recent_Apps from the Key drop-down list and Open camera from Action drop-down list.
Remapped recent apps to open camera

That’s it. You can just remap any capacitive buttons using the above steps as per your wish.

Keep in mind that the long press action of the remapped buttons won’t work any longer. If you need long press action, then you need to create a separate action for it.

Add Actions to Capacitive Buttons

The Back button long press won’t do any function by default on my device. Let’s add action to it.

  • angle-right
    Tap + icon and then tap Short and long press option.
  • angle-right
    Choose Back from the Key drop-down list and then tap Long press checkbox.
  • angle-right
    Choose Open dialer from Action drop-down list.
Back long press to open dialer

From now on, back button long press will open Phone app.

If your device’s capacitive buttons long press already have a default action, then you can’t change that action using this app. Instead, you can add the additional action to it.

For instance, by default, the home button long press open Search on my device. In this case, I can make the long press to open camera too and here are the steps:

  • angle-right
    Tap + and Short and long press option.
  • angle-right
    Choose Home and select Long press.
  • angle-right
    Choose Open camera from Action drop-down list.
Home long press to open camera

It won’t stop search functionality; Instead, it added additional functionality to the button. From now on, it will open both the camera and search.

You also have a lot of other options to play with such as Double click.

More click options

Rooted Android Devices Only

Swap

In this instance, I’m using a device that has three capacitive buttons (Menu, Home, and Back). We are going to swap Menu and Back and here are the steps:

  • angle-right
    Open ES File Explorer.
  • angle-right
    Tap Hamburger icon (Three vertical lines) > Local.
  • angle-right
    Now choose system > usr > Keylayout.
  • angle-right
    Find and take a backup of the Generic.kl file.
  • angle-right
    After that, open it (Tap the file > select Text > select ES Note Editor).
  • angle-right
    Tap Overflow menu (three vertical dots) and then Edit.
  • angle-right
    Now find these lines:

Key 139 MENU WAKE_DROPPED

Key 172 HOME

Menu key
  • angle-right
    Change the lines like these (we are just changing the key values here)

Key 172 MENU WAKE_DROPPED

Key 139 HOME

Swapped menu with home
  • angle-right
    Tap the back button and press Yes on the confirmation popup to save the file.
  • angle-right
    Reboot your device to apply the changes you’ve made.

That’s it. You should see that the buttons are swapped.

The home button will now begin to do all the functionalities of the menu button (including the short and long press actions) and vice versa.

Keep in mind that the changes you made don't affect the soft keys.

Remap

For remapping capacitive buttons, you need to edit Generic.kl file. So just follow the steps in above Swap section to open the file.

Within the file, choose the capacitive button that you want to remap.

In this instance, I want to remap menu button. I want the menu button to open Phone app.

So all we need to do here is changing the action of the capacitive button. Keep in mind that we need to know the exact name of the action to make this work.

Find the Menu and here is it look like

Key 139 MENU WAKE_DROPPED

Just change the action of the menu like this (CALL is the action that will open Phone app)

Key 139 CALL WAKE_DROPPED

Remapped menu to call

Save the file; reboot the phone.

From now on, the menu button will open Phone app.

The changes will only affect capacitive buttons; not soft keys.

Keep in mind that the above steps only change the short click action. The long press action of the menu button is intact.

For that’s what you need to take a look at the following section.

Adding or Changing Actions to Capacitive Buttons

Typically the back button long press won’t have any functionalities. If you wish, you can change or add new functionalities to the buttons.

In this instance, let’s see the steps to add long press functionality to the back button and change the long press action of the Menu button (the default long press action of menu button is Search).

  • angle-double-right
    Install Xposed Framework. You can find out all the steps here regarding installation.
  • angle-double-right
    Install GravityBox module for your Android device version.
  • angle-double-right
    After you finished activating the module, open it.
  • angle-double-right
    Go to Navigation keys actions.
  • angle-double-right
    You can configure your capacitive buttons long-press, double-tap, and single-tap action here.
  • angle-double-right
    Tap the Long-press action under Back Key.
  • angle-double-right
    Choose the action you want. In this case, I choose Take screenshot.
Back key long press action

Next, we are gonna change the default long press action of the menu button.

  • angle-double-right
    Tap Long-press action under Menu Key.
  • angle-double-right
    In this instance, I choose Show power menu.
Menu key long press action

That’s it. The new action completely changes the default one and from now on, menu long press will show power menu.

In case, if you want to revert back to default, just choose “Default”.

You can play with the options and customize each one as per your wish.

Keep in mind that the changes to the actions you’ve made using GravityBox apply to the soft keys of your device too.

You also need to another important thing: if you are trying this method after remapped capacitive buttons, then this won't work.

For instance: Above we have remapped menu to open Phone app. If you now try to change the long press of the menu using this method, then it won't work.


Final Thoughts

All the above are just an example of how you can remap, swap, add or change actions of capacitive buttons. You can use the above methods to customize each one as per your wish.

I hope that the above information is useful to you. If it is, share this one with your friends.

How to Remap Capacitive Buttons on Android

Click to Tweet This Post

Also see: