How to set up smartphones and PCs. Informational portal
  • home
  • Reviews
  • How to change the location of buttons on android. How to remap Android hardware buttons (Using Android music player control as an example)

How to change the location of buttons on android. How to remap Android hardware buttons (Using Android music player control as an example)

Many people are familiar with the situation when you buy a new smartphone, but the physical power button does not have a photographing function, just as there is no separate key for this, and in fact it was on the previous device and it helped a lot. At first glance, a trifle, but the hands themselves reach for the mechanics, not the sensor, and at the most inopportune moment.

Special programs come to the rescue that allow you to completely reprogram the physical keys of the gadget and assign any action to them. This is especially helpful if the power button is broken or you want to rewind tracks like on an mp3 player, but the built-in can't do this ... Do you need root rights for this? Will there be glitches? How does it even work? Today I will try to answer the questions posed.

First, I'll introduce the test subjects. The first application is called "Key remapping", at least in Russian Google Play. It can work with both physical and touch manipulators, but for some actions it requires root rights. The second participant will be Button Mapper, which can do the same, but does not require root rights at all, which is already interesting.

The following equipment was used as test equipment:

  • DEXP Ursus 8EV2 3G tablet (Android 4.4.2, MT8382 processor, 4 x Cortex-A7 1.3 GHz, Mali-400 MP2 video core, 1 GB RAM, 4000 mAh battery, 3G module, Wi-Fi 802.11b / g / n );
  • Homtom HT3 Pro smartphone (Android 5.1 Lollipop, MT6735P processor, 4 x Cortex-A53 1.0 GHz, 64-bit, Mali-T720 video core, 2 GB RAM, 3000 mAh battery, 4G-module, Wi-Fi 802.11b / g / n).

Key remapping app overview

The program has not been updated for a long time, but it may not be necessary, since it can do everything that can be done with physical keys: assign any action, launch certain applications, disable buttons, and even write key combinations to access special functions.

"Key remapping" works only with Android 4.3 or higher, is shareware and includes an interface translated into Russian. Thus, we get a kind of standard for such programs, which we will rely on in the future. Or maybe we won't, because this is only a first impression.

Do not forget that the firmware of the device plays an important role, especially if it is modified, so you do not need to treat the program as a panacea.

Control buttons are divided into mechanical and software. The first ones are located on the body of your gadget - this is the power button, the volume rocker (two buttons with one rocker key) and sometimes the button Home(recently it has been more often software.

The second are virtual buttons located on the screen of a smartphone or tablet and also controlled by pressing a finger, but already on the screen. This is a soft button Home, button Back and the button Latest Apps(sometimes this is the context Menu button). The appearance of these buttons depends on the version of Android you are using. It can be, respectively, a house, a curved arrow and two rectangles one after the other (Android 4.x version) or, respectively, a circle, triangle and square (Android 5 version).

Let's dwell on assignment of control buttons.

Button assignment nutrition and swing loudness obviously. However, the peculiarity is that the inclusion off the smartphone is made by long (more than 2 seconds) pressing the power button, after which the OS boot process follows. At working smartphone short press this button calls lock screen(if enabled in the settings) or go directly to the desktop. When the smartphone is running, a long press on the power button calls up the Menu, in which there are items Shutdown,Data Transfer, Offline Mode and Restart(Restart).

Mechanical button Home short press brings up the lock screen or go to the main desktop. Long press can cause list of recently launched applications, and double-tap - one of the programs (for example, in Samsung smartphones, the S Voice application is called up).

Program button Back causes the transition to previous screen, successive clicks - respectively, on several previous screens until the application is closed. It should be emphasized here that in the latter case, the application is unloaded from RAM, while pressing the button Home causes the transition to the main desktop, but the previously open application remains in memory and continues run in the background.

Button Latest Apps very convenient, since if you need to re-launch one of the previously used applications, there is no need to search for it again in the general list of programs ( Applications Menu) or look for its icon on desktops. Applications in the list are always sorted in reverse chronological order of their launch (last launched first in the list). In addition, the list window contains additional buttons for calling the List of active tasks (running in the background of applications), a Search for applications button and a Clear the list of recent applications button.


At some point, it may happen that the power key of your Android phone or tablet fails. Today we will tell you what to do if such a device needs to be turned on.

There are several methods for starting a device without a power button, but they depend on how the device is turned off: it is completely turned off or is in sleep mode. In the first case, it will be more difficult to cope with the problem, in the second, accordingly, it will be easier. Let's consider the options in order.

Option 1: Completely turned off device

If your device is turned off, you can start it using recovery mode or ADB.

Recovery
If your smartphone or tablet is turned off (for example, after the battery is discharged), you can try to activate it by entering the recovery mode. This is done like this.


Wait for the system to boot and either use the device or use the programs described below to reassign the power button.

If you know for sure that YUSB debugging is disabled, then use the recovery method. If debugging is active, you can proceed to the steps described below.


In addition to command line control, an application is also available that allows you to automate the procedures for working with the Android Debag Bridge. It can also be used to force the device to reboot with a faulty power button.


Both recovery and ADB are not a complete solution to the problem: these methods allow you to start the device, but it can enter sleep mode. Let's take a look at how to wake up the device if this happens.

Option 2: The device is in sleep mode

If your phone or tablet has entered sleep mode and the power button is damaged, you can start the device in the following ways.

Connect to charger or PC
The most versatile way. Almost all Android devices wake up when plugged into a charger. This statement is also true for connecting to a computer or laptop via USB. However, this method should not be abused: firstly, the connection socket on the device may fail; secondly, constant connection / disconnection to the mains negatively affects the state of the battery.

Calling the device
When you receive an incoming call (regular or Internet telephony), your smartphone or tablet wakes up from sleep mode. This method is more convenient than the previous one, however, it is not very elegant, and it is not always possible to implement it.

Wake up with a tap on the screen
In some devices (for example, from LG, ASUS), the function of waking up by touching the screen is implemented: double tap on it with your finger and the phone will wake up from sleep mode. Unfortunately, it is not easy to implement this option on unsupported devices.

Reassigning the power button
The best way out of the situation (except for replacing the button, of course) would be to transfer its functions to any other button. These include all kinds of programmable keys (like calling the Bixby voice assistant on the latest Samsung) or volume buttons. We'll leave the issue of programmable keys for another article, but for now let's look at the Power Button to Volume Button application.

Please note that on Xiaomi devices it may be necessary to fix the app in memory so that the process manager does not disable it.

Sensor wake-up
If the method described above does not suit you for some reason, there are applications that allow you to control the device using sensors: an accelerometer, gyroscope or proximity sensor. The most popular solution for this is Gravity Screen.

Despite its great capabilities, the application has several significant disadvantages. The first is the limitations of the free version. The second is the increased battery consumption due to the constant use of sensors. Third, some options are not supported on some devices, while other features may require root access.

Conclusion

As you can see, a device with a faulty power button can still be used. At the same time, we note that no solution is ideal, therefore, we recommend that you, if possible, still replace the button, yourself or by contacting a service center.

10.12.2017

  • Android App Key Remap, Version: 1.12.0, Price: Free

It so happened historically that on smartphones it is more convenient for me to have the navigation button "Back" on the right. And on my BQ Aquaris U Plus it is just on the left and it is "oh, how uncomfortable" to reach for it. It's not a problem to get used to it, but it's too late for my fingers to grow in length, and the inconvenience of getting used to it hasn't gone away. Unfortunately, the smartphone manufacturer BQ Aquaris did not provide a tool to change the functionality of the navigation buttons, even on-screen ones, so they had to turn to third-party applications.

The most preferred application - GravityBox - did not cope with the task assigned to it. On pressing the "Back" and "Home" buttons, it allowed you to hang any action, but somehow it could not influence the "Recent" button. It was a wild idea to block both the "Back" and "Recents" buttons altogether, leaving all responsibilities to the remaining "Home" button, but GravityBox could not simply disable the "Recents" button. The Spaniards in general somehow protected their smartphones "from the fool", and, as far as I know, so far no one has been able to get system root rights on the stock firmware of these smartphones.

Leaving GravityBox alone, I turned to other softinks, whose specialization was precisely the reassignment of the functionality of the navigation buttons. In the battle with the software of the Spanish-Chinese gadget, only one softphone with the original name "Key remapping" was able to win. I use it.

It has become popular among mobile software developers to divide their functionality into two unequal parts. The first part - free - allows you to use the softphone for its intended purpose quite normally. The second - paid - brings some additional features and convenience. And this, in my opinion, is correct. Likewise, the "Reassign Keys" application has both basic functions (reassignment of single short and long presses on the navigation buttons in the amount of no more than two pieces) and premium features (assigning actions to button combinations, removing the restriction on the number of reassignments). By the way, the latest version of the app got rid of ads even in the free version.

What should be mentioned without fail is that root-rights are not needed for the functioning of the softinka. Recently, I began to notice that proprietary firmware has become more functional and customizable (we are not talking about AOSP), so root rights have become less and less required ... And various payment services do not really like ROOT, although it can be hide. But that is another story...

The application interface is minimalistic.

There are only four controls in the free version. These are the three points under which settings are usually hidden. This is a switch for activating and deactivating the service. This is the "Quick Disconnect" checkbox for displaying the application status on the notification panel (with the ability to pause / resume the service by tapping). And it's a round button with a plus sign for adding a new remapping. In fact, there are no settings in this application, and when you click on the button with three dots, only one item appears - "About the program".

To activate the service, you need to enable these very special features for the application in the gadget settings in the "Accessibility" section.

To disable the service, you need to do exactly the same steps, only the special features for the "Key remapping" application should be disabled. It makes sense, isn't it? It's great that you don't have to manually search for the aforementioned "special" features in the jungle of system settings: the software itself will guide you to the necessary points.

The ability to quickly deactivate the application action (without going to system settings) appeared only in the latest version. Do you really need it? I don't, but maybe it will be useful to someone (needed). When the "Quick Disconnect" checkbox is activated, a tile (strip?) Appears in the notification panel, dedicated to the "Key remapping" softphone. By tapping on it, you can quickly turn off and turn back on the active reassignment of the softphone.

The informational part of the main and only application window is represented by two sections: "Premium Features" and "Active Reassignments". For now, let's leave the first one and pay attention to the second. Active reassignments is a list of reassignments made from our filing. In the free version, as already mentioned, there may be only two reassignments, but that was enough for me. On the button "Recent applications" (in the application it is called "Recent applications", but the meaning is the same) assigned the action "Back", that is, the functionality of the button "Back". And for the "Back" button I assigned the action "Recent_Apps" ("Recent applications", I suppose). Thus, the Back and Recent Apps buttons on my smartphone are reversed. Hooray!

By the way, I learned about the softphone almost a year ago, but I started using it only two months ago. Why is that? Because on the sixth Android, not all the functionality of the buttons was transferred. That is, all, but only stock. Let me explain. Such a function as the transition to the previous application by double tap on the button "Recent applications" was implemented by the Google team only in Android Nougat. And the Spanish developers from the BQ team have implemented this in their smartphones and in Android Marshmallow. But when transferring the functionality of the "Recent Applications" button on the sixth Android using the described softinka, the processing of the doubletap was lost (it was not transferred to the new button, but disappeared on the old one), since it was, as it were, brought in from the outside. I didn’t want to lose such a convenient "chip", so the "Reassign keys" softka did not take root for me then. But I never got used to the "Back" button on the left, so after switching to Nugu I tried to use the softphone again. And I tried it for a reason. Now the transition to the previous application by doubletap is also transferred to the new button along with the main action ("Recent applications").

The procedure for adding a new remapping is simple and straightforward; I think a couple of screenshots will be enough. I delete one of my overrides (for the Recent Apps button) and add it again. After clicking on the add reassignment button, you need to choose a free or premium action. In the second case, you will be prompted to pay the money, if it has not already been done.

I choose "Short and long press". In the form that appears, select the "Recent_Apps" button from the drop-down list, and the action for it is "Back". I put the checkbox "Replaces the standard action", and the checkbox "Long press", on the contrary, I do not (after all, I need a reaction to the usual quick tap on the button). Everything, you can press "Ok".

When you tap on an active reassignment, a completely similar form for changing the action (reassignment) opens, supplemented with only one button - "Delete" - to delete the selected reassignment. With a long tap on the active reassignment, the context menu "Edit" and "Delete" is called.

The lists of buttons and actions are truly overwhelming. First, when you select, for example, a button, you see a list of seven buttons and the "Other" item. So, under this item there is a huge additional list, in which the buttons are represented by both the official names (used in the code by the developers) and numeric and alphabetic representations.

You can connect an adult external keyboard (if your gadget is able to do this) and reassign all its keys to your taste. The same applies to possible actions, although here everything is a little different: the initial list consists of a little more than 20 actions, and the additional one (hidden under the "Other ..." item) consists of only two lines ("Open application" and "Shortcut" ). As they say, the spool is small, but expensive: in these two points you can cram almost all the functionality of your gadget.

There is also a limitation: when the screen is locked, button presses by the softphone are not tracked. There are pros and cons here. The disadvantages include the impossibility of unlocking the screen with the selected button while simultaneously launching an application (Phone, for example). And the plus is that the softphone will not constantly consume battery power while monitoring the state of the buttons.

The cost of the software (the cost of unlocking premium features) is $ 0.99, that is, just under sixty rubles of ours.

After purchase, the "Show application icon" checkbox becomes available, which allows you to hide the application icon from the list of all applications installed in the system (and even from the list of recent applications). To return the icon, you must press the "Back" button ten times in a row (the system button, not the one assigned by the application).

And the most important thing, but not everyone needs, is the ability to use button combinations. This term hides three concepts: "Double click", "Triple click" and "Two buttons".

We are not interested in double and triple clicks, because they differ from fast and long clicks insignificantly. But the use of two buttons increases the number of all kinds of reassignments. I think this is already pampering, but the idea of ​​swapping "Back" and "Recent" may also seem wild to someone.

In addition, premium reassignments have one significant drawback - they do not replace system actions. That is, if I assign any action I need to a double tap on the volume up button, then the sound volume will first increase, and only then the action I specified will be performed. No, it is clear that double tap should not completely cancel the system action (otherwise how can the volume be adjusted?), But the developer needs to do something in this direction.

And one more thing: the action assigned to the simultaneous pressing of any two of the three touch buttons ("Home", "Back", "Recent applications") has never worked for me. Mechanical - no problem, sensory - no problem. Either there is something in the application, or in my phone.

As a result, I can and recommend using the softphone on your smartphones, especially if you need to change the functionality of short clicks to the buttons available on the gadget. The software works great here. If you, like me, wanted to swap "Back" and "Recents", then you don't even have to buy the softphone: the free option is enough for your eyes. If you wanted to make more than two reassignments, then you can already sponsor the developer. But the rest of the premium functionality is not even worth the money that is asked for it, IMHO.

That's all, good luck and health to you. Read Helpix.

How to remap Android hardware buttons (Using Android music player control as an example)

In modern times, mobile phones have been able to supplant not only cameras, but also portable music players. The only thing that remained inconvenient was the player control, as you have to take the smartphone out of your pocket, unlock it and switch the track. Of course, if you are using a headset, then this article may not interest you, but everyone else should read it.

So, today we will tell you how to remap the hardware buttons of an Android device to control the audio player, or perform other functions using the program.

Physical Button Music Control- this is a kind of module for the Xposed Framework application, with which you control the music player using the volume, power and camera buttons, if your smartphone has one. To use this manual and be able to control the hardware buttons for all players, your device must meet the following requirements:

  • OS: from Android 2.4 to 5.0 Lollipop;
  • ROOT rights: mandatory superuser rights, what are ROOT rights and how to get them;
  • having an installed environment Xposed Framework.

If your smartphone meets all of the above points, then you can download the program Physical Button Music Control from the official website of the developer or directly using the Xposed Installer.

So, what you need to do to control music using the hardware buttons of your smartphone:

1. Launch the Xposed Installer application and go to the Download section.

2. Using the search bar, find the module Physical Button Music Control.

3. Click on the name of the module. After which we will see a detailed description of it. We make a swipe and go to the next tab “Versions” and click on the “Download” button.

4. Go to the "Modules" section and activate Physical Button Music Control by checking the box next to the name.

5. Restart your smartphone.

After the smartphone is rebooted, you can turn on the Physical Button Music Control program. The icon that will appear on the desktop or in the menu of installed applications. By default, the program does not have any prepared templates with settings, so you yourself will have to perform a number of actions. Today we will show you how to switch music using the volume up button.

1. In the main menu of the application, click on the "Add mapping" button.

2. In the window that appears, which invites us to press the physical button that you want to program, you must press the volume up button and confirm your choice by pressing the "OK" button.

3. In the main menu of the application, you will see a new template named "VOLUME UP key". Click on it to perform detailed settings.

4. Select a trigger from the drop-down menu. Here you can choose both single and double or triple pressing, holding the button or the most different ways of combining these actions.

5. In the next list that appears, you must specify the action that will be performed after pressing the volume button. As we said earlier, this is switching to the next musical composition. We select "Next media".

By the way, in addition to controlling the music player, you can also configure the execution of some other actions. For example, making a quick call, launching a specific game or program, as well as opening the phone settings item. To do this, in the list of existing actions, select the "Other action" item, and then select one of the available actions.

After completing all the settings, do not forget to go to the application settings and determine the situation in which your action will be triggered. To do this, go to the "Capture Mode" section, where you can select one of the existing options:

  • Screen off- when the display is locked;
  • Screen off + lockscreen- screen off and lock screen;
  • Always- always, even on an unlocked device.



In addition, there is a section in the application settings called “ Trouble", In which you will find options to solve various problems.

In such a simple way using the application Physical Button Music Control you can effortlessly control your music player without taking your smartphone out of your jacket pocket, or reassign the buttons to perform other functions at your discretion. There is nothing complicated in the program, and such simple actions can make life easier for those who like to listen to music without performing unnecessary actions.

Another way to control the functions of an Android smartphone using a hardware button is to buy a Xiaomi MiKey button, which plugs into the 3.5mm headphone jack and can perform a wide variety of functions.

Top related articles