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.
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:
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.
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:
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.
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:
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
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:
Key 139 MENU WAKE_DROPPED
Key 172 HOME
Key 172 MENU WAKE_DROPPED
Key 139 HOME
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.
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).
Next, we are gonna change the default long press action of the menu button.
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.
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