Working on a Stock A12 Motorola ROM with Magisk 25. Installed through local storage magisk module section.
No need to install Button Mapper, Tasker, or any other asstant remapper unless you want some extended functionality or to verify what your button is being interpreted as.
So, this is basically Suyooo's Module but I included more information depending on what you want the button to function as.
The zip file contains a module that is set to replace the assistant button with a play/pause button.
If you look at the android KeyEvents list, you can find all sorts of functions you could replace the button with.
To edit the functionality, open a text editor like Notepad++ and go to:
Code:
\system\usr\keylayout\gpio-keys.kl
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
For the Moto G100, the 217 key is assigned to the ASSIST command, but has been changed by me to the MEDIA_PLAY_PAUSE command.
If you are copying from the Android KeyEvents list from earlier, make sure to remove the "KEYCODE_" portion from the command.
Once you are done, just drag onto your device and install via the Magisk Module section.
How could I set it to turn the flashlight on and off? or else to turn do not disturb mode on or off? (sorry for my bad english, I still don't know it well)
If I look at the contents of gpio-keys.kl, I see six key lines.
Apparently key 127 is what is now mapped as the horrible assistent key.
If that is the only one I want to remap, what are the other five lines doing?
Where on my phone are key 102, 528 and 766? I only see four keys (volume up, volume down, power, assistant).
gewe said:
If I look at the contents of gpio-keys.kl, I see six key lines.
Apparently key 127 is what is now mapped as the horrible assistent key.
If that is the only one I want to remap, what are the other five lines doing?
Where on my phone are key 102, 528 and 766? I only see four keys (volume up, volume down, power, assistant).
Click to expand...
Click to collapse
Vol +- are the volume keys, focus and camera are usually buttons that are on wired/wireless headsets, along with play/pause. The phone really only has 4 physical buttons, but allows for these inputs so I made sure to map them manually. If you want to remove the other button codes you can it should still work.
Related
greetings all... i wanted to remap my Voice Command button to another activity, however, the Voice Cmd, OK and Camera buttons do not appear in the list of button options:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
i know it was there before because i mapped it to DeviceLock. i've already tried 2 soft resets with no success. i'm hopeful that i can fix this with a simple registry change vs. a hard-reset. if this can fixed via registry edit, i would be grateful if someone could (a) export the the correct registry keys and send them to me via PM (or post here) OR (b) post where to find the keys in the registry and list the default settings... thanks in advance for feedback.
I bet it has something to do with some software you installed. I have kaiser and remapped voice dial button to comm manager and it works without any problem.
not in this case... i installed smartSS to take the picture you see in my post. thanks for the suggestion, though.
Interesting, my config screen shows butons 1-6 plus a second number 6 button (hold), total of 7 mappable keys. Have you never had all these keys shown in this config screen? or did something you add take them away? I would perform a Hard Reset and see if the stock rom brings them back. Good Luck!
cortezzi said:
not in this case... i installed smartSS to take the picture you see in my post. thanks for the suggestion, though.
Click to expand...
Click to collapse
sorry for that, I already changed my post, I just thought (although not knowing what smartSS is) that it is the software that reserves the use of button mappings and therefore disables them in the windows settings menu.
RemE said:
Interesting, my config screen shows butons 1-6 plus a second number 6 button (hold), total of 7 mappable keys. Have you never had all these keys shown in this config screen? or did something you add take them away? I would perform a Hard Reset and see if the stock rom brings them back. Good Luck!
Click to expand...
Click to collapse
the buttons just didn't show up when i went to change them. i'm going to hold out for a possible non-hard reset option. for now, i'll use AE Button Plus. thanks for responding...
I have following Problem:
I would like to change the Hardwarebuttons of my Leo but in the "Keys" screen there are none -.-
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Also I have the Problem that it I cannot turn off the Windows Lock completely. I managed it to disable it when the device wakes up, but the lock activates when I turn off my phne with my HangOn button
you can use AEbutton plus
is working like a charm in leo
http://ae.inc.ru/aebplus.php
I wouldn't call it a bug. The buttons on the HD2 are already assigned to specific tasks already.
They wouldn't really want anyone assigning them to anything else. It's not like there are spare buttons (like on the X1) that aren't already assigned to specific functions.
So, like I said, not exactly worth calling a bug.
I cannot override the the hangOn button so the problem with the Windows Mobile Lock stays....
I've posted a reg for the send key in the hints and tips thread first page
no go
Looks like Aebutton and the reg key breaks existing button assignment.
I just installed AEBUttonPlus [because I had used it before on my HD - and I HATE not being able to scroll up/down a list of items WITHOUT triggering/opening one (EG spam email) ] - Stupid Windows/HTC AGAIN!
So I was trying to setup the HD2 the same way as I had it on my HD - that is;
'volume up HARDWARE button' has TWO functions = *one press = scroll up* : *Long press = Volume up* (same design for down of course)
But....I think I've possibly become less intelligent over the past year or something because I cant figure out how to do it in AEButtonPlus (and the website isn't much help) The prog itself isn't very intuitive, that much I do recall, but somehow I did manage it last year, to sort the HD - but can't replicate it now
If anyone knows what I mean and can help I'd be very much obliged - thanks!
I recently bought a Nokia BH-503 Bluetooth headset, and it has 4 buttons, 3 for media, that work flawlessly, and a Call button. Here's an image:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Since the Xoom doesn't have phone functions, this button is unusable for me, so I thought about remapping it, but couldn't find any app that could do it. Most apps would work with headsets with 3 buttons.
If possible, I want to remap it for voice commands/action, I'm not sure what is supported on the Xoom (I had some problems with one of my tests, saying Voice Commands are unsupported), so, anything that I could touch the button, speak a function, and receive it by sound.
I searched and couldn't find, in fact, when searching for headsets and Android, usually I would find that calls works, and media not.
Xoom Wifi - Stock ICS 4.0.3 - Rooted
//////////////////////////////////////////////////
My tries [None worked]
//////////////////////////////////////////////////
I tried Headset Button ControllerTrial, but not only the Debug mode didn't work, there were no options related to a "fourth button".
I also tried Button Remapper, and it found the buttons, but...
It shows me the buttons (If I disconnect the headset, it crashes, so I believe they are all from it) (I don't know shy it won't show the 3 hardware buttons...), but there are buttons that just don't exist.
I tried changing the only button not directly specified on the phone controls, the Stop button, to Search, but nothing changed and the buttons are doing the exact same thing.
Thoughts
I have started researching this subject but have made little progress.
I believe how the remapping software you are using just modifies the Keyboard layout files in order to remap the functions (just an assumption). I tried doing this myself and it failed.
I think the reason is because bluetooth commands are handled separately from the keylayout mapping. It is built into the android system itself so it needs a custom program to intercept the command and set another function.
For reference, I would suggest you read this: stackoverflow.()com/questions/6287116/android-registering-a-headset-button-click-with-broadcastreceiver
The only solution I can come up with is writing a custom app. It is doable, but will take some time.
Hi
I have a Nexus 5 and recently my power button started behaving all weird. I figured out that it's probably worn out and started registering presses at random times, sometimes rebooting the phone.
My solution was to use the double tap to wake kernel, but on lollipop it seems to drain a LOT of battery.
The next thing I thought of, was remapping the buttons, so that I can switch the function and use my volume down key as a power button, and the power button as a volume down button.
Went into system/usr/keylayout/ and edited the General.kl and replaced the 114 and 116 button codes, but it didn't seem to have any effect. Then I went into the other files and managed to get the volume down and power button not to work I did a restore, and everything is back to normal, but I couldn't achieve my goal
Also tried Button Remapper, but it didn't do anything.
Does anyone know how this can be achieved on Lollipop?
Thanks
Some ROM provide a volume rocker wake function.
Or if you're talking about to turn the phone on while its completely shut off or while in bootloader, then it'll never happen.
Lethargy said:
Some ROM provide a volume rocker wake function.
Or if you're talking about to turn the phone on while its completely shut off or while in bootloader, then it'll never happen.
Click to expand...
Click to collapse
OK about the Volume rocker wake, but I would need it to also put the phone to sleep, and also I want the power button to act as volume up/down(whatever).
Don't need it when the phone is completely off, just while it's on. Basically I'm asking which values to edit in order to completely swap the power and volume down buttons.
You need cataclysm rom... See the red arrows I drew on -
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sent from my Android 5.0 Nexus 5
Hey thanks for the solutions suggested, but I'm looking for a mod on stock Lollipop, rooted. Tried to modify the files in system/usr/keylayout but I always end up breaking the volume buttons and they do not wake up the device...Any other solutions?
NikolaMK said:
Hey thanks for the solutions suggested, but I'm looking for a mod on stock Lollipop, rooted. Tried to modify the files in system/usr/keylayout but I always end up breaking the volume buttons and they do not wake up the device...Any other solutions?
Click to expand...
Click to collapse
have you found a solution ?
Yes, CM12
Didn't find a way to do it on stock, manually, unfortunately
Hello,
I have a small problem. My phone power button is damaged therfore pressing it is hard (works but poorly).
I need now to re-mail the power button so i can turn off screen when i need.
Can you recommend app that can do that.
I did get app named as volume powr but it seems buggy and app named buttons re-mapper seems to be also buggy.
Use Nova Launcher. It is the best Launcher out there (even better than the stock ones) and you can turn off screen by a gesture of your choice (e.g. double tap on homescreen).
Cocliosttro said:
Hello,
I have a small problem. My phone power button is damaged therfore pressing it is hard (works but poorly).
I need now to re-mail the power button so i can turn off screen when i need.
Can you recommend app that can do that.
I did get app named as volume powr but it seems buggy and app named buttons re-mapper seems to be also buggy.
Click to expand...
Click to collapse
Some ROMs allow eg double tap on the status bar to switch off. BatMan/SuperMan do that.
Button Mapper does exactly what you need - like you I had some issues with it, related to its occasionally not working. This was due to it being dozed by the OS (need to stop it being optimised) and by Greenify (again, exclude it). There is a Button Mapper thread in Apps & Games here in XDA, check it out. You'll get a lot of support there, the dev visits regularly.
What is your Android version and number?
In system info (in phone) shows Android 7.0
Cocliosttro said:
In system info (in phone) shows Android 7.0
Click to expand...
Click to collapse
And check please ( Build Number)
Check this Mod
For me i like it sooo much.... I downloaded from 4pda
Make clock in status bar in the middle and have also power off when you press on the right side( long press open menu for: shutdown or restart or safe mode)
But make sure your Android version and build Number the same!!
Just download and install the file and make restart
PS: any promises I'm not responsible about it
And this is the link for the mod
http://www14.zippyshare.com/v/9mhmLnvA/file.html
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Is this for nougat 7.0 for any build number? Thanks
fahric74 said:
Is this for nougat 7.0 for any build number? Thanks
Click to expand...
Click to collapse
It's for Android 7
And should be the same build Number!
If not same build Number you will face very big problem