[Guide] Disable hard navigation keys (not onscreen buttons) - Xiaomi Redmi 1S

I have seen a bunch of posts regarding the capacitive buttons and on screen navigation buttons. Love them or hate them, this is how you can turn them off.
I will leave that up to you on how to get onscreen Navy buttons.
As for turning off the capacitive buttons this is how I did it.
1.To eneble onscreen buttons follow this thread http://forum.xda-developers.com/redmi-1s/themes-apps/how-to-onscreen-buttons-redmi-1s-t2950455
2. Download a root file explorer. Root Browser Lite --> http://goo.gl/b9ISW This is what I will use.
3.Load up Root Browser and navigate to system>usr>keylayout. We will be looking for a file called "ft5x06.kl".
4. Select it and hit "Open as..." then "Text file" then "RB Text Editor"
5. Now we see this:
key 139VIRTUAL
key 158 VIRTUAL
key 102 HOME
key 217 SEARCH
All you have to do is option out the keys you don't want to work with a #. So if you are like me and think the home button is fine, it will look like this.
#key 139VIRTUAL
#key 158 VIRTUAL
key 102 HOME
key 217 SEARCH
6. When you have the ones you want optioned out just tap the little disk icon in the top right. It will ask for root rights, grant it, saved.
7. Now just reboot and DONE!
Tested on
1. Redmi 1s(miui, Validus, Pa, mokee,cm11 ROMs)
Sent from my HM 1S using Tapatalk
Hit thanks if this post helped you[emoji106]

Nice guide, works with CM11 too, only the file for editing is different:
/system/usr/keylayout/ft5x06.kl
Don't remember to backup the original file before editing!

philip_petev said:
Nice guide, works with CM11 too, only the file for editing is different:
/system/usr/keylayout/ft5x06.kl
Don't remember to backup the original file before editing!
Click to expand...
Click to collapse
Thanks bro OP updated....:thumbup:
Sent from my HM 1S using Tapatalk

Thanks
It worked awesome on Mokee ROM history version

thanks for useful tips. its a pain operating non backlit capacitive button

Related

[Q] [HELP]problem on my xplay multifunctional key stock/not working

hi,im new here,i just wanna seek some help regarding to my xplay multifunctional key button(the third key beside home button.)its always stock when i wanna use that key.sometimes working and sometimes most of the time not functioning.you need to push it a lot of times until it works again.any idea why its happening in xplays or only just for me?thank for any help
I think you mean the Menu key. Perhaps its broken. If you have root, you can edit the file "/system/usr/keylayout/keypad-zeus.kl" to change the function of each physical buttons. You could for example remap the Search button to Menu.
eksasol said:
I think you mean the Menu key. Perhaps its broken. If you have root, you can edit the file "/system/usr/keylayout/keypad-zeus.kl" to change the function of each physical buttons. You could for example remap the Search button to Menu.
Click to expand...
Click to collapse
thanks buddy i have a root but problem is i dont know how to remap each button.im noob and only basic knowledge iknow regarding that.can you help me how to do that step by step.i check system/usr/keylayout/keypad-zeus.kl using es file xplorer.i dont know what to type and to do.a big help from you is much appreciated.
please i need help.now my home bu
tton stuck also when i try to tap on it.but when my play are open i mean the gamepad is visible,the home button works fine and the menu button also working.is this some kind of hardware issues/malfunction?please any help would be appreciate
Sent from my R800i using Tapatalk 2
By malfunctioning you mean your buttons are broken then yes. Of you want to avoid this issue in the future, buy a Nexus.
Enable root permission for ES File Explorer, copy the file to your sdcard, tap and hold on the file and choose Open As -> Text -> Es text editor. Edit the file to remap the button to how you like it. Copy it back to its original location. Tap and hold on the file again and choose Permission. Set the permission to rw-r-r.
Also if you know how to install custom roms, with Slim Bean rom you can enable onscreen button.
Sent from XDA app
eksasol said:
By malfunctioning you mean your buttons are broken then yes. Of you want to avoid this issue in the future, buy a Nexus.
Enable root permission for ES File Explorer, copy the file to your sdcard, tap and hold on the file and choose Open As -> Text -> Es text editor. Edit the file to remap the button to how you like it. Copy it back to its original location. Tap and hold on the file again and choose Permission. Set the permission to rw-r-r.
Also if you know how to install custom roms, with Slim Bean rom you can enable onscreen button.
Sent from XDA app
Click to expand...
Click to collapse
I DO WHAT YOU TUTORIAL.but it seems its the same thing happened.still doesnt workwhen you slide up the play i mean gaming buttons are visible,the home button is working even i used it for CWM.but also the search menu.but when i close the lid,agin it doesnt work.

[Q] home key wake up

After installing sphinx rom v2 on my e988 i can't wake up my screen by pressing home button any one know how to enable it again ?
mhd.abbas.94 said:
After installing sphinx rom v2 on my e988 i can't wake up my screen by pressing home button any one know how to enable it again ?
Click to expand...
Click to collapse
This will only work if the option was removed from the keylayout, so let's see if the option is there or not:
Use a root file manager and go to System/usr/keylayout
Edit the file "gk-kaypad-8064.kl" (how you edit the file depends on the file manager you are using, so I can't give you exact steps as to how to do this)
You should see stuff like:
key 114 volume_down
key 115 volume_up
etc
look at key 172:
If it was disabled from waking the phone, it will say:
key 172 HOME
If it has the option to wake the phone it should say:
key 172 HOME WAKE
-If it's like this already, then I can't help you further because the button is already set to wake the phone, so something else in the rom is preventing it from working.
-If it isn't already like this, then just add the WAKE (in all caps) part to it after a space and save the file. Make sure the permissions are still 644 (rw-r--r--) after saving. Reboot. Test and hopefully it should work. Again, if not, I can't help you any more because something else is preventing it from working.
BTW, I don't use Sphinx, but I actually hate the Home button waking my phone, so I always disable it after rooting. So I basically just remove the WAKE part.
spexwood said:
This will only work if the option was removed from the keylayout, so let's see if the option is there or not:
Use a root file manager and go to System/usr/keylayout
Edit the file "gk-kaypad-8064.kl" (how you edit the file depends on the file manager you are using, so I can't give you exact steps as to how to do this)
You should see stuff like:
key 114 volume_down
key 115 volume_up
etc
look at key 172:
If it was disabled from waking the phone, it will say:
key 172 HOME
If it has the option to wake the phone it should say:
key 172 HOME WAKE
-If it's like this already, then I can't help you further because the button is already set to wake the phone, so something else in the rom is preventing it from working.
-If it isn't already like this, then just add the WAKE (in all caps) part to it after a space and save the file. Make sure the permissions are still 644 (rw-r--r--) after saving. Reboot. Test and hopefully it should work. Again, if not, I can't help you any more because something else is preventing it from working.
BTW, I don't use Sphinx, but I actually hate the Home button waking my phone, so I always disable it after rooting. So I basically just remove the WAKE part.
Click to expand...
Click to collapse
Thanks a lot man
Does someone has another solution?
i got the same problem but in my file allready was written "WAKE".

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][ROOT] Edit/Swap hardware keys on OOS double tap and long press too.

Hi all, i've jumped from OOS to CM12.1 and CM13 (and cm13 based roms) for some time, but today i wanted to give another shot to OOS 2.2.0 (and wanted to try boeffla's kernel as CM isn't official yet).
And i remembered why i could not stay on OOS after a few seconds... i really hate the hardware keys setup (recents-home-back).
I'm used to have Menu-Home-Back (and recents access from long press home, or press home from nova launcher).
I've been reading and then learning many things in the past few weeks, so i though i should try to edit those keys just like we did on CM, even if before switching to CM i've looked around and didn't find anything working to change these.
So, here it is.
What you need:
Rooted phone and file manager with root access (there are many but i love FX file explorer, and the root add-on is free).
You need to go to /system/usr/keylayout
Then make a backup of the Generic.kl file (to make it easier i make an archive of it by long press on the file, then archive, but a simple copy and paste will do).
After that, don't forget to unlock the system partition if needed (tap the little lock and accept to open it on fx file explorer).
Open Generic.kl with file editor.
What you need to know is that left key is key number 139, middle one is number 172 and right one is 158.
Functions that can be affected are: MENU HOME BACK APP_SWITCH VOICE_ASSIST.
But for some obscure reason, MENU acts like APP_SWITCH in oxygen OS, so the trick is to replace MENU with MENU VIRTUAL (this will emulate Menu button from on screen navbar, but you don't need to activate the navbar).
So, if you want for example this layout: Menu-Home-Back
You'll need to edit the Generic.kl and replace the Line
key 139 MENU
with
key 139 MENU VIRTUAL
(key 158 BACK and key 172 HOME don't need to change).
Another interesting point is that if you use xposed installer and Gravity Box LP, you can assign different functions to double press or long press on buttons, but it's working only with on screen navbar buttons... you see where i'm trying to get ?
If you modify the generic.kl file and replace MENU with MENU VIRTUAL and BACK with BACK VIRTUAL... then you'll be able to add custom actions with Gravity Box... like the one I really miss, hold back to kill.
I didn't try to replace HOME with HOME VIRTUAL as i can configure long press and double tap home from oxygen OS, but it may work exactly the same if you want something special from Gravity box.
For exemple, my setup is like that:
Menu-home-back
Menu long press => Switch last app
Home long press => Recent apps
Back long press => Kill foreground app
Double Tap Menu => Google Now
Double Tap Home => Screen off
Double Tap Back => Nothing
To sum up, on the phone, keys are:
key 139 - key 172 - key 158
You can affect different general functions to these, like:
MENU
HOME
BACK
APP_SWITCH
VOICE_ASSIST
and maybe more
You can add VIRTUAL behind the function to emulate the on screen navbar buttons (and it seems required for the menu, as it still calls the recent apps in OOS), and then you can add double tap or long press functions with gravity box.
You don't need to enable the navbar to get them working.
I don't know if i've been clear enough, as i'm not used to this kind of things (i wonder if that's not my first thread on XDA...), but i just hope this will be useful to some of you,
have a great day.
[Edit: Forgot to mention you need to reboot the device when it's done]
Great thread. Will test
Got a bit of an issue... I just experimented with this and it was providing very odd results. So, I copied the backup generic file back to the location... restarted the phone. Now, no buttons do anything. There's no way for me to get home so a restart is the only option I have by forcefully turning off the phone. I'm not sure what to do, the file looks absolutely fine. Any help please? I don't know what to do... I don't want to reflash the rom..
If you restored the original file, at the original place, I don't know why this would not get you back...
Did you try to change the behavior of key in settings?
Envoyé de mon ONE E1003 en utilisant Tapatalk
J0kker said:
If you restored the original file, at the original place, I don't know why this would not get you back...
Did you try to change the behavior of key in settings?
Envoyé de mon ONE E1003 en utilisant Tapatalk
Click to expand...
Click to collapse
Thanks for your help, but unusually it eventually sorted itself out. After 3 reboots the buttons began to work again... weird!
can you change hardware keys to [L-R] Recent Menu Back on CM13 using this method?
sphoenixp said:
can you change hardware keys to [L-R] Recent Menu Back on CM13 using this method?
Click to expand...
Click to collapse
Yes you can, but the file isn't the same, you should edit:
system/usr/keylayout/synaptics-rmi.kl
If you want to swap keys, simply switch the numbers (139 with 158), it's exactly the same as modifying the functions, but easier to type, especially on a phone.
It doesn't work for me. I added virtual at menu and back. Changed gravitybox back long press and double tap to kill foreground app. Single tap of back still not working.
Have i missed out anything? Oss 2.20 here.
J0kker said:
Yes you can, but the file isn't the same, you should edit:
system/usr/keylayout/synaptics-rmi.kl
If you want to swap keys, simply switch the numbers (139 with 158), it's exactly the same as modifying the functions, but easier to type, especially on a phone.
Click to expand...
Click to collapse
Thanks so much it worked.
Saved and rebooted the phone
Tiongkia said:
It doesn't work for me. I added virtual at menu and back. Changed gravitybox back long press and double tap to kill foreground app. Single tap of back still not working.
Have i missed out anything? Oss 2.20 here.
Click to expand...
Click to collapse
Strange, i'm on OSS 2.2.0-X and it's working perfectly.
Maybe try to activate Master switch under Navigation Bar tweaks in gravity box ?
I'm almost sure this won't help, but you need to write it all in uppercase letters.
J0kker said:
Strange, i'm on OSS 2.2.0-X and it's working perfectly.
Maybe try to activate Master switch under Navigation Bar tweaks in gravity box ?
I'm almost sure this won't help, but you need to write it all in uppercase letters.
Click to expand...
Click to collapse
Its already in caps. Don't work
Also try enabling master switch under navigation bar tweaks. Also don't work.
I just updated to 2.2.0-x too
Tiongkia said:
Its already in caps. Don't work
Also try enabling master switch under navigation bar tweaks. Also don't work.
I just updated to 2.2.0-x too
Click to expand...
Click to collapse
I can try to upload my generic.kl file if you want, just to see if it works for you as it does for me (this way we will know if it's this file related or not).
You should have menu-home-recents.
Rename the file (remove the .txt, i could not join a .kl file, invalid).
Maybe check the permissions too.
Envoyé de mon ONE E1003 en utilisant Tapatalk
J0kker said:
I can try to upload my generic.kl file if you want, just to see if it works for you as it does for me (this way we will know if it's this file related or not).
You should have menu-home-recents.
Rename the file (remove the .txt, i could not join a .kl file, invalid).
Maybe check the permissions too.
Envoyé de mon ONE E1003 en utilisant Tapatalk
Click to expand...
Click to collapse
I appreciate it buddy. But don't work
Tiongkia said:
I appreciate it buddy. But don't work
Click to expand...
Click to collapse
Sorry to ear that, if you ever manage to get it working, let us know (and why/how).
Tiongkia said:
I appreciate it buddy. But don't work
Click to expand...
Click to collapse
You should check if A you have a text editor that supports editing in system partition and B if you have root file explorer that supports writing in system partition (and permissions). I would recommend es file explorer, just for this particular task. Afterwards just delete the file explorer.
The easy way is to delete the file in keylayout and write the file (with es file explorer) from OP couple of posts ago in keylayout direction. Reboot and also enable masterswitch in gravitybox. Voila, this method can't go wrong and works always.
I have es explorer and root browser. I am able to change permission too. Also reboot but no effect.
Anyone else tried?
Tiongkia said:
I have es explorer and root browser. I am able to change permission too. Also reboot but no effect.
Anyone else tried?
Click to expand...
Click to collapse
I tried and it worked perfect. Can you look up what your generic file says under 139 and 158 ?
Tiongkia said:
I have es explorer and root browser. I am able to change permission too. Also reboot but no effect.
Anyone else tried?
Click to expand...
Click to collapse
Just wondering, do you have navbar enabled ?
If it is, try to disable it and reboot... i've never tried with navbar enabled, so who knows !
Tried all. Don't work. I give up. Thanks buddies. Appreciate it
Hi,
Applied without problem, just I can't set double tap action on the Home button.
I don't know why double tap doesn't work just for the home button. No problem with menu or back settings or on long press.
I think that Nova breaks this setup.
My conf :
OOS 2.2X, Xposed 80, Gravity Box 5.3.3, Nova lastest release
Edit : When I revert to the original file, the default setting (Settings > Buttons) Double tap for the Home buton is ignored.

How To Guide How to remap "assistant" button! [ROOT REQUIRED]

it seems that while adding non-remappable assistant buttons is a growing trend, solutions aren't easy to find, however the solution is real simple, you just have to modify the keymap file...
I successfully managed to get the button detected by flashing XperiaGAButtonRemap through magisk, and I'm pretty sure the same solution works for a bunch of other phones also, it even has code that should allow flashing through custom recoveries also.
all you have to do is "install from storage" in magisk manager, select the zip, and reboot.​
what that zip does, is it adds /system/vendor/usr/keylayout/gpio-keys.kl (overriding /system/usr/keylayout/gpio-keys.kl because /vendor has higher priority) and replaces the ASSISTANT key with PROG_BLUE, which is a dummy key, you can remap that with any remapper app or module, or you could edit the zip, and change it directly to something like CAMERA, if that's all you want.
here's what the file will look afterwards, if you're curious:
key 115 VOLUME_UP
key 114 VOLUME_DOWN
key 102 HOME
key 528 FOCUS
key 766 CAMERA
key 457 PROG_BLUE
the original file has copyright notice for The Linux Foundation, from 2013, but all other keys map the same, so it's highly likely most phones (at least the AOSP-adjacent ones) just have hooks for the ASSISTANT key, but still rely on the universal keymap file
thanks a lot!worked just fine,
big ups!!!
Hello, sorry for the question, does this work on Android 12?
SHANOA_zasha said:
Hello, sorry for the question, does this work on Android 12?
Click to expand...
Click to collapse
I've just tested and yes it works in A12

Categories

Resources