[MOD]disable Power or Home button screen wake

Search This thread

brez

New member
Dec 13, 2011
4
30
warrington
This is such a simple (but useful) mod I'm surprised it hasn't been posted.

If like me you only use the home button to wake the screen, and don't want the power button waking the screen whilst in your pocket or when you try to adjust the volume. This is for you.

You need to be rooted and need a file manager that supports root (Root Explorer or Root Browser (LITE version works fine)).

On your phone navigate to system/usr/keylayout
open sec_key.kl in text editor (you can make a backup if you want by adding .bak to the end of the file name and saving - Root Explorer will do this automatically)
delete WAKE from either HOME or POWER (not both!)
save and reboot.
View attachment 815205
 
Last edited:

stjoemail

Member
May 10, 2006
42
4
is there any setting to disable "back" button? I find the back button annoying when we are using s-memo, as it oftentimes accidentally activated.
 

brez

New member
Dec 13, 2011
4
30
warrington
is there any setting to disable "back" button? I find the back button annoying when we are using s-memo, as it oftentimes accidentally activated.

Yes, in system/usr/keylayout
sec_touchkey.kl

I now have my back key set as SEARCH and use LaunchKey (paid version) to remap long press search as back. It works quite well, as search does nothing in most note/drawing apps.

market.android.com/details?id=com.beansoft.launchkey&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5iZWFuc29mdC5sYXVuY2hrZXkiXQ

Hopefully someone will figure out or develop a better way.
 

stjoemail

Member
May 10, 2006
42
4
i saw inside sec_touchkey.kl the parameter Back WAKE, what should I change to make Back button to function as search?

thanks

Yes, in system/usr/keylayout
sec_touchkey.kl

I now have my back key set as SEARCH and use LaunchKey (paid version) to remap long press search as back. It works quite well, as search does nothing in most note/drawing apps.

market.android.com/details?id=com.beansoft.launchkey&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5iZWFuc29mdC5sYXVuY2hrZXkiXQ

Hopefully someone will figure out or develop a better way.
 
Last edited:

holgalee

Senior Member
Dec 20, 2010
404
37
Thank you for sharing this! Now for the not so bright question: does this mean if I accidentally hit the power button when making a call or playing a game, I won't be able to turn off the screen anymore?

TIA.
 

jsphoto

Member
Nov 1, 2010
38
1
Ottawa
I disabled the wake for power button, it works for a sort press, but long press still wakes.

Any tips? I think this will avoid pocket button presses.

thanks

Edit= never mind, I didn't reboot, works now.

Sent from my GT-N7000 using Tapatalk
 
Last edited:

stjoemail

Member
May 10, 2006
42
4
found the solution, using buttonremapper I switched the menu and back button so no need to buy launchkey. now if i accidentally press the right button during using s-memo, it will not activate the back function but menu function, so can easily cancel without the apps closing.

i saw inside sec_touchkey.kl the parameter Back WAKE, what should I change to make Back button to function as search?

thanks
 
  • Like
Reactions: noelb
Oct 11, 2011
23
2
Vaucluse
This is such a simple (but useful) mod I'm surprised it hasn't been posted.

If like me you only use the home button to wake the screen, and don't want the power button waking the screen whilst in your pocket or when you try to adjust the volume. This is for you.

You need to be rooted and need a file manager that supports root (Root Explorer or Root Browser (LITE version works fine)).

On your phone navigate to system/usr/keylayout
open sec_key.kl in text editor (you can make a backup if you want by adding .bak to the end of the file name and saving - Root Explorer will do this automatically)
delete WAKE from either HOME or POWER (not both!)
save and reboot.
View attachment 815205
The file is write protected, root explorer don't allow me to modify it, any idea to do it?
 
Oct 11, 2011
23
2
Vaucluse
Use es explorer with root enabled in the settings

Sent from my GT-N7000 using Tapatalk
Thx for your answer. ES File Explorer (in root mode) only start from the /sdcard/ directory, and doesn't go upper. System's directories are above if I'm right.

Why the hell root explorer tell me that this file (sec_key.kl) is write only protected (why as he is root too, he can't write on the file).
Others in this thread have try this whit rooted G Note XXKKA / CWM without problem, I don't get it... :confused:
 

Tomdroid

Senior Member
Mar 4, 2010
151
13
Great hint, thank you!

Had some trouble getting the sec_key.kl edited though: Root explorer didn't want to edit / save changes / change permissions / create a new file (even on external_sd!). No idea why. My Note is rooted (obviously) and Superuser reports SU granted when I launch RE.

To finally do it I copied the file to the external_sd using RE, edited it using ES, moved it back to system\usr\keylayout (which strangely enough worked) with RE, adjusted the permissions (wich, again, strangely enough now was possible) with RE, rebooted.
 

encik_racun

Senior Member
Apr 10, 2012
906
179
Nice info...but does anyone know how to make menu and back button working but without light?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    This is such a simple (but useful) mod I'm surprised it hasn't been posted.

    If like me you only use the home button to wake the screen, and don't want the power button waking the screen whilst in your pocket or when you try to adjust the volume. This is for you.

    You need to be rooted and need a file manager that supports root (Root Explorer or Root Browser (LITE version works fine)).

    On your phone navigate to system/usr/keylayout
    open sec_key.kl in text editor (you can make a backup if you want by adding .bak to the end of the file name and saving - Root Explorer will do this automatically)
    delete WAKE from either HOME or POWER (not both!)
    save and reboot.
    View attachment 815205
    2
    is it possible to totally disable a button?
    1
    found the solution, using buttonremapper I switched the menu and back button so no need to buy launchkey. now if i accidentally press the right button during using s-memo, it will not activate the back function but menu function, so can easily cancel without the apps closing.

    i saw inside sec_touchkey.kl the parameter Back WAKE, what should I change to make Back button to function as search?

    thanks
    1
    For sake of keeping this post up to date, in the ultimate bean rom you can do it the way it's described in the start post again. The file name just changed to gpio-keys.kl
    1
    This is such a simple (but useful) mod I'm surprised it hasn't been posted.

    If like me you only use the home button to wake the screen, and don't want the power button waking the screen whilst in your pocket or when you try to adjust the volume. This is for you.

    You need to be rooted and need a file manager that supports root (Root Explorer or Root Browser (LITE version works fine)).

    On your phone navigate to system/usr/keylayout
    open sec_key.kl in text editor (you can make a backup if you want by adding .bak to the end of the file name and saving - Root Explorer will do this automatically)
    delete WAKE from either HOME or POWER (not both!)
    save and reboot.
    View attachment 815205

    I know this is an old thread but I just tried this in the sec_key.kl file on Android 4.4.2 (kit kat) on Galaxy S3 and it had no effect after reboot. Anyone have directions for kit kat that work? I don't see a gpio-keys.kl file anywhere. Thanks!