I was really missing being able to trap these hardware keys.
Search button, Back Buttton, Menu Button
Code: Select all
on searchKey
answer "You pressed the searchKey"
end searchKey
on backKey
answer "You pressed the backKey"
if the number of this card is 1 then
pass backKey
else
go to the previous card
end if
end backKey
on menuKey
answer "You pressed the menuKey"
end menuKey
I remapped the phone/button (far left) to be a Search Button
Notes from HDA:
All files related to key mappings are located in /system/usr/keylayout . The qwerty.kl is the one that android is defaulting to if not specified otherwise. There may be some other kl files in the folder, but the vendor specific file is just "left overs" from the ROM rip (in some cases).
Remap Dial Button to be a Search Button
Key 321 CALL WAKE_DROPPED
Key 61 CALL WAKE_DROPPED
to
Key 321 SEARCH
Key 61 SEARCH