MOD: Search Key as a Power Button CM10

M

mariosanoguera

Guest
MOD: Search Key as a Power Button

This is my first real contribution to the Defy Android Development and Im very proud to contribute (small contribution) after all this forum has taught me and has make me choose my defy over any latest iPhone or big and new Android phone ^^

This MOD works perfectly on any ROM (cm7 cm9 cm10 miui mokee os.. so I imagine it works in every rom out there) and its pretty easy to do (although if someone knows how to make .zips to directly flash it from cwm I would appreciate it and include it in this post ^^)

This MOD does the following, it turns the seach key to your power button and in my opinion it is a good option because it increased life expectancy of our strong defy's (btw power button will work the same, and it will still be needed to unlock our defy since the touchscreen keys dont work when our defy is off)

If you press the search key your defy will go to sleep, as if you pressed once the power button, and if you do a longpress on the search key the power menu will show up (shut down reboot screenshot etc.. :p)

you only need a root explorer to edit system files I did it with root explorer btw :p

go to system > usr > keylayout and open qwerty.kl and X (the one above) with a text editor..

in both files----> key 217 SEARCH WAKE_DROPPED change it to ---> key 217 POWER WAKE

NOTE: make sure after this change that key, POWER and WAKE are in exactly the same collumn as before (insert one spacebar after POWER to move WAKE to the right position!

To end with, check permisions of both files (they didn't change for me but just in case) it should be:

X X 0

X 0 0

X 0 0

X= tick 0=untick

If you don't understand this just compare the permisions with any other file of that folder

RESTART then WALA! :)
 
Last edited:

espaciosalter20

Senior Member
Jun 12, 2011
1,534
887
143
Bogotá, Colombia, Colombia
Well, not all roms. Basically, all custom roms. Stock roms use a different set of files to mapping the phone. Still, values are correct and can be applied to any Rom, you just have to know which files mapping hardware keys on your Rom. This kind of things could make that you can even power up your phone with menu button or search with back button or whatever you want :D

Enviado desde mi MB525 usando Tapatalk 2
 
M

mariosanoguera

Guest
Well, not all roms. Basically, all custom roms. Stock roms use a different set of files to mapping the phone. Still, values are correct and can be applied to any Rom, you just have to know which files mapping hardware keys on your Rom. This kind of things could make that you can even power up your phone with menu button or search with back button or whatever you want :D

Enviado desde mi MB525 usando Tapatalk 2
well, I read about touchkeys (search home etc..) and if they aren't fisical you can't powerup/unlock etc, in the defy case, it would only be possible to do it with volume or power up button (as we all do) by the way, can anyone link me to a how to create a .zip to do this? or could someone do it and I put it in the first post? ^^ its good to know how to do it but people will find easier to flash the .zip :p
 

Kayant

Senior Member
Jul 14, 2011
1,861
4,149
143
well, I read about touchkeys (search home etc..) and if they aren't fisical you can't powerup/unlock etc, in the defy case, it would only be possible to do it with volume or power up button (as we all do) by the way, can anyone link me to a how to create a .zip to do this? or could someone do it and I put it in the first post? ^^ its good to know how to do it but people will find easier to flash the .zip :p
Nah this is just fine I think ;) ..... This is the dev section afterall where we come to learn stuff and do stuff ourselves and anyways your instructions are great :)...... anyone that has flashed a rom before must be able to follow this at least I mean it's changing two values with a text editor then resetting the permissions of the files... I mean this is easier than rooting the defy.
But if you still want to make a flashable zip search in the defy general section AL did a great tutorial a while back ;)
Btw great work :)
 

Euro_Rules

Senior Member
Sep 7, 2009
254
83
0
Mumbai
I have one question .....

it should me 217 SEARCH WAKE_DROPPED to 217 POWER WAKE

or

217 SEARCH WAKE_DROPPED to 217 POWER WAKE_DROPPED ???????



Please reply....
 

Sick1

Senior Member
Aug 24, 2011
361
222
73
Hello!
Thank you for this mod, it works on my Desire S as it supposed to!!!
I have a broken power button so i mapped my search key to act as it. Now i was wondering would it be possible to map "long press search button" to "long press power button" ONLY. As i use sweep2wake -> search button wakes the phone and puts the phone to sleep too. I would like that the sweep2wake would do the waking and sleeping, and long pressing the search button would just open the "boot menu" . When i disable the sweep2wake search button doesnt wake my phone again. Which is what i want :) but then i have to remap my volume controls to wake it up.

Just small things, but i think this is the place to ask?

Peace!