Hi
I have a Nexus 5 and recently my power button started behaving all weird. I figured out that it's probably worn out and started registering presses at random times, sometimes rebooting the phone.
My solution was to use the double tap to wake kernel, but on lollipop it seems to drain a LOT of battery.
The next thing I thought of, was remapping the buttons, so that I can switch the function and use my volume down key as a power button, and the power button as a volume down button.
Went into system/usr/keylayout/ and edited the General.kl and replaced the 114 and 116 button codes, but it didn't seem to have any effect. Then I went into the other files and managed to get the volume down and power button not to work
I did a restore, and everything is back to normal, but I couldn't achieve my goal 
Also tried Button Remapper, but it didn't do anything.
Does anyone know how this can be achieved on Lollipop?
Thanks
I have a Nexus 5 and recently my power button started behaving all weird. I figured out that it's probably worn out and started registering presses at random times, sometimes rebooting the phone.
My solution was to use the double tap to wake kernel, but on lollipop it seems to drain a LOT of battery.
The next thing I thought of, was remapping the buttons, so that I can switch the function and use my volume down key as a power button, and the power button as a volume down button.
Went into system/usr/keylayout/ and edited the General.kl and replaced the 114 and 116 button codes, but it didn't seem to have any effect. Then I went into the other files and managed to get the volume down and power button not to work
Also tried Button Remapper, but it didn't do anything.
Does anyone know how this can be achieved on Lollipop?
Thanks