[TUTORIAL] "Change the use of your Button G"

Search This thread

nestoor23

Senior Member
Sep 4, 2012
166
42
Hello everyone, I am starting writing in xda but I have some knowledge because I read a lot in HTCMania.
I see that many people dont know what to do with the famous "Button G" of our LG Optimus Black.
Play/Pause
Explanation for GB:
The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''TWL4030_Keypad.kl'' has got to be changed. In the third line beginning for the end, you can see:
key 95 GESTURE
And you have got to write this:
key 95 HEADSETHOOK WAKE_DROPPED

Here you can see a picture of how it has to be:
20121201214134.png


If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
https://www.box.com/s/yb9bjkr542juq0e5f13u

Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.

Explanation for ICS:
The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''TWL4030_Keypad.kl'' (with capital letters, no “twl4030_keypad.kl") has got to be changed. You can see:
key 95 GESTURE
And you have got to write this:
key 95 MEDIA_PLAY_PAUSE WAKE_DROPPED

Here you can see a picture of how it has to be:
screenshot2013012721374.png


If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
https://www.box.com/s/yty2ir4sh0b7kzb8q19d

Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.

Explanation for CM10:
The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''Generic.kl'' has got to be changed. You can see:
key 95 NUMPAD_COMMA
And you have got to write this:
key 95 HEADSETHOOK WAKE_DROPPED

Here you can see a picture of how it has to be:
20130530131001.jpg


If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
https://www.box.com/s/flqy5u3eharedaa7udy2

Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.


Lock/Unlock
Explanation for GB:
(THIS OPTION DOESN'T UNLOCK YOUR PHONE IF YOUR PHONE IS IN DEEP SLEEP)
The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''TWL4030_Keypad.kl'' has got to be changed. In the third line beginning for the end, you can see:
key 95 GESTURE
And you have got to write this:
key 95 POWER WAKE_DROPPED

Here you can see a picture of how it has to be:
20130530150805.jpg


If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
https://www.box.com/s/jexhn14tg24lai40djhm

Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.

Explanation for ICS:
The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''TWL4030_Keypad.kl'' (with capital letters, no “twl4030_keypad.kl") has got to be changed. You can see:
key 95 GESTURE
And you have got to write this:
key 95 POWER WAKE_DROPPED

Here you can see a picture of how it has to be:
20130530150935.jpg


If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
https://www.box.com/s/la4xugjvncgzaax7wnx5

Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.

Explanation for CM10:
The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''Generic.kl'' has got to be changed. You can see:
key 95 NUMPAD_COMMA
And you have got to write this:
key 95 POWER WAKE_DROPPED

Here you can see a picture of how it has to be:
20130530150553.jpg


If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
https://www.box.com/s/ndv0d0m73u8ff4dzz7d3

Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.


Take photos with the Camera
Explanation for GB:
The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''TWL4030_Keypad.kl'' has got to be changed. In the third line beginning for the end, you can see:
key 95 GESTURE
And you have got to write this:
key 95 CAMERA WAKE_DROPPED

Here you can see a picture of how it has to be:
20130530150832.jpg


If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
https://www.box.com/s/yfbn2oo4ityseno398bv

Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.

Explanation for ICS:
The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''TWL4030_Keypad.kl'' (with capital letters, no “twl4030_keypad.kl") has got to be changed. You can see:
key 95 GESTURE
And you have got to write this:
key 95 CAMERA WAKE_DROPPED

Here you can see a picture of how it has to be:
20130530151012.jpg


If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
https://www.box.com/s/jg6emxu0injhyi33eyf9

Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.

Explanation for CM10:
The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''Generic.kl'' has got to be changed. You can see:
key 95 NUMPAD_COMMA
And you have got to write this:
key 95 CAMERA WAKE_DROPPED

Here you can see a picture of how it has to be:
20130530150711.jpg


If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
https://www.box.com/s/l1hornfnp2g5z96c5dds

Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.

Thanks to Jes0411 because he made some zips. Greetings!
 
Last edited:

e1forall

Senior Member
May 22, 2012
148
24
can u explain for ending calls the same tut plzz?

i mean in cm there is option to end call with power button

can that be done with the gesture key?

Please do explain
 

nestoor23

Senior Member
Sep 4, 2012
166
42
can u explain for ending calls the same tut plzz?

i mean in cm there is option to end call with power button

can that be done with the gesture key?

Please do explain

I dont know how to do it, and now I've got to many exams... When I've got free time, I will try to do it.

Sent from my LG Optimus Black (P970) using Tapatalk
 

e1forall

Senior Member
May 22, 2012
148
24
I dont know how to do it, and now I've got to many exams... When I've got free time, I will try to do it.

Sent from my LG Optimus Black (P970) using Tapatalk

yeah.. i also had my examz

i did find it

we have to put
key 95 CALL WAKE_DROPPED

and its done!

we can answer phone calls directly by pressing the gesture key :cool:
 
  • Like
Reactions: nestoor23

L'ancêtre

Member
Jun 26, 2013
10
0
Hey thanx for this realy great thing ^_^
But when I did it, something realy strange happend, so I've set the gesture button to act like the power button, and I use the power button to play/pause musique and it worked really well ;)
And when I long press the power button, it start "Google now" XD
So I wonder, could I change that option if I wanted to, if I can, in which does I have to look
Again thanks (and sorry for my bad English, I am french so it's a bit difficult to me :p )
 

xmilanz

New member
Nov 3, 2012
3
0
Thx for useful post. I successfully used it for mapping G as start call button.
CALL WAKE_DROPPED

Unfortunately I got unexpected backside effect. The G button also runs a call application (several hits call last called number) which is very annoying and unpleasant.
Does anybody knows, how to change a behavior to use G button ONLY to accept call?
 

Maniek8

Member
Sep 15, 2013
13
2
Man, thanks. My G button didn't working when i tried to change its function. But somehow it is good now
 

nestoor23

Senior Member
Sep 4, 2012
166
42
I dont know, I put in the tutorial the most known.

Enviado desde mi LG-P970 usando Tapatalk 2
 

Top Liked Posts

  • There are no posts matching your filters.
  • 17
    Hello everyone, I am starting writing in xda but I have some knowledge because I read a lot in HTCMania.
    I see that many people dont know what to do with the famous "Button G" of our LG Optimus Black.
    Play/Pause
    Explanation for GB:
    The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''TWL4030_Keypad.kl'' has got to be changed. In the third line beginning for the end, you can see:
    key 95 GESTURE
    And you have got to write this:
    key 95 HEADSETHOOK WAKE_DROPPED

    Here you can see a picture of how it has to be:
    20121201214134.png


    If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
    https://www.box.com/s/yb9bjkr542juq0e5f13u

    Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.

    Explanation for ICS:
    The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''TWL4030_Keypad.kl'' (with capital letters, no “twl4030_keypad.kl") has got to be changed. You can see:
    key 95 GESTURE
    And you have got to write this:
    key 95 MEDIA_PLAY_PAUSE WAKE_DROPPED

    Here you can see a picture of how it has to be:
    screenshot2013012721374.png


    If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
    https://www.box.com/s/yty2ir4sh0b7kzb8q19d

    Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.

    Explanation for CM10:
    The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''Generic.kl'' has got to be changed. You can see:
    key 95 NUMPAD_COMMA
    And you have got to write this:
    key 95 HEADSETHOOK WAKE_DROPPED

    Here you can see a picture of how it has to be:
    20130530131001.jpg


    If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
    https://www.box.com/s/flqy5u3eharedaa7udy2

    Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.


    Lock/Unlock
    Explanation for GB:
    (THIS OPTION DOESN'T UNLOCK YOUR PHONE IF YOUR PHONE IS IN DEEP SLEEP)
    The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''TWL4030_Keypad.kl'' has got to be changed. In the third line beginning for the end, you can see:
    key 95 GESTURE
    And you have got to write this:
    key 95 POWER WAKE_DROPPED

    Here you can see a picture of how it has to be:
    20130530150805.jpg


    If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
    https://www.box.com/s/jexhn14tg24lai40djhm

    Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.

    Explanation for ICS:
    The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''TWL4030_Keypad.kl'' (with capital letters, no “twl4030_keypad.kl") has got to be changed. You can see:
    key 95 GESTURE
    And you have got to write this:
    key 95 POWER WAKE_DROPPED

    Here you can see a picture of how it has to be:
    20130530150935.jpg


    If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
    https://www.box.com/s/la4xugjvncgzaax7wnx5

    Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.

    Explanation for CM10:
    The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''Generic.kl'' has got to be changed. You can see:
    key 95 NUMPAD_COMMA
    And you have got to write this:
    key 95 POWER WAKE_DROPPED

    Here you can see a picture of how it has to be:
    20130530150553.jpg


    If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
    https://www.box.com/s/ndv0d0m73u8ff4dzz7d3

    Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.


    Take photos with the Camera
    Explanation for GB:
    The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''TWL4030_Keypad.kl'' has got to be changed. In the third line beginning for the end, you can see:
    key 95 GESTURE
    And you have got to write this:
    key 95 CAMERA WAKE_DROPPED

    Here you can see a picture of how it has to be:
    20130530150832.jpg


    If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
    https://www.box.com/s/yfbn2oo4ityseno398bv

    Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.

    Explanation for ICS:
    The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''TWL4030_Keypad.kl'' (with capital letters, no “twl4030_keypad.kl") has got to be changed. You can see:
    key 95 GESTURE
    And you have got to write this:
    key 95 CAMERA WAKE_DROPPED

    Here you can see a picture of how it has to be:
    20130530151012.jpg


    If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
    https://www.box.com/s/jg6emxu0injhyi33eyf9

    Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.

    Explanation for CM10:
    The file that you have got to modify is in the next directory: /system/usr/keylayout. The file ''Generic.kl'' has got to be changed. You can see:
    key 95 NUMPAD_COMMA
    And you have got to write this:
    key 95 CAMERA WAKE_DROPPED

    Here you can see a picture of how it has to be:
    20130530150711.jpg


    If you dont want to change it by yourself, here is the zip that you have got to flash in CWM (make a backup for any thing):
    https://www.box.com/s/l1hornfnp2g5z96c5dds

    Warning! If you choose to do it by yourself (manually), you have goto to reboot your phone to see the change.

    Thanks to Jes0411 because he made some zips. Greetings!
    3
    where can i find a list of functions to remap this G key?

    http://source.android.com/devices/tech/input/keyboard-devices.html#keyboard-classification

    Check this section: HID Keyboard and Keypad Page (0x07)
    In the column Android Key Code Name, it is KEYCODE_<function>.

    For an example,

    KEYCODE_POWER
    1
    Waiting your comments!

    Good post.

    If you can, post how to remap the "G"/"search button" for other functions, like "lock/unlock", "app switch"
    1
    does your explanation for CM10 also work for CM10.1?
    1
    :crying:
    HI DEV...nyc work..as i have written my power button is broken...so plz if u can give me steps to remap my "G" key to takeover all the functions of power button...
    thnx in advance:good:

    Read the first post, you will find the steps.

    Enviado desde mi Nexus 5 mediante Tapatalk