messed with keylayout (.KL) files now my hardkeys wont work

pattk01

New member
Apr 24, 2013
2
0
0
Visit site
hello,

Motorola Triumph
CM7 android 2.3.7

i began this with the intention of mapping a volume key as a power button on my Motorola triumph as my power key has began to fail. i did successfully get it to work as intended, then i got curious....

i attempted to map the "search" touch key as my power button. in retrospect this was a foolish move because i do not fully understand what each .kl file does. i got the "volume up (key 115)" key to act as the new power key by replacing the entries in each file where i saw:

"key 115 VOLUME_UP WAKE_DROPPED"
to
"key 115 POWER WAKE"

that seemed to go as suspected, however when i did the same thing to all the "search (key 217)" entries

"key 217 SEARCH WAKE_DROPPED"
to
"key 217 POWER WAKE"

i overwrote the whole "keylayout" folder under "/system/usr/keylayout" (all .kl files present only edited)

after i rebooted i noticed that none of my hard keys worked at all. (vol. up/down, pwr, and the menu keys) i was a bit panicked as i had no way to navigate. i then installed "button savior" which acts as touch physical keys. i can navigate now, and i immediately tried restoring a backup i made of the whole "keylayout" folder.

upon restart i still have unresponsive hard keys after the ROM is booted. is there something i am missing? do i have to shut down a special way or re register the .KL files somehow?

i am really trying to avoid a reinstall of CM7 as i only made a backup of the fresh ROM

here is the guide i mimicked:

http://androidforums.com/transform-...unction-retask-hardware-keys-such-search.html


I'm very new to tinkering with phones and would appreciate any advice.
 
Last edited:

pattk01

New member
Apr 24, 2013
2
0
0
Visit site
OK i got my buttons back!

in CWM i went to "mounts and storage" and formatted both the cache and system

i then wiped the cache partition and cleared the dalvik cache, also the battery stats

after the wipe i reinstalled cm7 and the Google apps over my existing data.

all my settings and customizations were retained the only thing i had to do was re add my corporate account and add my gmail back to the mail app.

everything seems to be fixed thanks, both of you i really appreciate the guidance. i really enjoy working with smartphones it reminds me of when i got into fixing windows computers

cheers!
 

Forum statistics

Threads
943,150
Messages
6,917,531
Members
3,158,850
Latest member
kerokekerol