• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root How to Remap Keys

sonicbluemustang

Android Enthusiast
Dec 11, 2010
470
94
How to remap your hard keys to do other functions such as waking the phone with a different key. In this case I will explain how to make your phone wake up with the Camera key.
This should not be done by noobs or anybody not familiar with editing system files. If you do this and mess up your phone and can't wake it at all I will only laugh and laugh very loudly. So you do this at your own risk!
I will Not be responsible for your stupidity. Hence the loud laugh. :)

So you understand what your about to do to edit this file;
* WAKE: When this key is pressed while the device is asleep, the
device will wake up and the key event gets sent to the app.
* WAKE_DROPPED: When this key is pressed while the device is asleep,
the device will wake up and the key event does not get sent to the
app.

1-You must have a Rooted phone and preferably a Custom Recovery. Create a Nandroid first.
2-Now you need a File Explorer that will gain root privileges such as ES File Explorer or Root Browser or it can be pulled to your pc thru ADB but I prefer working on the phone itself.
3-Navigate to the root directory then locate the folder system/usr/keylayout in this folder you will see a file called "keypad_8960.kl" Make a copy of this file and put it somewhere safe first before opening it. ES File Explorer has a text editor.
4-When you open this file navigate to the bottom and locate
# Camera Keys
key 528 FOCUS
key 766 CAMERA
here you will add the text WAKE_DROPPED after FOCUS and after CAMERA so they should then look like this.....
# Camera Keys
key 528 FOCUS WAKE_DROPPED
key 766 CAMERA WAKE_DROPPED
Save it by hitting the back key, exit and then reboot.
It should wake up by the camera key.

Lycka Till :D
 
  • Like
Reactions: MidshipAc

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones