[Q] Change button behaviour in ICS - sec_key.kl - Galaxy Note GT-N7000 Q&A, Help & Troubleshooting

Hi
I'd like to prevent my Note's screen from being switched on by accidentally pressing the power button when the phone is in my pocket.
Before ICS it was possible to edit sec_key.kl and delete WAKE as a function of the power button, with ICS 4.0.4 (Imilka's CM9) this seems not to be working anymore. ButtonRemapper doesn't seem to be working either.
Does anybody know of another solution?

Anybody?

Would appreciate it if someone had an idea

One more push...

Maybe you can post the sec_key.kl here, so that we can see what you've edited

Army92 said:
Maybe you can post the sec_key.kl here, so that we can see what you've edited
Click to expand...
Click to collapse
Well, it's sure not about the syntax in sec_key.kl, since it was working nicely in Gingerbread.

Ok, I've fixed it - but I can't tell you exactly how.
I had noticed, that the "Power Wake" line is featured in several of the other .kl files in that folder. So what I did was simply opening them top to bottom and remove ALL "wake" entries behind ALL "power" entries from
Generic.kl
gpio-keys.kl
qwerty.kl
sec_key.kl
So I can't tell you which one was the essential one, but in any way, the wake on power is gone.

Changing it in gpio-keys.kl fixed it for me.

Tomdroid said:
Ok, I've fixed it - but I can't tell you exactly how.
I had noticed, that the "Power Wake" line is featured in several of the other .kl files in that folder. So what I did was simply opening them top to bottom and remove ALL "wake" entries behind ALL "power" entries from
Generic.kl
gpio-keys.kl
qwerty.kl
sec_key.kl
So I can't tell you which one was the essential one, but in any way, the wake on power is gone.
Click to expand...
Click to collapse
mrvdb said:
Changing it in gpio-keys.kl fixed it for me.
Click to expand...
Click to collapse
Thanks! That's good news. Wanted to edit the file, but as it seems my Note is not fully rooted on my newly installed CM9 nightly, /system is not writeable. Will have to reinstall.

Related

The useless "Search" soft key.

Any apps to make it open something else?
Thanks.
there are plenty
quicksettings
quickdesk
handcent sms
are a few off the top of my head
i used to have a bunch more, but i have since uninstalled after trying nearly all the apps i want to try
(these will allow you to launch them by long press. i dont know if you can replace the short press)
Pretty sure short press is not easily changed. With froyo though longpress opens Google voice commands.
Sent from my SAMSUNG-SGH-I897 using XDA App
Nice.
Thank you.
id be interested in a kernel or rom that would allow this to be changed. long press on menu opens search so why a seperate key that can be usefull as something else? can any of those apps change the short press? ive only seen long press on search and on home.
I use visual task switcher and assigned the long press of the search key to bring up a list of currently running apps. Pretty handy.
I installed "screen lock" and assigned it to screen lock to take some stress off the power button.
I don't remember where, but I found a post somewhere on how to change it, short press on mine opens camera.
Button Shortcut in the market.
Sent from my Captivate.
Dani897 said:
id be interested in a kernel or rom that would allow this to be changed. long press on menu opens search so why a seperate key that can be usefull as something else? can any of those apps change the short press? ive only seen long press on search and on home.
Click to expand...
Click to collapse
AReynante said:
I don't remember where, but I found a post somewhere on how to change it, short press on mine opens camera.
Click to expand...
Click to collapse
wow, this is an old thread, for those interested dragon remaps the key as camera launch.
can be done in button remapper. also touch jestures can be mapped as keys in galay tuner.
for people who want to get custom and dont see the otions they want in button remapper, i think the key table is in /system/usr/keylayout/s3c-keypad.kl
this is good for fixing i9000 roms (partially) when no kernel is available for those who want to try samsung gingerbread
I like the long press for google voice search. Thanks for the idea.
If you end up flashing a ROM, CM7 has a way to change the search key in the settings menu
I took a look at the system/usr/keylayout/s3c-keypad.kl file but I'm having trouble figuring it out. Anyone know how to get more info on it? Would love to map QuickDesk to it
Dani897 said:
wow, this is an old thread, for those interested dragon remaps the key as camera launch.
can be done in button remapper. also touch jestures can be mapped as keys in galay tuner.
for people who want to get custom and dont see the otions they want in button remapper, i think the key table is in /system/usr/keylayout/s3c-keypad.kl
this is good for fixing i9000 roms (partially) when no kernel is available for those who want to try samsung gingerbread
Click to expand...
Click to collapse
OK.. I have the issue, seems quite random with the Search button. Am wondering if it is related to moisture from my palm (right-handed)... not sure. Will have to try the rice trick.
Have also taken a look at the remapping option, but don't seem to have write permissions to any of the files, much less, what values to place in the file(s).
Any assistance would be appreciated on teh edit option.
BTW: Captivate with CM7.1 (and a functional GPS after a number of patch/fixes applied)
cm7 has this option.

CM9 G Button remap

hi, I open this thread to show you how to remap the G button, on the FOP rom it is assigned as a comma so it's totally useless, but all you have to do is using root explorer go to:
system\usr\keylayout
and modify the files "generic.kl" and "TWL4030_Keypad.kl" and search for "key 95".
On the "generic.kl" it will say something like insert comma, change that to one of this options:
APP_SWITCH it will make the g button open the recent apps
CAMERA well it's obvious it will open the camera
and on the "TWL4030_Keypad.kl" it will say "POWER WAKE_DROPPED", just erase that and type one of the options I said (you MUST assign the same option to BOTH files)
Hope it would be usefull ^^ I recomend using the button for the recent apps, since the camera can be accessed from the lockscreen and the camera isnt working right now
If you need to, I can make a CWM flashable zip to modify those 2 files, I didn't did that because this is way too easy to do manually...
Remember to mount R/w so you can edit the files
After doing that just reboot
You should mount r/w not r/o
Sent from my phone via tapatalk
A flashable file would be great!
You forgot reboot...neway thanks m8..it worked just fine :highfive:
RomWiz said:
You should mount r/w not r/o
Click to expand...
Click to collapse
thanks, for correcting me
strider2023 said:
You forgot reboot...neway thanks m8..it worked just fine :highfive:
Click to expand...
Click to collapse
ohh right jeje sry
Already there but imcomplete:
http://forum.xda-developers.com/showthread.php?t=1194058
koila33 said:
Already there but imcomplete:
http://forum.xda-developers.com/showthread.php?t=1194058
Click to expand...
Click to collapse
I saw this one when trying to do this, and it is really weird the tutorial so I decided to do this one, also it only says how to use as camera and lock button... could you consider adding this to the FOP rom?
Melin Leos said:
I saw this one when trying to do this, and it is really weird the tutorial so I decided to do this one, also it only says how to use as camera and lock button... could you consider adding this to the FOP rom?
Click to expand...
Click to collapse
If you guys find it useful we can add that feature, but it is easy to add this feature, so if you guys want, you guys can add by yourself.
koila33 said:
If you guys find it useful we can add that feature, but it is easy to add this feature, so if you guys want, you guys can add by yourself.
Click to expand...
Click to collapse
I know it's easy to add but the thing is that right now the g button on fop rom is completely useless
This works on CM7?
zortheck said:
This works on CM7?
Click to expand...
Click to collapse
Yep, tecnically it works on all roms, but I can't say exactly since Idont know which file you have to modify on cm7
zortheck said:
This works on CM7?
Click to expand...
Click to collapse
On cm7, you have to edit /system/usr/keylayout/qwerty.kl - delete key 212 line and add key 95 POWER WAKE_DROPPED or the line about camera - save and reboot
Sent from my LG Optimus Black using xda premium
My Power button is dead and i cannot turn on the phone manually. Ineed to use usb cable,enter the battery charging state and need to push the button frequently(hopefully it detect) till it reboot.Then i try to remap the power button to G button. still cannot on even at battery charging state... This phone is screwed.. wonder if anyone want to buy my phone.. haha..
My power button is not in the best condition too. First I remaped G button (key 95 POWER WAKE_DROPPED) and then I use SoftPower app to wake it because it even has sometimes problems to wake up with the remaped G button and I'm fine. OK that doesn't help when it's completly switched off but then it seems to work rather good and I nearly never switch it off anyway. I use AnReboot for some time, it is fast for reboot and good for getting in recovery.
SaschaKH said:
My power button is not in the best condition too. First I remaped G button (key 95 POWER WAKE_DROPPED) and then I use SoftPower app to wake it because it even has sometimes problems to wake up with the remaped G button and I'm fine. OK that doesn't help when it's completly switched off but then it seems to work rather good and I nearly never switch it off anyway. I use AnReboot for some time, it is fast for reboot and good for getting in recovery.
Click to expand...
Click to collapse
Getting to the recovery is not the problem as i can use the adb command. The worst part is when i want to call someone urgently and the phone cannot wake the screen. So softpower app can help in these kind of situation? As when the phone is completely dead, there nothing we can do to turn it on as some people said that the power button is hardwire.
Yes SoftPower wakes my phone up all the time without any problem. I haven't even activatet the adminstrator, because it is only needed for turning the screen off and I use G button for that. (Need the search button for something else anyway.)
BTW if you remap the G button it even shows the power menu like you get it for long pressing power button (at least with some ROMs).
Thanks man, i will try that software. I just open this phone and found out that the usb port and the power button is integrated with each other. So, it's kinda hard to repair it.
Thanks.... I modify G Button as Camera and its working awesome on CM10..
Sent from my LG-P970 using xda premium
Please
And if I want both answering and ending a call with G button, how can I add that to the file?
Maybe for wake up and turn off the device too? I guess it's applicable for multiple actions, isn't it?
atillaahun said:
And if I want both answering and ending a call with G button, how can I add that to the file?
Maybe for wake up and turn off the device too? I guess it's applicable for multiple actions, isn't it?
Click to expand...
Click to collapse
I tested it.I modify G button as CALL WAKE_DROPPED
With this I can receive the call but can't end call with G Button.
And also
Device wakes but can't turn off.
Sent from my LG-P970 using xda premium

Key Remap - help needed

So one of the things I definitely do not like on the Droid 4 was the inclusion of a Caps Lock key. Seriously? WHO NEEDS TO SOUND THIS ANGRY ALL THE TIME? NO ONE. So one of the things I always immediately do when flashing a rom is go into the key layout and change this to a much more appropriate shift key. However, the latest cm9 build (8-15) seems to be giving me some issues.
The caps key is #222
Usually I go into /system/usr/keylayout/ and edit the qwerty.kl file. Sometimes I have to change the key 222 entry, sometimes I have to make my own. This does not seem to work this time though. Does cm9 use a different file for key layouts? I even edited the Generic.kl, which I'm pretty sure doesn't apply to the phone's physical keyboard.
Any advice or solutions would be greatly appreciated. Thanks!
-----Resolved-----
So like 5 minutes after I posted this I realized it was the omap4-keypad.kl file that needed editing. Derp. Sorry!
Sent from my XT894 using Tapatalk 2

Switch places of HW keys (back<=>menu)

I was playing around with some other phones these days, which also have hardware keys, but differently placed (comparing to i9070).
I have noticed that I like more having BACK button on the left, insted of right, since I'm righthanded.
So can this switching places be done in CM10.2 (or any other rom) - to have BACK on the LEFT and MENU on the RIGHT?
jazzh said:
I was playing around with some other phones these days, which also have hardware keys, but differently placed (comparing to i9070).
I have noticed that I like more having BACK button on the left, insted of right, since I'm righthanded.
So can this switching places be done in CM10.2 (or any other rom) - to have BACK on the LEFT and MENU on the RIGHT?
Click to expand...
Click to collapse
Use some root explorer (like ES File explorer, put it in RW mode in options)
Locate /system/usr/keylayout/ dolder and in atmel_mxt_ts.kl swap HOME and BACK.
I dont have that file in that folder.
But i have: sec_touchkey.kl
With menu and back lines in it?
Should i change them here?
jazzh said:
I dont have that file in that folder.
But i have: sec_touchkey.kl
With menu and back lines in it?
Should i change them here?
Click to expand...
Click to collapse
Yes, remember where is that folder if you want to change it back. Reboot after change.
Success, thx!

How do I disable Capacitive Buttons and Add on screen "buttons"?

How do I disable Capacitive Buttons and Add on screen "buttons"?
I tried to edit system/usr/keylayout/generic.kl and put # in front of keys 158 and 139 but then I can't save the file.
How do I save the edited file?
Then how do I turn on the on screen buttons?
Thanks in advance.
anyone?
macsrock said:
How do I disable Capacitive Buttons and Add on screen "buttons"?
I tried to edit system/usr/keylayout/generic.kl and put # in front of keys 158 and 139 but then I can't save the file.
How do I save the edited file?
Then how do I turn on the on screen buttons?
Thanks in advance.
Click to expand...
Click to collapse
Hi @macsrock,
From what I understand in order to enable the on screen "soft keys" for a TW ROM, the framework would have to be modified (to what extent I do not know). Whereas in an "AOSP" (stock android) based ROM, a simple build.prop edit would do the trick.
theROMinator said:
Hi @macsrock,
From what I understand in order to enable the on screen "soft keys" for a TW ROM, the framework would have to be modified (to what extent I do not know). Whereas in an "AOSP" (stock android) based ROM, a simple build.prop edit would do the trick.
Click to expand...
Click to collapse
Thank you.
theROMinator said:
Hi @macsrock,
From what I understand in order to enable the on screen "soft keys" for a TW ROM, the framework would have to be modified (to what extent I do not know). Whereas in an "AOSP" (stock android) based ROM, a simple build.prop edit would do the trick.
Click to expand...
Click to collapse
Yeah Samsung are dicks and removed the parts of the framework needed for this I'd much prefer this as well but not happening anytime soon.
Sent from my SM-N9005 using XDA Premium 4 mobile app
I was finally able to disable the capacitive buttons which always get pressed accidentally. Im using GMD gestures. But has anyone yet found any mod to make the on screen navbar work?
By the way,You can also download an app, button savior for soft keys but they look a bit sluggish
If i helped,don't forget to hit the THANKS button

Categories

Resources