# Soft Keys Instead of Buttons



## TenderloinShadow (Nov 4, 2011)

Hey, so I'm just not a fan of the capacitive buttons or the home key, I prefer the soft keys that the Galaxy Nexus has. I know that AOKP has the option to turn on Soft Keys, and I know that CM9/10 will get a mod for it at some point, but is there a way to disable the existing buttons so that the soft keys are all that will do anything?

Before anyone points out that this may be a stupid thing to do, I should point out I'm not 100% sold on the idea, it's just something I want to try out. I keep hitting the capacitive buttons by mistake, so I think this way will be better.

Any help will be great. Also if anyone knows a soft key mod for Touchwiz, that would also be great, as I have a Verizon SGS3 and I'm holding off on flashing any AOSP ROMs until things like the IMEI problem have been sorted out.


----------



## Jaxidian (Jun 6, 2011)

Somebody attempted this with AOKP but ran into some problems when trying to disable the capacitive buttons. I'm unsure if anybody has succeed yet. I suspect you're going to need ROM support of such a feature. Not sure you're going to find a good "hack" to make this work.


----------



## SlimSnoopOS (Jan 19, 2012)

Aight, so I'm digging up this thread from the grave to see if anyone has modded the softkeys on TW roms to a different color. Courtesy of someone's input on xda, I have the nav bar on TW (Beans JB build 7 to be specific) just by adding the following line to my build.prop:

qemu.hw.mainkeys = 0

It's actually not that bad, I've only had them enabled since yesterday and I started thinking about color mods. I may be keeping these enabled but I was curious about this one thing. I've been looking at a thread by Atticus in the GNex section here and on xda and it has plenty of nav bar mods. From browsing the web, I know this is (obviously) primarily an AOSP thing and is easily modified in roms such as AOKP and CM10. I just wanted to know if this was possible on TW. Atticus' thread has a few methods and I believe they focus on inserting the nav bar files into the rom zip OR modding systemUI. I wasn't sure how this would work on the TW since nav bar is "disabled" by default. 

Here's Atticus' GNex thread:

http://rootzwiki.com...maupdate-22-01/

I'm not asking for someone to do this for me, just wanted to see how different of a process this would be.


----------



## greenlantan (Dec 22, 2011)

I was dying to have these too. If you get on Liquid's latest release - 1F? It has the nav bar settings that you can enable. Upon clicking the check box it didn't show up, so I added

qemu.hw.mainkeys=0

to the end of the build.prop, rebooted, and they were there. I did feel bad that I'm using some precious screen space for buttons that I didn't really need, and I'm no expert in decompiling xml files to decrease the width of the nav bar. Fortunately, Liquids 1F release has the option to adjust the nav bar height.

To disable the hardware keys you'd have to navigate to both

system/usr/keylayout/sec_touchkey.kl

system/usr/keylayout/generic.kl

and place # signs in front of 139 and i believe 158, (Whichever keys have the MENU and BACK labels)

Reboot and you should be good 

Also you can disable the hardware key backlights in the advanced section in the settings menu.


----------



## SlimSnoopOS (Jan 19, 2012)

Appreciate the info and thank you. I may actually do that as well. I was more interested with replacing the nav bar icons on TW with either another set, altering their color, or maybe even dimming them. I'm not one to try other phone specific mods on mine before assessing the worst possible outcome so I didn't want to seriously corrupt anything on this phone trying what I linked to above. My line of thinking is that: since the nav bar isn't enabled by default, modding or editing system files would conflict somehow?


----------



## mentose457 (Aug 26, 2011)

I didn't know you could enable the soft keys by modding the build.prop. I've always decompiled and edited the framework.

Do your keys look like the nexus soft keys or the tw ones on Samsung tablets?

Ether way the images for both are in the SystemUI.apk. You can simply unzip the apk and replace the images then rezip it and rename it back to an apk.

Sent from my Galaxy Nexus using Tapatalk 2


----------



## SlimSnoopOS (Jan 19, 2012)

Ahh, good to see its nothing too difficult then. I'll try my hand at that, thank you. Here's a couple screenshots of my nav bar:


----------



## mentose457 (Aug 26, 2011)

You can also change the order of the soft keys. Its a bit more involved though as you have to decompile the SystemUI.apk and edit an XML file.

Sent from my Galaxy Nexus using Tapatalk 2


----------



## SlimSnoopOS (Jan 19, 2012)

mentose457 said:


> You can also change the order of the soft keys. Its a bit more involved though as you have to decompile the SystemUI.apk and edit an XML file.
> 
> Sent from my Galaxy Nexus using Tapatalk 2


That's a bit more than I think I'm willing to do. I just wanted to change the color of the pngs themselves.


----------



## mentose457 (Aug 26, 2011)

SlimSnoopOS said:


> That's a bit more than I think I'm willing to do. I just wanted to change the color of the pngs themselves.


If you want them switched I don't mind doing it and posting it here. I'm currently on build 6 but have been planning on flashing 7.

Sent from my Galaxy Nexus using Tapatalk 2


----------



## SlimSnoopOS (Jan 19, 2012)

Hmm, well I tried a few different times using the following steps (all from phone):

using ES File Explorer...
1) download preferred png set from Atticus thread, I chose: softkeys_stockblue_atticus
2) copy over my normal SystemUI to my downloads folder
3) copy contents of "softkeys_stockblue_atticus" to SystemUI/res/drawable-xhdpi, it should replace similarly named files only
4) compress (encrypt) to .zip using ES file explorer, rename that .zip extension to .apk
5) Cut newly made "SystemUI.apk" from my downloads folder to System/App
6) rename pre-existing SystemUI.apk to "SystemUI1.apk.bak" I renamed it with a "1" because there was already a pre-existing "SystemUI.apk.bak"
7) set permissions as rw r r for my new SystemUI
8) reboot

It fails, laughably so at that. I noticed that my new SystemUI.apk doesn't change its icon to the jellybean logo, it remains a sim card and zip logo. I've also tried removing my nav bar from build.prop, rebooting, inputting my new SystemUI & setting permission, then re-adding my nav bar via build.prop. How do you get yours to change and work appropriately?


----------



## mentose457 (Aug 26, 2011)

You have to copy the apk to somewhere on your card then unzip it and replace the images. There are several different ones. You want to replace the ones that have the tw prefix. Then simply rezip and rename. I'm off work in about 10 minutes. I'll look to verify the correct images when I get home.

Sent from my Galaxy Nexus using Tapatalk 2


----------



## SlimSnoopOS (Jan 19, 2012)

Fine by me, no rush. I'm just happy to even enable soft keys on TW. Getting used to them is fun in and of itself.


----------



## mentose457 (Aug 26, 2011)

The images you want to replace in drawable-xhdpi are tw_navigationbar_back_(normal/pressed).png, tw_navigationbar_home_(normal/pressed).png, tw_navigationbar_recent_(normal/pressed).png and tw_navigationbar_menu_(normal/pressed).png.


----------

