[HOWTO] Enable software navigation buttons / disable hardware buttons

Search This thread

futurejohn

Member
Aug 31, 2010
34
20
One of the annoying things about the S4 is the lack of software navigation buttons. I was used to using them on my Nexus 4 so I really missed having them on my S4.

First of all, root is required to edit these files.

Basically, all you have to do is add 'qemu.hw.mainkeys=0' to the build.prop in /system and reboot to enable the software buttons. If you're happy with that you can stop there, but you can also disable the hardware buttons if you want.

Go to /system/usr/keylayout and open 'Generic.kl' in a text editor and find the lines that say 'key 139 MENU WAKE_DROPPED', 'key 158 BACK WAKE_DROPPED', and 'key 172 HOME' and place a # at the start of each line. Take care here because if you add a # to the wrong line, you won't have a way to wake the phone. Reboot and those hardware buttons will be disabled.

I've tested it with various apps and the phone resizes them appropriately. Software menu buttons appear where appropriate and video players cause the buttons to fade away. The only odd thing I've found is that the app drawer is shifted to a 4x4 layout instead of the regular 5x4. Also, home and back do not vibrate properly and I'm not sure which lines to edit to fix that.
 

x111

Senior Member
Jul 3, 2009
1,325
375
One of the annoying things about the S4 is the lack of software navigation buttons. I was used to using them on my Nexus 4 so I really missed having them on my S4.

First of all, root is required to edit these files.

Basically, all you have to do is add 'qemu.hw.mainkeys=0' to the build.prop in /system and reboot to enable the software buttons. If you're happy with that you can stop there, but you can also disable the hardware buttons if you want.

Go to /system/usr/keylayout and open 'Generic.kl' in a text editor and find the lines that say 'key 139 MENU WAKE_DROPPED', 'key 158 BACK WAKE_DROPPED', and 'key 172 HOME' and place a # at the start of each line. Take care here because if you add a # to the wrong line, you won't have a way to wake the phone. Reboot and those hardware buttons will be disabled.

I've tested it with various apps and the phone resizes them appropriately. Software menu buttons appear where appropriate and video players cause the buttons to fade away. The only odd thing I've found is that the app drawer is shifted to a 4x4 layout instead of the regular 5x4. Also, home and back do not vibrate properly and I'm not sure which lines to edit to fix that.


Do you know how to re-size screen buttons ?

p.s. everything works fine, but it to big ((
 
Last edited:

futurejohn

Member
Aug 31, 2010
34
20
Do you know how to re-size screen buttons ?

p.s. everything works fine, but it to big ((

The easiest way to do that is to change the lcd density. The default is 480 which makes everything MASSIVE. I find about 440 to be about perfect, but you can tweak it to find whatever is most comfortable for your eyes.

To change the lcd density, the simplest way is to go to build.prop and find the line that says 'ro.sf.lcd_density=480'. Change the 480 to whatever you want. Smaller numbers mean that things will be smaller and more spaced out and larger numbers will cause things to be larger and closer together. Reboot after you change the number and save the file for it to take affect.

You can also use tools like ROM Toolbox to make the edits if you find using an app easier to use than a text editor.

I recommend keeping a backup of your original build.prop for easy restoration.
 
  • Like
Reactions: x111

x111

Senior Member
Jul 3, 2009
1,325
375
The easiest way to do that is to change the lcd density. The default is 480 which makes everything MASSIVE. I find about 440 to be about perfect, but you can tweak it to find whatever is most comfortable for your eyes.

To change the lcd density, the simplest way is to go to build.prop and find the line that says 'ro.sf.lcd_density=480'. Change the 480 to whatever you want. Smaller numbers mean that things will be smaller and more spaced out and larger numbers will cause things to be larger and closer together. Reboot after you change the number and save the file for it to take affect.

You can also use tools like ROM Toolbox to make the edits if you find using an app easier to use than a text editor.

I recommend keeping a backup of your original build.prop for easy restoration.


It works, but again buttons is too big and change ro.sf.lcd_density low than 440 will be too small, and also I need change just screen buttons, other staff looks nice for me with ro.sf.lcd_density 480.

Please, tell step by step how to change it.

Also, do you know how to disable light of sensor buttons? (very annoying)
 
Last edited:

futurejohn

Member
Aug 31, 2010
34
20
It works, but again buttons is too big and change ro.sf.lcd_density low than 440 will be too small, and also I need change just screen buttons, other staff looks nice for me with ro.sf.lcd_density 480.

Please, tell step by step how to change it.

Also, do you know how to disable light of sensor buttons? (very annoying)

The only way I can tell to just shrink the navigation bar is to edit the framework-res.apk. From my research, you have to decompile the apk, edit the navigation bar field in dimens.xml, and recompile the apk. I tried that but ended up having to restore my phone after I got a bunch of force closes. :laugh:

It's obviously a bit more complex than what I just mentioned so I'll just have to mess around with it more before I know how to do it.

If anyone else has experience editing framework-res any help you could offer would be awesome.
 
  • Like
Reactions: Chahk

jedinegotiator

Senior Member
May 13, 2011
266
23
30
Fairfax, VA
One of the annoying things about the S4 is the lack of software navigation buttons. I was used to using them on my Nexus 4 so I really missed having them on my S4.

First of all, root is required to edit these files.

Basically, all you have to do is add 'qemu.hw.mainkeys=0' to the build.prop in /system and reboot to enable the software buttons. If you're happy with that you can stop there, but you can also disable the hardware buttons if you want.

Go to /system/usr/keylayout and open 'Generic.kl' in a text editor and find the lines that say 'key 139 MENU WAKE_DROPPED', 'key 158 BACK WAKE_DROPPED', and 'key 172 HOME' and place a # at the start of each line. Take care here because if you add a # to the wrong line, you won't have a way to wake the phone. Reboot and those hardware buttons will be disabled.

I've tested it with various apps and the phone resizes them appropriately. Software menu buttons appear where appropriate and video players cause the buttons to fade away. The only odd thing I've found is that the app drawer is shifted to a 4x4 layout instead of the regular 5x4. Also, home and back do not vibrate properly and I'm not sure which lines to edit to fix that.
Thanks!

Is there a way to disable the S4 menu and back buttons from lighting up?
 

Immix

Senior Member
Apr 1, 2005
184
31
Mumbai, IN
Anyone? Also there is no vibration pressing the back and home keys on the navbar. Reading the SIII and Note forums, I believe this is due to the lack of vibration support in kernel. Can anyone confirm?
 

kamirza

Senior Member
Jul 10, 2008
938
140
One of the annoying things about the S4 is the lack of software navigation buttons. I was used to using them on my Nexus 4 so I really missed having them on my S4.

First of all, root is required to edit these files.

Basically, all you have to do is add 'qemu.hw.mainkeys=0' to the build.prop in /system and reboot to enable the software buttons. If you're happy with that you can stop there, but you can also disable the hardware buttons if you want.

Go to /system/usr/keylayout and open 'Generic.kl' in a text editor and find the lines that say 'key 139 MENU WAKE_DROPPED', 'key 158 BACK WAKE_DROPPED', and 'key 172 HOME' and place a # at the start of each line. Take care here because if you add a # to the wrong line, you won't have a way to wake the phone. Reboot and those hardware buttons will be disabled.

I've tested it with various apps and the phone resizes them appropriately. Software menu buttons appear where appropriate and video players cause the buttons to fade away. The only odd thing I've found is that the app drawer is shifted to a 4x4 layout instead of the regular 5x4. Also, home and back do not vibrate properly and I'm not sure which lines to edit to fix that.
I have tried adding that qemu.hw.mainkeys=0 on build.prop but the soft keys dont come and on every press the systemUI stopping sign comes. Anything else I can do to avoid this. tried it with apex, nova and next launcher. Using omega ROM 14.1
 
Last edited:

rkharat98

Senior Member
It works, but again buttons is too big and change ro.sf.lcd_density low than 440 will be too small, and also I need change just screen buttons, other staff looks nice for me with ro.sf.lcd_density 480.

Please, tell step by step how to change it.

Also, do you know how to disable light of sensor buttons? (very annoying)

"ro.sf.lcd_density" isn't present over here....

But I added that line at the end of all lines in my build.prop ... Setting it at 400-480 gave me very big icons .. 300 gives me the original size of icons.. So I set it at 260.. Now it's giving me a Tablet like look...

And that all above is fine..
But after changing the values.. How is it possible that it changed all my default icons of System Apps...?? Even though those icons were not present in those APKs...?? :what::what:

And yes.. Talking abt NavBar .. Its smaller and much SPACED... Thnkx fo that...

And if u want to ENABLE or DISABLE Light of Hardware buttons here's the link to that APK..
https://www.dropbox.com/s/5qhpbuh5syvl39z/Capacitive.apk
Just download it.. And there are options...:cool:

Sent from my Micromax A116 using XDA Premium 4 mobile app
 
Last edited:

geronphillips

Member
May 29, 2013
39
0
OnePlus 7
does anyone know if this can be implemented with tasker?

Sorry, this is a little off topic but:
I keep accidentally pressing the hardware navigation keys when typing, particularly when i am in a rush. Is there any way that this method can be used with tasker or any similar app to disable the buttons when the keyboard is in use?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    One of the annoying things about the S4 is the lack of software navigation buttons. I was used to using them on my Nexus 4 so I really missed having them on my S4.

    First of all, root is required to edit these files.

    Basically, all you have to do is add 'qemu.hw.mainkeys=0' to the build.prop in /system and reboot to enable the software buttons. If you're happy with that you can stop there, but you can also disable the hardware buttons if you want.

    Go to /system/usr/keylayout and open 'Generic.kl' in a text editor and find the lines that say 'key 139 MENU WAKE_DROPPED', 'key 158 BACK WAKE_DROPPED', and 'key 172 HOME' and place a # at the start of each line. Take care here because if you add a # to the wrong line, you won't have a way to wake the phone. Reboot and those hardware buttons will be disabled.

    I've tested it with various apps and the phone resizes them appropriately. Software menu buttons appear where appropriate and video players cause the buttons to fade away. The only odd thing I've found is that the app drawer is shifted to a 4x4 layout instead of the regular 5x4. Also, home and back do not vibrate properly and I'm not sure which lines to edit to fix that.
    1
    Do you know how to re-size screen buttons ?

    p.s. everything works fine, but it to big ((

    The easiest way to do that is to change the lcd density. The default is 480 which makes everything MASSIVE. I find about 440 to be about perfect, but you can tweak it to find whatever is most comfortable for your eyes.

    To change the lcd density, the simplest way is to go to build.prop and find the line that says 'ro.sf.lcd_density=480'. Change the 480 to whatever you want. Smaller numbers mean that things will be smaller and more spaced out and larger numbers will cause things to be larger and closer together. Reboot after you change the number and save the file for it to take affect.

    You can also use tools like ROM Toolbox to make the edits if you find using an app easier to use than a text editor.

    I recommend keeping a backup of your original build.prop for easy restoration.
    1
    It works, but again buttons is too big and change ro.sf.lcd_density low than 440 will be too small, and also I need change just screen buttons, other staff looks nice for me with ro.sf.lcd_density 480.

    Please, tell step by step how to change it.

    Also, do you know how to disable light of sensor buttons? (very annoying)

    The only way I can tell to just shrink the navigation bar is to edit the framework-res.apk. From my research, you have to decompile the apk, edit the navigation bar field in dimens.xml, and recompile the apk. I tried that but ended up having to restore my phone after I got a bunch of force closes. :laugh:

    It's obviously a bit more complex than what I just mentioned so I'll just have to mess around with it more before I know how to do it.

    If anyone else has experience editing framework-res any help you could offer would be awesome.
    1
    Is there a way to disable the S4 menu and back buttons from lighting up?

    CM10.2 has this toggle built-in.