[Q]key layout file in CM7.1 Rom - Defy Q&A, Help & Troubleshooting

hey I read this article about changing the key value of "search" key to "power".
According to the auther, the file /sysstem/usr/keylayout/qwerty.kl is to change. But his device is an HTC with certain ROM.
I'm wondering which file is to change for Defy, and which two key values are to change in order to achieve replacing the power key for both "long press" and "press" actions.
Plz help

Related

[Guide] Change the user buttons to home and back

I was looking to change the user configurable buttons on my Desire Z but couldn't find a easy guide or simple solution. I started to experiment a bit. This is what I found out:
To change the layout you only need to things:
1. a rooted phone
2. A program like Root explorer with R/W permissions
Then do the following:
Go to system/usr/keylayout and open the file for the layout you are using in a text editor (in my case this was the WWE version)
I then changed 'user 1' to 'HOME' and 'user 2' to 'BACK'.
I did a soft reset and I now use the user 1 button to go to the home screen and the user 2 button to go back
note 1:I allso made the above changes to vision-keypad.kl and the wwe-bopomo.kl files, maybe someone can confirm if this is really nessacary
note 2: This guide is problably written a 1000 times but I couldn't find it so I hope it's my first real (small) contribution
Grtz

[Q] Disable HardKeys

Hi,
Just had navbar (with soft key) editing build.prop but I can't disable hardkey even by editing /system/usr/keylayout/Generic.kl
Did someone found a way ?
Thanks
You would need for someone to develop a custom kernel to disable that. Atleast thats how it is on the galaxy tab s
OK I solve that. You need to disable key number 158 and key number 254 in /system/usr/keylayout/Generic.kl file.

Guide to enable soft nav keys and disable capacitive keys in CM 12.1 (without xposed)

The CM devs are unable to include this functionality for our device (it is against CM design guidelines to enable soft keys, because zenfone's hard keys are not backlit and therefore cannot be hidden), so I thought I'd share my findings on a simple method to do it yourself.
(Disclaimer: while this does not involve anything difficult, you do have to make minor changes to important system files. Please proceed with caution and at your own risk. I cannot be held responsible for any problems that may result in following this guide.)
First, open the CM file manager and if you haven't done so already, give it root access (open the sidebar, press the gear icon at the bottom, then open "general settings" and scroll down to "advanced" and you'll find "Access Mode", which you set to root access).
To enable soft keys:
Use the file manager to navigate to the system folder, where you'll find the build.prop file. Tap it and select to use editor to open it. Then scroll down to the end of the file and add this line:
qemu.hw.mainkeys=0
Then click the disk icon up top to save the edited file. Reboot your device and you should have the soft keys.
If you want to turn them off temporarily just open the build.prop file again and add a # in front of qemu.hw.mainkeys=0 then save and reboot.
Next, how to disable the hard capacitive keys:
Again using file manager, navigate to system-usr-keylayout. Open the ftxxxx_ts.kl file with editor. Add a # to the front of the first three lines. They should look like this:
#key 158 BACK VIRTUAL
#key 102 HOME VIRTUAL
#key 139 APP_SWITCH VIRTUAL
Now save the file and reboot your device, and the hard keys should now be disabled.
If you want to enable them again just go back to the ftxxxx_ts.kl file and remove the three # marks that you added, and as usual save and reboot.
I have not tried this on rooted stock firmware, so don't know if the method is the same. Would be good if someone on stock could try and let us know. Think you need a 3rd party file explorer (something like ES Explorer) to do it in stock?

Swapping Back and Recent Apps Button - Exodus Rom

Hey guys, I need a tiny bit of help. I'm running Exodus ROM, which is my favorite. Only issue is it doesn't have the option to swap the back and recent apps button. I'm left-handed so I have to have that switched. When I had my OnePlus One I was able to switch the buttons by editing the corresponding system files. So I'm trying to do the same for my OnePlus 2, but need confirmation on which files to swap.
Here's where I'm at so far.
Using ES File Explorer I've navigated to:
system --> usr --> keylayout
then opened --> Generic.kl (in text editor)
From there I see that --> key 139 is the menu and --> key 158 is the back button. So I believe those are the two that I need to swap. Can someone confirm this? As on the Oneplus One it was slighty labeled differently.
Edit----------------
Okay I tried swapping 139 and 158 and those weren't it. So I need help identifying which to swap. Thanks
Edit --------------
Nevermind. I used the option to change short press action. For any other left-handers that may stumble on this thread if you're using Exodus ROM navigate to:
Menu --> Hardware --> Action Rebinding --> Back --> Single Press Action --> and change to "Recent Apps"
Then click on App Switch --> single press and action change to "Navigate Back"
ImHavenHart said:
Hey guys, I need a tiny bit of help. I'm running Exodus ROM, which is my favorite. Only issue is it doesn't have the option to swap the back and recent apps button. I'm left-handed so I have to have that switched. When I had my OnePlus One I was able to switch the buttons by editing the corresponding system files. So I'm trying to do the same for my OnePlus 2, but need confirmation on which files to swap.
Here's where I'm at so far.
Using ES File Explorer I've navigated to:
system --> usr --> keylayout
then opened --> Generic.kl (in text editor)
From there I see that --> key 139 is the menu and --> key 158 is the back button. So I believe those are the two that I need to swap. Can someone confirm this? As on the Oneplus One it was slighty labeled differently.
Edit----------------
Okay I tried swapping 139 and 158 and those weren't it. So I need help identifying which to swap. Thanks
Edit --------------
Nevermind. I used the option to change short press action. For any other left-handers that may stumble on this thread if you're using Exodus ROM navigate to:
Menu --> Hardware --> Action Rebinding --> Back --> Single Press Action --> and change to "Recent Apps"
Then click on App Switch --> single press and action change to "Navigate Back"
Click to expand...
Click to collapse
Not in Generic.kl but in Syanptics.kl
Also reboot after changing.

[howto] Disable capacitive buttons and enable software buttons

I find the capacitive buttons hard to use so after a bit of trial and error i found a way to enable software keys and disable the capacitive buttons.
To enable software keys :-
With root file editor, edit the build.prop and add the following to the very bottom
qemu.hw.mainkeys=0
Reboot and the soft keys should now now be showing! They auto-hide as well when required.
WARNING: If you install a ROM update that changes the build prop it will disable the softkeys.
You can usually still navigate to edit the build prop again and then save and reboot though.
To disable capacitative buttons
Use root file explorer and navigate to /system/usr/keylayout
edit the mtk-tpd file and put a # in front of the lines for home, back, menu, app switch
e.g
# key 172 HOME VIRTUAL
# key 139 MENU VIRTUAL
# key 158 BACK VIRTUAL
# key 580 APP_SWITCH VIRTUAL
Reboot and the capacitive buttons no longer work!
tested working on Androium rom so far
f1ux said:
I find the capacitive buttons hard to use so after a bit of trial and error i found a way to enable software keys and disable the capacitive buttons.
To enable software keys :-
With root file editor, edit the build.prop and add the following to the very bottom
qemu.hw.mainkeys=0
Reboot and the soft keys should now now be showing! They auto-hide as well when required.
WARNING: If you install a ROM update that changes the build prop it will disable the softkeys.
You can usually still navigate to edit the build prop again and then save and reboot though.
To disable capacitative buttons
Use root file explorer and navigate to /system/usr/keylayout
edit the mtk-tpd file and put a # in front of the lines for home, back, menu, app switch
e.g
# key 172 HOME VIRTUAL
# key 139 MENU VIRTUAL
# key 158 BACK VIRTUAL
# key 580 APP_SWITCH VIRTUAL
Reboot and the capacitive buttons no longer work!
tested working on Androium rom so far
Click to expand...
Click to collapse
thanks for the tip.
please i want to know if it is possible to change the arrangement of the soft keys, possible switch the back soft key and the recent task soft keys
becleanstayclean said:
thanks for the tip.
please i want to know if it is possible to change the arrangement of the soft keys, possible switch the back soft key and the recent task soft keys
Click to expand...
Click to collapse
I haven't found a way, but I haven't looked either so far.
A quick Google says xposed can modify the nav bar

Categories

Resources