Remap power button - Xiaomi Mi MIX Questions & Answers

Does anyone know how to remap the power button? I want to remap power button single press to "back" function. Modifying key 116 value from "POWER" to "BACK" in /system/usr/keylayout/Generic.kl as well as several other layout files in that folder did not work. Phone ignores those changes after reboot, and uses default function of turning the screen on and off.
"Xposed Additions" Xposed module does have this capability, but this module doesnt work on Magisk version of MIUI Xposed... Any suggestions are welcome. TIA.
EDIT: Managed to install Xposed Additions - it doesn't have the option I'm looking for. It allows to assign very specific, limited number of functions to it, and BACK button isn't one of them.

i was able to remap the power button to answer phone call using xposed additions try it out, you need root + xposed though.

Re-read the 2nd paragraph of my question. It looks like you bluntly ignored it.

Related

Configure Press and Hold for other buttons

I am currently using Dutty's newest rom. For the PTT button I am able to define what happens when I hold the button.
I would like to add the ability to close the program when I hold the OK button (button 4). Is there a good way to add the (hold) option in the button settings for all buttons?
Thanks,
-Dan
For ALL buttons? Even the camera? Then what? How will you take pictures?
Have you searched? Someone wrote a program to do this, I read it yesterday. Try searching. I know you are new, but the search button will be yoru friend.
Well, I guess not all buttons. I just would like the option to configure two things for each button.
Through my search I found AE button. I tried that, but was unsuccessful to get it to work properly. I am attempting to remap the side OK button. Remapping the "OK" button only applies to the front OK button.
I think more of my issue is that I am trying to remap the side button, is that possible? I imagine many people would love to be able to close programs using this button.
I hate to be so wrong, so quickly.
My mistake, AE button is exactly what I was looking for it. I was remapping the wrong button. Although it isn't easy to use, I recommend it to all.
I would prefer a reg-tweek to add the option to the buttons dialog, but this will do.
http://forum.xda-developers.com/showthread.php?t=356322
This is the simplest and non 3rd party way to remap your buttons for long press. No need to install a program.

Menu Button Failing

So, if you were following my other thread (which I doubt anyone was since no-one offered help), I managed to fix my incredibly hard soft brick
Everything's running great now, except the menu key isn't functioning. This would be fine, except the 3dot menu xposed module is causing other problems when installed and I'm not running a CM ROM so I can't simply make it double press the home button for menu or anything like that.
So I actually need to get the menu button working, not find an alternative. I can't seem to find the number of the button tho. I know you can check with CWM but I don't have it and don't want to risk stuffing up my phone again right now because I will be relying on it pretty heavily for the next week or so. How can I remap the menu button so it can be used as the menu button if I don't know the hard key number? International S4 Active, thanks.
You can try here
http://forum.xda-developers.com/showthread.php?t=2534697. In the Aroma Installer, there's is a button fix of sorts, used on the i537 in safestrap, so we could use regular s4 roms, soomewhere else, don't remember where, the is the button .zip file, by itself.
Sent Via Smoke Signals
tiskael said:
So, if you were following my other thread (which I doubt anyone was since no-one offered help), I managed to fix my incredibly hard soft brick
Everything's running great now, except the menu key isn't functioning. This would be fine, except the 3dot menu xposed module is causing other problems when installed and I'm not running a CM ROM so I can't simply make it double press the home button for menu or anything like that.
So I actually need to get the menu button working, not find an alternative. I can't seem to find the number of the button tho. I know you can check with CWM but I don't have it and don't want to risk stuffing up my phone again right now because I will be relying on it pretty heavily for the next week or so. How can I remap the menu button so it can be used as the menu button if I don't know the hard key number? International S4 Active, thanks.
Click to expand...
Click to collapse
You should be able to flash the keys fix in the MasterPatch that @captaincado posted above. For the actual key numbers see below.
Code:
key 115 VOLUME_UP
key 114 VOLUME_DOWN
key 172 HOME
key 139 MENU
key 158 BACK
Good luck.
Just an update, I followed all the instructions, couldn't get this working. It's possible that the button just happened to physically break when I flashed the ROM but it doesn't matter, because I found All in one Gestures (link below) which I used to replace the menu button... and then every other button, plus some. It's really good, I recommend it to anyone who has trouble reaching certain button, has a broken button or would just wants to have a go at increasing speed:
https://play.google.com/store/apps/details?id=com.phoenixstudios.aiogestures&hl=en

anyone interested or know how to change task manager hardkey to menu key

Miss having the menu key..example go to xda app and cannot pull up other options because of this ridficulous hardkey when alternatives exist for task switching. This will need remapping..have seen it done for camera and power but wondered if there is any interest in this. I do I not have a solution but am asking. Thanks.
All you have to do is long press that button and becomes menu
EVOme said:
All you have to do is long press that button and becomes menu
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=56214304&postcount=14
remapped it in case anyone is interested
think long press goes to S finder
Good work, but long press is menu, I use it all the time.
--drl
I used xposed additions module to remap it. Also mapped the volume keys, home and power buttons to change music, play/pause and activate torch respectively while I was at it.

[Q] Long Press Back Button

I haven't seen a few options I am used to having and wonder if any knows how or if this can be added to moto x? The long press back button killing the app youre in. And the volume buttons controlling the cursor when typing.
Normally I can find it somewhere in settings, but no such luck. Thanks for the help!
Xposed + Gravity Box will allow you to do all that and more. Hopefully, you got your root situation figured out because you're going to need root to use both.

[MOD] [ZIPs] Button remaps for the L90

Hi fellow users,
My D415 died awhile ago so therefore I cannot make nor test any new zips. I can add any of your zips to this thread as long as you PM me the zip and another user can verify that your zip works. Have fun and be safe!
I made some zips to remap the button layouts on the LG L90 to replace the menu with recents, and to remap the button above the volume keys to a play/pause media or camera. With these zips, you do not need to remap the keylayout files yourself, reboot, or mess something up. I've used these for myself when flashing a new rom, and the zips are in attachments.
Use these zips at your own risk. I am not responsible for anything you do(or don't do). If there is an issue, please tell me so I can try to help you.
NOTE: This has only been tested on the D415 and the D405n(thanks to @razoract) with Temasek's rom so it should work with any custom LP and MM (confirmed by @brossovitch with CM 13) rom, and probably won't work for the D410.
DO NOT USE WITH KITKAT ROMS OR STOCK. AFAIK THEY DO NOT WORK
Have custom recovery and unlocked bootloader...
Instructions:​ ​1. Go into your custom recovery [CWM or TWRP]
2. Flash zip of your choice [download default zip just in case of failure]. Make sure signature verification is disabled. Zips found below...
3.???
4. Profit
D410, KitKat, and/or other users, If you PM me what button corresponds to button number(through CWM button test and I don't know what else unfortunately), I can make a set of zips for you.
Descriptions:
Note: There is no need to use the Modified zips to use recents button on SlimLP based roms because there are settings to change the Menu button to recents and flashing the Modified zips will disable long press and double tap options​
Default: Use this to revert to default keylayout [no play/pause, camera button, nor recents remap]
​
​ Modified: Remaps the Menu button to Recents and adds the play/pause button
Modified camera: Same as Modified but with camera button​ ​
Modified Samsung Style: Remaps Menu to Back and Back to Recents with play/pause button, like most current Samsung devices​
Modified Samsung Style Camera: Same as Modified Samsung Style but with camera button
​
Play/Pause: Simply adds Play/Pause button to rom [no recents remap]
Camera: Simply adds Camera button to rom [no recents remap]
Super: Maps the Quick button to Recents
Duper: Maps the Quick button to Menu and the Menu button to Recents
Brightness: Maps the Quick button to turn brightness up
Brightness Modified: Maps the Quick button to turn brightness up and the Menu button to Recents
Brightness Samsung: Maps the Quick button to turn brightness up and the Menu to Back, and the Back to Recents
Power App Switch: "Quick Button (top left button) to Power (lock, unlock and turn off) and the Power Button (right button) to App Switch (shows the running apps)". Thanks to @937foy
...​
..Reserved..
Attention D410 Users
I need you guys to test this zip and see what it does (The MODIFIED-D410.zip)
I remapped the menu button to recent button, and I think I remapped the SIM button to Search and made the Home button to wake up the screen.
There shouldnt be any danger to your device, but if it doesnt work flash the DEFAULT-D410.zip and all should be fine.
Also, if this turns out to work, I'm sure that I can make a set of universal zips
Happy Flashing!
I'm sure that 99% of you have experienced the pure agony of stepping outside and your brightness is waaay too low and you fumble to turn the brightness back up [Aaaaah], but you can't see a darn thing [noooooooo!].
I have remapped the Quick Button to turn brightness up so that this doesn't happen as melodramatically as I described it. Just press the button and the brightness goes up quickly
Tested on my D415 and it should work for the D405(N) [Sorry D410 users]
Same bat instructions, same bat warnings
How would I accces the in app menus if I flash the"Modified: Remaps the Menu button to Recents and adds the play/pause button" zip, besides for using the nav bar?
mosimchah said:
How would I accces the in app menus if I flash the"Modified: Remaps the Menu button to Recents and adds the play/pause button" zip, besides for using the nav bar?
Click to expand...
Click to collapse
Most app menus are found in the top right corner and its also the menu button is defunct in material design guidelines, and a lot of phones don't even come with a menu button If you are running UberSlim or SlimLP you don't need to flash the modified because you can just remap the button in settings. So the only way to enable the menu button is with the nav bar or choose a different zip.
Sent from my LG-D415 using XDA Forums
ardentis said:
Most app menus are found in the top right corner and its also the menu button is defunct in material design guidelines, and a lot of phones don't even come with a menu button If you are running UberSlim or SlimLP you don't need to flash the modified because you can just remap the button in settings. So the only way to enable the menu button is with the nav bar or choose a different zip.
Sent from my LG-D415 using XDA Forums
Click to expand...
Click to collapse
Yeah, I know about the settings in uberslim, but I am considering switching ROM's again because of all of the random reboots. So which zip would turn the menu button into the recent key and still allow me to access hidden or non hidden menus. Or is Xposed the only viable option besides for the nav bar? Also, some apps hide the menu if they detect that the device has a menu key, so in that case either the nav bar has to be present (I know that it could be hidden) or one has to use the menu key. Personally I find that sometimes it is easier to just press the menu key rather than fish for the settings button.
Here I got an idea, thanks to @mosimchah
I just made these zips.
The Super zip remaps the Quick button to Recents and keeps the Menu button
The Duper zip remaps the Quick button to Menu and maps the Menu button to Recents
You should know what to do now..
Hi all,
I plan to make more zips (and/or improving my current ones) but I still need your help with testing the D410 zips as I have not received any input what-so-ever..
Anyways I have a new set of keymappings for you to test out. Below I have included zip mods for Stock Lollipop for the D415 (thanks to @lerner17 for providing the default.kl from Stock Lollipop) . It likely works for the D405 and probably doesn't work on the D410.
These zips are only for Stock Lollipop. Flashing these zips on Stock KitKat or any other rom will make buttons inoperable. If you have any doubts, copy your generic.kl found in /system/usr/keylayout/ and make sure your file manager has root access and is accessible without pressing any button (place it on a home screen). If buttons are inoperable, replace the generic.kl with the one you backed up.
The Stock.zip has the default keylayout and will undo the Stockified layout.
The Stockified.zip should remap the quick button to play/pause media and the Menu button to Recents.
Again, have custom recovery (CWM or TWRP) and flash zips. I assume no responsibility for whatever you do to your device or whatever you don't do to your device.
And as always, I'm open to input (and criticism) and welcome it
@ardentis
Thank you for this. The button remap flash is so convenient and easy. Works on all custom ROMs that I've tried. (CM12.1, CM13, Orion-LP) So amazing. Thank you!
Side note. The button allows pictures to be taken, but hold for video video.
Hey can you make a .zip that can work with google on tap in cm13 but have the same effect that the duper zip does? Also how do I uninstall this
yasiro500 said:
Hey can you make a .zip that can work with google on tap in cm13 but have the same effect that the duper zip does? Also how do I uninstall this
Click to expand...
Click to collapse
I can try making an on tap zip but no promises. You can uninstall a zip with another zip but if you want the default keymap flash default.zip
Now on tap can't be activated by a key command so I cant make a zip for it. :/
The button mod no longer opens camera on SlimROM (6.0.1). It does toggle shutter while camera is open.
Still great work man.
Sent from my SM-T230NU using XDA-Developers mobile app
brossovitch said:
The button mod no longer opens camera on SlimROM (6.0.1). It does toggle shutter while camera is open.
Still great work man.
Sent from my SM-T230NU using XDA-Developers mobile app
Click to expand...
Click to collapse
Hmm weird. It might be some sort of code change so I dont think I can help unless you can give me the default.kl. Isnt there an option to remap the button to open the camera in SlimRom? Or is it just CM13 ?
Hi !
Thank you for this buttons remap ! Now is more confortable use CM13 bith the recent apps in the menu button, and Google Now on Tap on the home.
Great job !
Enviado desde mi LG-D405n mediante Tapatalk
ardentis said:
Hmm weird. It might be some sort of code change so I dont think I can help unless you can give me the default.kl. Isnt there an option to remap the button to open the camera in SlimRom? Or is it just CM13 ?
Click to expand...
Click to collapse
Actually, neither have that option. Hence why I use your zips. It's not a big deal. There's the double tap power button to open camera. Works fine. One of my L90s has a jammed/broken quick button anyhow. So I use the power button option on it instead.
Thank you for the great work, BTW.
Sent from my LG-D415 using XDA-Developers mobile app
I have remapped the Quick Button (top left button) to Power (lock, unlock and turn off) and the Power Button (right button) to App Switch (shows the running apps).
Tested using aosp-6.0.1-20160519-w7 on LGD415d52789b.
Code:
key 102 HOME
key 116 APP_SWITCH
key 250 POWER
Ill email the file to @ardentis
937foy said:
I have remapped the Quick Button (top left button) to Power (lock, unlock and turn off) and the Power Button (right button) to App Switch (shows the running apps).
Tested using aosp-6.0.1-20160519-w7 on LGD415d52789b.
Code:
key 102 HOME
key 116 APP_SWITCH
key 250 POWER
Ill email the file to @ardentis
Click to expand...
Click to collapse
Its up
thanks a lot
i want to give you thanks, i was seaching something else because some xposed apps doesnt works. thank you by this job.
I flashed the Modified zip for the d410 but the home button doesnt' work, it shows the recent apps.
The buttons work like this: Back Button/Back - Home Button/Recent Apps - Menu Button/Search - Sim Button/Nothing.

Categories

Resources