77 pagesV  1 2 3 4 5 6 > »  
 
REPLY
> Reassigning the functions of buttons on android devices
deym
Message#1
21.12.12, 23:11
Guru
*********
[offline]

Group: Friendssavagemessiahzine.com
Messages 3708
Check in: 22.12.15
Xiaomi Redmi Note 5 3/32

Reputation:-  365  +

Reassigning the functions of buttons on android devices

Foreword
Since there is no such topic, and the information on this issue is scattered in small parts on various forum topics I decided to create this topic with general instructions.
All actions require root.
We will work with files located in system \ usr \ keylayout

Let us dwell on the files that need to be edited (this is perhaps the most difficult stage):
The file name depends on the manufacturer, model and firmware version, but as I noticed there is the following trend: up to Android 2.3.5 inclusive, the name of the file we need was formed as follows *** - keypad.kl (or *** - kpd.kl ), where *** is the factory name of your model.

    Examples known to me:
  • Gigabyte Gsmart G1310 - qrd-keypad.kl
  • Gigabyte Gsmart G1355 - msm7627_sku5_keypad.kl
  • LG P500 Optimus One - thunder_keypad.kl
  • LG E405 Optimus L3 Dual - surf_keypad.kl and 7x27a_kp.kl
  • LG E730 Optimus Sol - victor-keypad.kl (touch-keypad.kl)
  • LG GT450 - swift.kl (not sure, but people are writing)
  • HTC Hero - heroc-keypad.kl
  • HTC Desire - bravo-keypad.kl
  • HTC Explorer - pico-keypad.kl
  • HTC Desire S - saga-keypad.kl
  • HTC Desire HD - spade-keypad.kl
  • HTC Sensation - pyramid-keypad.kl
  • Samsung Galaxy S I9000 - melfas-touchkey.kl and s3c-keypad.kl
  • SE Live with Walkman - pm8058-keypad.kl and msm_pmic_pwr_key.kl (in the second file, only the power button)
  • Sony Ericsson Xperia X8 - shakira-keypad.kl
  • Sony Ericsson Xperia X10 - es2009ra_keypad.kl
  • Star A2000 / A2000 GPS - MT6516-kpd.kl and QWERTY.kl
    * - it is planned to fill the list with your help, if there are any comments please indicate.

    Since 4.0.3 everything has changed, I can say that for HTC the second part of the file has become a touchscreen.
    Examples known to me:
  • Sony LT22i Xperia P - so34-buttons.kl (3 bottom buttons), ux500-ske-keypad.kl (side buttons)
  • HTC ONE V - atmel-touchscreen.kl (3 bottom buttons), primou-keypad.kl (side buttons)
  • HTC Desire S - atmel-touchscreen.kl (4 bottom buttons), saga-keypad.kl (side buttons)
  • HTC Sensation - cy8c-touchscreen.kl (4 bottom buttons), pyramid-keypad.kl (side buttons)
  • Samsung i9250 Galaxy Nexus (android 4.2.1), most likely sii9234_rcp.kl
    * - it is planned to fill the list with your help, if there are any comments please indicate.

    Wired headset button files usually look like:
  • 7k_headset.kl
  • h2w_headset.kl
Button codes
Phone
key 116 POWER
key 102 HOME
key 139 MENU
key 158 BACK
key 217 SEARCH
key 212 CAMERA
key 114 VOLUME_DOWN
key 115 VOLUME_UP
Key 231 CALL
key 107 ENDCALL
key 249 APP_SWITH
Headset buttons
key 107 ENDCALL
key 113 MUTE
key 114 VOLUME_DOWN
key 115 VOLUME_UP
key 163 MEDIA_NEXT
key 164 MEDIA_PLAY_PAUSE
key 165 MEDIA_PREVIOUS
key 226 HEADSETHOOK
key 231 CALL
Bluetooth headset
key 200 MEDIA_PLAY_PAUSE
key 201 MEDIA_PLAY_PAUSE
key 166 MEDIA_STOP
key 163 MEDIA_NEXT
key 165 MEDIA_PREVIOUS
key 168 MEDIA_REWIND
key 208 MEDIA_FAST_FORWARD

Almost all button codes that can be written in * .kl
Feature Description
  • POWER - lock / unlock
  • HOME - return to the main screen
  • MENU - menu call
  • BACK - return to the previous action
  • SEARCH - search call
  • VOLUME_DOWN - lower volume
  • VOLUME_UP - Volume Up
  • CALL - call Phone.apk (allows you to answer a call)
  • ENDCALL - call completion
  • CAMERA - call Camera.apk
  • FOCUS - autofocus
  • DPAD_CENTER - the cursor (touch) in the center
  • DPAD_UP - cursor (touch) up *
  • DPAD_DOWN - cursor (touch) down *
    * - setting these values ​​to the buttons 115 and 114, respectively, allows you to scroll through the texts or the browser page with the volume buttons.
  • DPAD_LEFT - cursor (touch) to the left
  • DPAD_RIGHT - cursor (touch) to the right
  • MUTE - turn off the sound of music without stopping the track
  • MEDIA_NEXT - the next track
  • MEDIA_PLAY_PAUSE - play / pause
  • MEDIA_STOP - stop track
  • MEDIA_PREVIOUS - previous track
  • MEDIA_REWIND - Rewind
  • MEDIA_FAST_FORWARD - speed up playback
  • HEADSETHOOK - headset button - allows you to answer calls, hang up and control the player
  • GRAVE -?
  • APP_SWITCH (RECENT_APP) - a call to the Recent panel with the ability to switch between applications (or a call to the application manager, depending on the firmware.

    You should also pay attention to such additional parameters as:
  • WAKE
  • WAKE_DROPPED
    If it costs WAKE, then after pressing in sleep mode, the smart will “wake up” and perform the action, and with WAKE_DROPPED it will simply “wake up” without transferring the button code to the button.
Definition of button codes
  • If you have a custom recovey (and most likely you have one), then in the advanced tab you can use the key test function.
  • KeynrTracker software.Attached fileKeynrTracker.apk(8.32 KB)

  • Keycode CheckerAttached fileKeycodeChecker.apk(10.3 KB)

Ways to Edit Files
  • The easiest way. It consists in editing the necessary files directly in the keylayout folder, for this we use ES Explorer (RootExplorer, Total Commander, well, or something to your taste (I use ES Explorer and advise you)): open - change the required values ​​- close with saving changes - reboot the device. At the same time, a file ****. Kl.bak will be created in the keylayout folder in which the original value of the file that you modified will be saved. You can also edit a copy of the file on the SD card or PC, and then paste it with a replacement in the keylayout. (Checked)

  • Program Easy Android Tools (EAT). The program allows you to connect your phone via a USB cable or via WiFi. After connecting and recognizing the phone program in the right window, you will see the contents of the internal memory of the phone. Go to the necessary system / usr / keylayout, find the file you need, edit it in the EAT Editor (F4), save the changes, reload the smart and ready. (The program implies the presence on your PC of USB drivers for your device (they can be found on the official website of the program), and HTC Syns for HTC)
    Attached fileEAT_1.3.1.RUS.Setup.exe(1.78 MB)


  • For this method, we need Android SDK tools, knowledge of the exact name of the file that we need to change (you can see through ES Explorer, etc., etc.)
    In the command line, go to the folder with the Android SDK tools (I have C: \ Android), then do the following. (You must have USB drivers for your device)
    adb remount
    adb pull system / usr / keylayout / ***. lk ***. kl

    where *** is the name of your file.
    After that, the file will appear in the folder with the Android SDK tools, and you can edit it. The easiest way to do this is with Notepad, but you can do anything, the main thing for saving is not to change the file extension.
    To return the file, do the following:
    adb remount
    adb push ***. kl system / usr / keylayout

    We overload the device and it's ready.Attached fileAndroid.zip(572.31 KB)
    (Verified)

  • It consists in editing a file on a PC, and creating a zip archive for firmware via recovey, an example of such an archive for HTC Desire S is attached, but here you need the skills to write an updater-script file.Attached fileRecent_Apps_on_Search_for_Desire_S.zip(252.14 KB)
    (Verified)
Programs
  • ButtonRemapper- allows you to reassign buttons, but does not work correctly on many devices, especially with android 4.0.3 and higher. More developer is not supported. It should be noted that in the topic on this application a lot of information on the manual reassignment of buttons.
  • ButtonRemapper Galaxy TabAttached fileTab_ButtonRemapper_v1.1.apk(67.09 KB)

  • ButtonRemapper Galaxy SAttached fileButtonRemapper_Galaxy_S.apk(72.76 KB)

  • Headset Button Controller- Manage your music player and other phone features with a wired headset.
  • DreamKeys- a program for reassigning phone buttons, the idea is to intercept press commands and assign other actions to them, root is not needed (setting for a long press is possible).
  • Button shortcut- Assign programs to the buttons "Camera" or "Search"
Instructions


Post has been editeddeym - 11.09.18, 12:27
Katran73
Message#2
25.12.12, 21:13
Old resident
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 1063
Check in: 12.08.12
LG G3 Stylus

Reputation:-  287  +

It is planned to fill the list with your help.

LG E405Optimus L3 Dual (Android 2.3.6) -surf_keypad.kland 7x27a_kp.kl. In addition to them, there are 2 more standard headset files and one player.

No tricks could make sure that the smart screen is activated from the volume buttons.
Not the substitution of WAKE 115 VOLUME_UP and 114 VOLUME_DOWN, nor even the replacement of the 115th and 114th with POWER WAKE. In both files.

Button Remapper generally sees only one h2w_headset.kl.


Along the way, Sony Ericsson LWW - pm8058-keypad.kl (Sony Ericsson Live with Walkman - Discussion )

Post has been editedKatran73 - 26.12.12, 07:19


--------------------
Samsung Note II,LG L90 D410, LG G3 Stylus D690, LG Magna H502F,LG G4 Stylus H630D, LG Q6a.
prosto_jin
Message#3
26.12.12, 11:02
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 84
Check in: 01.05.12
Sony Xperia E4 Dual

Reputation:-  49  +

Katran73,The questions are of course simple, but still: Do the permissions on the files being edited have the appropriate permissions (read / write), did they overload the phone after each edit? But in general, I met a complaint from the owner of LG that the wake-up from the volume buttons is not configured, maybe it's in the LG UI shell, but you can try putting WAKE in all the files where 115 VOLUME_UP and 114 VOLUME_DOWN meet, the original files are saved
Katran73
Message#4
26.12.12, 12:30
Old resident
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 1063
Check in: 12.08.12
LG G3 Stylus

Reputation:-  287  +

prosto_jinNaturally, file permissions, reloads and so on.
Even in headset files (h2w_headset.kl, which BR saw, and 7k_headset.kl) added additional lines of the 114th and 115th buttons with both WAKE and WAKE_DROPPED (just in case) - no results.
The only thing - did not experiment with the files AVRCP.kl and qwerty.kl (there is a loud wake), but it is not necessary.
Replacing 114/115 with POWER WAKE also doesn’t work - on a locked wake, only the power button works, the volume buttons only control the volume.

Apparently, really the whole thing in the LG UI lockscreen.

P.S .: I didn’t want to put an additional locker into the system just for the purpose of sometimes highlighting the screen with the volume key.

Post has been editedKatran73 - 26.12.12, 12:53


--------------------
Samsung Note II,LG L90 D410, LG G3 Stylus D690, LG Magna H502F,LG G4 Stylus H630D, LG Q6a.
skunsofob
Message#5
26.12.12, 17:50
Guru
*********
[offline]

Group: Friendssavagemessiahzine.com
Messages 4896
Check in: 10.09.10
Samsung Galaxy Note 3 SM-N900

Reputation:-  836  +

with WAKE_DROPPED, it will simply “wake up”, without passing the button code to thelnenie.
Typo ...
As far as I know, this parameter not only "wakes up" the device, i.e. Includes screen, but also unlocks. At least my experience speaks of this.
if you have firmware with HTC Sens then these two parameters will most likely not affect in any way

I have on Sense that Wake, that Wake_Dropped only turned on the screen. Unlocking did not occur.
WITHfoulBlueTooth headset did not exercise.

Perhaps missing a letter?
prosto_jin,Well done, that such a theme created! It was long overdue. I signed up, I will follow.
Katran73
Message#6
26.12.12, 21:09
Old resident
*******
[offline]

Group: Friendssavagemessiahzine.com
Messages 1063
Check in: 12.08.12
LG G3 Stylus

Reputation:-  287  +

There is a description of keylayouts -http://source.android.com/tech/input/key-layout-files.html

And in particular, Wake Keys work differently on different firmware / devices.

WAKE: it is the key when it is asleep. For historical reasons, this flag behaves in the same manner as WAKE_DROPPED below.
The wake-up pid is encountered when the wake-up occurs. The key is not processed.


prosto_jinI think, under the spoiler of the "Program", it is worth mentioning between the cases that in the subject® ButtonRemapperThere is a lot of useful information on this topic.

PS: Thank you for the topic. In the black. Hope will develop.

Post has been editedKatran73 - 26.12.12, 21:17


--------------------
Samsung Note II,LG L90 D410, LG G3 Stylus D690, LG Magna H502F,LG G4 Stylus H630D, LG Q6a.
DeniSSXRus
Message#7
28.12.12, 19:17
Old resident
*******
[online]

Group: Curators
Messages 873
Check in: 10.03.12
LG G5

Reputation:-  93  +

on Gigabyte Gsmart G1310 file with buttons is qrd-keypad.kl
There is a special button with the code 213 - causes a list of recent applications (how to hold down the home button). the function is not registered as APP_SWITCH, but as RECENT_APP

Post has been editedDeniSSXRus - 28.12.12, 19:33


--------------------
GigabyteGSmart G1310 Ray =>LGOptimus Sol E730 =>LGOptimus G E970 =>LGG2 F320L =>LGG5 H850EUR
valeri4v
Message#8
30.12.12, 11:18
Novice
***
[offline]

Group: Active users
Messages 45
Check in: 17.01.11
Samsung Galaxy Note 4 SM-N910H

Reputation:-  0  +

And how to reassign the buttonsearchmenu function or launch the application by long pressing?

Post has been editedvaleri4v - 30.12.12, 11:35
prosto_jin
Message#9
30.12.12, 14:30
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 84
Check in: 01.05.12
Sony Xperia E4 Dual

Reputation:-  49  +

valeri4vThis method can not be assigned to a long press and call applications. You need to use the program from the header.DreamKeys
labazov91
Message#10
02.01.13, 00:25
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 70
Check in: 13.01.11
Samsung Galaxy Note 5 SM-N920C

Reputation:-  3  +

Hello! Help to return the standard value of the home button on the galaxy s2. (call the latest applications). Now is the firmware VK 6.4. Android 4.1.2. And the action of this button on the killing of an open application is changed on it. : thank_you:


--------------------
Samsung Galaxy Note 5
skunsofob
Message#11
02.01.13, 07:39
Guru
*********
[offline]

Group: Friendssavagemessiahzine.com
Messages 4896
Check in: 10.09.10
Samsung Galaxy Note 3 SM-N900

Reputation:-  836  +

Help return the default button value

So this is for you to tweak your firmware settings.
labazov91
Message#12
02.01.13, 18:22
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 70
Check in: 13.01.11
Samsung Galaxy Note 5 SM-N920C

Reputation:-  3  +

And do not tell me what is responsible for this? Which file? If I install the VC theme for this firmware, the value returns to the original one. Maybe something needs to be pulled out of this topic and installed or replaced?


--------------------
Samsung Galaxy Note 5
skunsofob
Message#13
02.01.13, 18:34
Guru
*********
[offline]

Group: Friendssavagemessiahzine.com
Messages 4896
Check in: 10.09.10
Samsung Galaxy Note 3 SM-N900

Reputation:-  836  +

labazov91,Do you have papameters in the firmware settings that are responsible for reassigning the keys? If there is, then look there. If this is not, then put the file here, where your keys are registered (in the header it is described where it is). Let's see what and how to fix it.
labazov91
Message#14
02.01.13, 18:55
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 70
Check in: 13.01.11
Samsung Galaxy Note 5 SM-N920C

Reputation:-  3  +

I think this is the file ...

Attached files

Attached filesii9234_rcp.doc(12.5 KB)


--------------------
Samsung Galaxy Note 5
skunsofob
Message#15
02.01.13, 19:40
Guru
*********
[offline]

Group: Friendssavagemessiahzine.com
Messages 4896
Check in: 10.09.10
Samsung Galaxy Note 3 SM-N900

Reputation:-  836  +

Labazov91 @ 01/02/2013, 23:55*
I think this is the file ...

Does not look like it...
Look in the same folder. Must be a string
key 102

It is necessary to make it look like this:
key 102 HOME

These are my assumptions, because I do not own your device. Before editing backup is required!
labazov91
Message#16
02.01.13, 20:03
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 70
Check in: 13.01.11
Samsung Galaxy Note 5 SM-N920C

Reputation:-  3  +

In one found changed. But nothing ... and in another file home has already been written. I thought maybe in the theme for the firmware to look for some file and replace it?


--------------------
Samsung Galaxy Note 5
labazov91
Message#17
02.01.13, 20:15
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 70
Check in: 13.01.11
Samsung Galaxy Note 5 SM-N920C

Reputation:-  3  +

I tried to completely replace the entire folder from another firmware, but without results. Yes, and comparing them, it turned out that they are identical. And the files are all the same. What else can be responsible for the action of this button? I will describe the process, maybe it will push something. When any application is open, I press and hold the home button, the application closes and in a small window it says vk-killed and the name of the application. And on other firmware with such actions shows previously opened applications.


--------------------
Samsung Galaxy Note 5
skunsofob
Message#18
02.01.13, 20:18
Guru
*********
[offline]

Group: Friendssavagemessiahzine.com
Messages 4896
Check in: 10.09.10
Samsung Galaxy Note 3 SM-N900

Reputation:-  836  +

labazov91 @ 01/03/2013, 01:03*
But nothing...

Did the device restart?

Posted 02/01/2013, 20:18:

labazov91 @ 01/03/2013, 01:15*
And on other firmware with such actions shows previously opened applications.

I have already said, look for settings in your firmware. If you do not know exactly where to dig, then you just need to ask in the firmware branch.

Post has been editedskunsofob - 02.01.13, 20:19
labazov91
Message#19
02.01.13, 20:23
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 70
Check in: 13.01.11
Samsung Galaxy Note 5 SM-N920C

Reputation:-  3  +

Yes, I rebooted.
The firmware is based on the official one and there are no additional settings.


--------------------
Samsung Galaxy Note 5
prosto_jin
Message#20
02.01.13, 23:21
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 84
Check in: 01.05.12
Sony Xperia E4 Dual

Reputation:-  49  +

labazov91,Did not quite understand, the action is performed by a long press, or short? If for short, here is the keylayout folder from the Galaxy S II stock firmware Android 4.0.3 (4) (I won’t say exactly now)Attached filekeylayout.zip(17.76 KB)
see if the home button values ​​match everywhere
If for a long press everything is much more complicated here is the topic on xdahttp://forum.xda-developers.com/showthread.php?t=1450138By reassigning the search button to the "application manager", but this is provided that the firmware is not deodexed, if you have java programming skills, then you can figure it out, but the link to the post for deodexed firmwarehttp://forum.xda-developers.com/showpost.p...mp;postcount=40, but there it is still necessary to disassemble your android.policy.jar and edit the values, I personally did not succeed in it ....
Good luck in your search for truth!
ZY: perhaps the launcher intercepts commands from the buttons, but then I did not dig ...
labazov91
Message#21
03.01.13, 01:01
User
****
[offline]

Group: Friendssavagemessiahzine.com
Messages 70
Check in: 13.01.11
Samsung Galaxy Note 5 SM-N920C

Reputation:-  3  +

Thank you so much for the answers! : thank_you: we will understand ...


--------------------
Samsung Galaxy Note 5

77 pagesV  1 2 3 4 5 6 > » 


 mobile version    Now: 05/01/19 13:12