[MOD][Buttons]Search as Power-Power as Search (UPDATE: Revolution JB 2.20,Evo 2.20 )

algie17

Senior Member
Jan 14, 2011
248
175
0
San Pablo
=))) funniest thing of the day
I have modified 7k_handset.kl like this:

Code:
key 226   HEADSETHOOK       WAKE
key 116   POWER            WAKE
key 107   SEARCH           WAKE_DROPPED
And now, the physical power button RANDOMLY and sometimes SIMULTANEOUSLY triggers the following:

- the screen turns off AND/OR
- the power menu appears (silent, airplane,poweroff) AND/OR
- the menu with the apps appears ( copy paste it, ghost commander, bla bla)


I made a video too: http://youtu.be/vCCz15LEjec Sry for the quality, it's an obsolete hp camera.
,haha what have you done,^^,:p
 

klaudyuxxx

Senior Member
Jul 23, 2010
129
33
0
Botosani
this is getting annoying
another try:
Code:
key 226   HEADSETHOOK       WAKE
key 116   SEARCH            WAKE_DROPPED
#key 107   ENDCALL           WAKE_DROPPED
by disabling key 107 short press doesn't work, but long press works.
they simply don't work if they are both defined. don't know why :confused:
 

algie17

Senior Member
Jan 14, 2011
248
175
0
San Pablo
this is getting annoying
another try:
Code:
key 226   HEADSETHOOK       WAKE
key 116   SEARCH            WAKE_DROPPED
#key 107   ENDCALL           WAKE_DROPPED
by disabling key 107 short press doesn't work, but long press works.
they simply don't work if they are both defined. don't know why :confused:
WAKE = when you press this button or this happens it wont wake the phone,
WAKE_DROPPED = when you press this button or this happens it will wake the phone,

hmm 107 is for end call you must edit also its function in other kl files,i doubt that it is the reason for long press,but maybe it affects,

as i can see you make your power button(116) as search,does it work?,because you need to edit it also in other kl files,^^
 

klaudyuxxx

Senior Member
Jul 23, 2010
129
33
0
Botosani
when i make 116 as search, it works but only long press. if i enable 107 as search too, it only works as short press, and long press doesn't work anymore.
i found a nice app here http://forum.xda-developers.com/showthread.php?t=850464
It's called KeynrTracker.apk and it shows the code of the button you press. For the power button i get code 107 for short press, and 116 for long press. So i guess the problem is i have TWO codes for one button because with the search button i get only one code 217, for short and long press.

so:
--power button:
---short press - code 107
---long press - code 116

--search button:
---short press - code 217
---long press - code 217
 

algie17

Senior Member
Jan 14, 2011
248
175
0
San Pablo
when i make 116 as search, it works but only long press. if i enable 107 as search too, it only works as short press, and long press doesn't work anymore.
i found a nice app here http://forum.xda-developers.com/showthread.php?t=850464
It's called KeynrTracker.apk and it shows the code of the button you press. For the power button i get code 107 for short press, and 116 for long press. So i guess the problem is i have TWO codes for one button because with the search button i get only one code 217, for short and long press.

so:
--power button:
---short press - code 107
---long press - code 116

--search button:
---short press - code 217
---long press - code 217
,ahh thanx for the information,^^,did you try to flash the MODv20i.zip that i created for you?,
 

klaudyuxxx

Senior Member
Jul 23, 2010
129
33
0
Botosani
MODv20i.zip
With this version i get two power buttons :D The physical power button remains unchanged and the physical search button also becomes power button. I did manage to trigger once or twice that menu with the original patch, but i really don't know how to reproduce it. I guess there's something fishy with the rom. I too tried some modifications in .kl files, but no luck.
I've attached the original v20i keylayout folder.