Swap back and menu buttons on PixelExperience 10.0 - Xiaomi Mi 6 Questions & Answers

Hi,
I installed pixel experience and I'm pulling my hair out trying to swap my back button to the left where it belongs. I swapping keys 139 and 158 in generic.kl and qwerty.kl and rebooting but android seems to simply ignore those changes. Any ideas how I can swap them?

Related

Remap home key to power key

I am running the latest cm10 nightly with soft navbar enabled, I have disabled both soft keys but want to remap home key function to make and put the phone to sleep, just to make life simpler? I have already tried to edit the .kl files with no luck anyone ever been successful doing this? Any help greatly appreciated
Is this of any use ?

Remapping power button

I've got an issue with my power button that causes the power button to be super sensitive and occasionally get stuck so that the phone constantly reboots. I want to remap the power function to my volume up button to keep this from happening. I've done some research and everything I've seen tells me to edit open /system/usr/keylayout/gpio-keys.kl but this file does not exist on my phone. I'm running Paranoid Android with android 4.2.2.
In the /system/usr/keylayout folder I have these files instead.
Code:
AVRCP.kp
cyttsp-i2c.kl
fsa9485.kl
Generic.kl
keypad_8960.kl
msm8960-snd-card_Button_Jack.kl
qwerty.kl
sec_key.kl
sec_keys.kl
sec_powerkey.kl
sec_touchkey.kl
sii9234_rcp.kl
and a bunch of kl files that are named Vendor_045e_Product_(somenumber).kl
Which file do I need to edit to fix this problem? Any help is much appreciated, my phone is almost unusable in its current state.
Drisc0 said:
I've got an issue with my power button that causes the power button to be super sensitive and occasionally get stuck so that the phone constantly reboots. I want to remap the power function to my volume up button to keep this from happening. I've done some research and everything I've seen tells me to edit open /system/usr/keylayout/gpio-keys.kl but this file does not exist on my phone. I'm running Paranoid Android with android 4.2.2.
In the /system/usr/keylayout folder I have these files instead.
Code:
AVRCP.kp
cyttsp-i2c.kl
fsa9485.kl
Generic.kl
keypad_8960.kl
msm8960-snd-card_Button_Jack.kl
qwerty.kl
sec_key.kl
sec_keys.kl
sec_powerkey.kl
sec_touchkey.kl
sii9234_rcp.kl
and a bunch of kl files that are named Vendor_045e_Product_(somenumber).kl
Which file do I need to edit to fix this problem? Any help is much appreciated, my phone is almost unusable in its current state.
Click to expand...
Click to collapse
From memory it's sec-keys.kl. Might be sec-key.kl though, one or the other is what I used to edit back when CM didn't have disable wake from home key.

[Guide/Mod] Disable Power Button in Jellybean 4.1.2

Disable Power Button Mod
The flashable mod will ONLY work on the E4GT JB 4.1.2 build please do not use this mod on any other build or phone.
Due to the high failure rate of the power button on our older phones, this is a hardware key mod that will disable the power button on our E4GT phones in JB. This only cuts back on the random power button presses of a failing button while the JB rom is booted. I don't think it disables the long press of the power button to do a soft reset as this is not a ROM feature but a hardware feature built into the phone.
Flash this mod in recovery mode.
Please make certain you have a current backup already saved to your phone.
I will not be responsible if your rom does not boot or has any other issues.
___________________________
Brief guide:
For our builds this is a simple edit of two files.
system/usr/keylayout/Generic.kl
system/usr/keylayout/gpio-keys.kl
Place a comment code (#) in front of any line that is still active with the keyword POWER
Example gpio-keys.kl edit
Before:
Code:
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE
[COLOR="Blue"]key 116 POWER WAKE[/COLOR]
key 172 HOME WAKE
After:
Code:
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE
[COLOR="Red"]# key 116 POWER WAKE[/COLOR]
key 172 HOME WAKE
Note: This principle should work on other phones & builds but your key files may be slightly different. If you successfully edit your phone & build, please share your experience here with others.

Enable on-screen buttons

As I don't like the default button layout, I enabled the on-screen buttons and disabled the hardware buttons.
In case someone wants to do that, too, I thought I just post the instructions here:
1) Enable on-screen buttons
Edit the file /system/build.prop and add the following line:
qemu.hw.mainkeys=0
2) Disable hardware buttons
Edit the file /system/usr/keylayout/ft5x06.kl and comment out the following lines:
#key 139 MENU VIRTUAL
#key 102 HOME VIRTUAL
#key 158 BACK VIRTUAL
#key 217 SEARCH VIRTUAL
3) Reboot
Tested with CM11. Not sure if this would work on MIUI.
Thanks @chris5s and several other forum users. I know that there are a couple of similar posts for other phones. But I still hope this is helpful so that Redmi 1S users don't have to look in another place.

How to swap the BACK & MENU button

Device: Xiaomi Redmi3
I have tried to edit the qwerty.kl file in /system/usr/keylayout, swap the two strings BACK and MENU and then restart, but it doesn't work.
PS: not virtual bottons

Categories

Resources