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:

Tap + icon and select Short and long press option.

Choose Back from Key drop-down list and Recent apps from Action drop-down list.

Tap + icon and select Short and long press option again.

Now choose Recent_Apps from the Key drop-down list and Back from Action drop-down list.

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:

Tap + icon and select Short and long press option.

Choose Recent_Apps from the Key drop-down list and Open camera from Action drop-down list.

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.

Tap + icon and then tap Short and long press option.

Choose Back from the Key drop-down list and then tap Long press checkbox.

Choose Open dialer from Action drop-down list.

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:

Tap + and Short and long press option.

Choose Home and select Long press.

Choose Open camera from Action drop-down list.

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.

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:

Open ES File Explorer.

Tap Hamburger icon (Three vertical lines) > Local.

Now choose system > usr > Keylayout.

Find and take a backup of the Generic.kl file.

After that, open it (Tap the file > select Text > select ES Note Editor).

Tap Overflow menu (three vertical dots) and then Edit.

Now find these lines:

Key 139 MENU WAKE_DROPPED

Key 172 HOME

Menu key

Change the lines like these (we are just changing the key values here)

Key 172 MENU WAKE_DROPPED

Key 139 HOME

Tap the back button and press Yes on the confirmation popup to save the file.

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

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

Install Xposed Framework. You can find out all the steps here regarding installation.

Install GravityBox module for your Android device version.

After you finished activating the module, open it.

Go to Navigation keys actions.

You can configure your capacitive buttons long-press, double-tap, and single-tap action here.

Tap the Long-press action under Back Key.

Choose the action you want. In this case, I choose Take screenshot.

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

Tap Long-press action under Menu Key.

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.

Also see:

How to Disable Volume Keys

How to Disable Capacitive Keys