How to disable capacitive buttons?

Discussion in 'Xiaomi Mi 2 / Mi 2S' started by evolution106, Dec 13, 2013.

  1. evolution106

    Dec 12, 2013
    6
    3
    13
    Male
    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!
     
  2. RobinHood00

    Oct 28, 2013
    449
    128
    65
  3. Wajk

    WajkMembers

    Jun 29, 2011
    486
    1,487
    165
    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
     
    dextructor and MSephiroth like this.
  4. evolution106

    Dec 12, 2013
    6
    3
    13
    Male
    @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
     
    RobinHood00 likes this.
  5. RobinHood00

    Oct 28, 2013
    449
    128
    65
  6. evolution106

    Dec 12, 2013
    6
    3
    13
    Male
    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
     
    regent89 and Wajk like this.
  7. Wajk

    WajkMembers

    Jun 29, 2011
    486
    1,487
    165
    Gooood news, thnx for your detailed report. This help for anybody, who will get similar problem.
     

Share Our Site