How to disable capacitive buttons?


Dec 12, 2013
6
3
13
#1
Hey there!

A few hours ago I posted about a bug I have with my phone.
(http://xiaomi.eu/community/threads/phone-keeps-pressing-back-button-ghost-touch.23035/)

Even when I'm doing nothing, my back button keeps activating. It seems to be broken.

I have tried everything but nothing seems to work. So I have searched around even more on the forums (and google) for a solution and found how to enable the android soft-keys by editing build.prop

When I disable the buttons in the miui toggles the problem is fixed, but the soft-keys don't work either.

Does anyone know what file I need to edit to disable my hardware keys but keep my soft-keys working? I have found information for other phones, telling me to go to "root/system/usr/keylayout" and edit files there. This is where I get stuck. Does anyone know?

Thanks!
 

Wajk

Members
Jun 29, 2011
486
1,487
165
#3
Enable On-Screen button: tested by me, working
Use any Root Explorer
Open build.prop with text editor
add qemu.hw.mainkeys=0 to the bottom of build.prop
set correct permission

Disable Hardware Navigation Button: not tested
open cyttsp-i2c.kl from system\usr\keylayout\
search "key XX BACK" text and replace with "key XX MENU VIRTUAL "

firstly change keys only first, "# Function keys" part

If you would like to disable also HOME and MENU HW buttons, just use previous steps and search "key XX HOME" and "key XX MENU"

If this is not working, try to edit Generic.kl and/or keypad_8960.kl

I hope you can find solution.
report back
 
Dec 12, 2013
6
3
13
#4
@RobinHood00
I actually did use google and the search function. All it got me was ButtonRemapper from 2010 and a lot of tutorials about editing .kl files (every phone seems to have a different file that needs to be edited). On this forum I got an old thread about enabling the soft keys. Guess I used the wrong key words. Thank you for your help!

@Wajk
Thanks. As I got the right tools for it already, I'll try your solution immediately. I'll report back soon. :D
 
Likes: RobinHood00
Dec 12, 2013
6
3
13
#6
Okay, I'm back!

@Wajk

I have tried your solution to disable the Hardware Buttons, here are the results:

cyttsp-i2c.kl
Changed "key 62 BACK WAKE_DROPPED" into "key 62 MENU VIRTUAL"
Not working

Generic.kl
Changed "key 158 BACK WAKE_DROPPED" into "key 158 MENU VIRTUAL"
Not working

keypad_8960.kl
Changed "key 62 BACK WAKE_DROPPED" into "key 61 MENU VIRTUAL"
Not working

----------

So I decided to go through all the other files and keep editing one by one until I found the right one.

atmel_mxt_ts.kl
Changed "key 158 BACK VIRTUAL" into "key 158 MENU VIRTUAL"
BACK button started behaving as a MENU button.

That's when I knew I found the right file. I tried changing it back and then comment it out:

atmel_mxt_ts.kl
Changed "key 158 BACK VIRTUAL" into "# key 158 BACK VIRTUAL"
BACK button disabled!

Finally! I reopened that file one last time and commented out every single line.
Now all my hardware keys are disabled while the on-screen keys are working as expected!

Ladies and gentlemen, I think this problem has been solved! Thank you all for your help! :D