[Guide] Change the user buttons to home and back - G2 and Desire Z Android Development

I was looking to change the user configurable buttons on my Desire Z but couldn't find a easy guide or simple solution. I started to experiment a bit. This is what I found out:
To change the layout you only need to things:
1. a rooted phone
2. A program like Root explorer with R/W permissions
Then do the following:
Go to system/usr/keylayout and open the file for the layout you are using in a text editor (in my case this was the WWE version)
I then changed 'user 1' to 'HOME' and 'user 2' to 'BACK'.
I did a soft reset and I now use the user 1 button to go to the home screen and the user 2 button to go back
note: This guide is problably written a 1000 times but I couldn't find it so I hope it's my first real (small) contribution
Grtz
___________

Thanks for the guide! And actually, this method can provide some neat tricks!
For example, I personally never use the search button. So instead, I can change the Search key to USER1 and now the search key is a User-Assignable button!
EDIT: It appears that the Search hardware key and the Search touchkey have different key mapping ID. But the virtual Search touchkey doesn't seem to be listed in keylayout at all. Weird.

There's an app for that
Also, AFAIK it should be possible to remap the capacitive search button.

Sh4d0w940 said:
There's an app for that
Also, AFAIK it should be possible to remap the capacitive search button.
Click to expand...
Click to collapse
The capacitive search button is 217, which is the same as the hardware search button. But my hardware button is doing what I assigned it, while my capacitive one is not doing anything.
It's either not linking, or my phone's capacitive search button is broken.

How can I make the search key to open recent app (the one where u hold home key and come out a recent app)? Thx
Sent from my HTC Vision using XDA

Steven How said:
How can I make the search key to open recent app (the one where u hold home key and come out a recent app)? Thx
Sent from my HTC Vision using XDA
Click to expand...
Click to collapse
I think it's a bit more difficult, you should look in Andromadus thread where someone did it, there's a zip to download...
edit: here http://forum.xda-developers.com/showthread.php?t=1516942 the zip is attached, don't know if it works with every rom, surely with andromadus, but we are OT, sorry.

virtualflyer said:
I think it's a bit more difficult, you should look in Andromadus thread where someone did it, there's a zip to download...
edit: here http://forum.xda-developers.com/showthread.php?t=1516942 the zip is attached, don't know if it works with every rom, surely with andromadus, but we are OT, sorry.
Click to expand...
Click to collapse
Well,it send my device to bootlop.. =\
Sent from my HTC Vision using XDA

Why didnt i think about this sooner :O going to try this right now =D

Related

[Q] Remapping the trackpad

Hi, I was wondering if I could remap the trackpad button on my Droid Incredible to the home button. Kind of like how if you press the center button on the iPhone, it goes back to the home screen. Is this possible? and I do not want to flash another ROM. Thanks.
Uhm, this phone already has a "home" button.....
mmmark111 said:
Uhm, this phone already has a "home" button.....
Click to expand...
Click to collapse
can't we just answer the question? sometimes ppl. I would assume if he has a dinc he knows about the home shaped icon under the screen there, with that said I've never seen this question asked b4 but would assume no bcuz of already in place "home" button
Sent from my ADR6300 using XDA App
I know there is a button, but I want to use the track pad button for the same function.
I think this would be useful as well.
JC
Look at the Optical joy stick wake thread. It's in the keymap file somewhere. I don't know what all you can remap it too but I know they remapped it to wake the device (though inconstantly but thats a sleeping problem)
Just a thought, but would you not loose all of the intended functionality as a result of doing this? For instance, how would you take a picture or record a video?
I have ruby rom so there already is a record button or camera button on the screen itself so it's not a problem.
-steve
Redemption rom use to have a tweak that let you hold down the search button key and it would start the camera application. This was done by editing the incredible-keypad.kl file in /system/usr/keylayout and changing the line "key 217 SEARCH WAKE_DROPPED" to "key 217 CAMERA WAKE_DROPED" i figure you could add a line "key 232 HOME WAKE_DROPPED" and get the home to open when the trackpad was pressed, but that didn't worked.
I've been trying to remap my trackpad to camera since I rooted my phone and still can't get the working. I hope this thread will spread some light on how to properly remap the DPAD_CENTER button.
stevethekorean said:
I have ruby rom so there already is a record button or camera button on the screen itself so it's not a problem.
-steve
Click to expand...
Click to collapse
Those two aplications remove the need for the trackpad button, however its usefulness doesn't end.there. the.ability to.scroll through text to edit without endlessly, 'push and pray' u get it in the right spot I would.imagine would get lost as well. The trackpad also can seek in some flash players too.
Sent from my ADR6300 using XDA App
Okay. So this is not possible at all? Because i can edit text by zooming in on the website...
-steve
It doesn't seem to be possible... or if anyone has figured out how they don't want to share. Editing the kl files doesn't work like it does for other hardware buttons. Here's my thread asking the same thing:
[Q] Can't remap optical joystick?
would this be possible
if you were to look at the file text for the real home key maybe if you copy-pasted that txt into your trackpad txt file it would do the same function .......just a thought

[MOD] - Sleep Mods to compliment Trackpad Wake Mod *UPDATED Sense/Vanilla versions

[Info]:
My only gripe about the trackpad wake mod (while it is awesome), is that we do it in order to avoid reaching for the awkwardly placed power button, but then we still have to reach for it anyway when we want to shut the screen back off. So it only helps us for half of the task.
After trying to find a way to directly map the search soft-key (or any of the soft-keys) to a power button, and failing, I've decided to come at it from a different angle. Attached you'll find a very simple app, that simply turns off the screen when clicked, along with instructions on how to map it to the search soft-key or the rosie button for sense users.
[Options]:
1. Search key short press. This is the method I use, as it is both the fastest and accessible from within any app. It will completely replace the search key. Single-tap it at anytime to turn off the screen. You'll need to install the app, and push the keyboard remapping file that I have also attached. Note that there are 2 different key mapping files, one for Sense ROMs and another for Vanilla. They will make the following changes:
Sense version:
-Search soft-key is now mapped to the user programmable key #2. Set it to open the Kill Screen app.
-www/com key is now TAB.
-USER 3 key, which didn't work anyway, is now BACK.
-USER 2 key, which is now not needed, is HOME.
-USER 1 key (left of the space bar) is left as normal.
Vanilla version:
-Search soft-key is now mapped to the user programmable key #3. Set it to open the Kill Screen app.
-USER 3 key, which is now not needed, is now BACK.
-USER 1 and USER 2 are left as normal.​
2. Rosie's right button. This is for those who want to keep the search key as normal. See my rosie remap thread here for the option to have it launch when you press the right dock button. Keep in mind you still need to install the app, and you'll (obviously) have to be viewing one of the home screens to press it.
NOTICE: Do not post asking me to adapt this key layout to your needs, as we will end up with 500 different files before long. Instead, change it yourself! Editing this file is about as easy as it gets. You don't need anything special installed, or any programing experience whatsoever. Simply open the attached (or your own) vision-keypad.kl in any text editor (Notepad, Notepad++, etc) and change your desired key to your desired function. If you want to know what key corresponds to what number, you can boot to clockworkmod recovery --> advanced --> key test. Touch any key on the phone, and it spits out the number.
NOTICE #2: As with any app that is given administrator permissions, you will need to remove the app from the admin list in order to uninstall it. Menu --> Settings --> Security --> Select Device Administrators --> Uncheck Kill Screen. Then uninstall as normal. You will be reminded to do this when you first give the app the admin permissions.
[How To]:
Method 1 - Install the app, then grab a copy of the modified key layout and then reboot to recovery and enter this code:
adb shell mount /system
adb shell rm /system/usr/keylayout/vision-keypad.kl
adb push [your saved file location]\keypad_owamod_xxxxx.kl.zip /system/usr/keylayout/vision-keypad.kl
Reboot and enjoy.​Method 2 - Install the app first, then see the linked thread for how to get the modified rosie.apk
That's pretty awesome Will definatley try out when I get a Z
Great news but something like that exists already for a few monts:
http://forum.xda-developers.com/showthread.php?t=795811
I used it on the Nexus One and now on the Desire Z.
Works great! Thanks a lot!!
g4rb4g3 said:
Great news but something like that exists already for a few monts:
http://forum.xda-developers.com/showthread.php?t=795811
I used it on the Nexus One and now on the Desire Z.
Click to expand...
Click to collapse
Not quite.
You should read the whole post, people fail to do so far too often on this forum. Of course the app exists, there are multiple versions, both pay and free, on the android market and floating around the forums.
What does not exist, is the remapped key file to make the app launch with a short press of the search key (method #1) and the remapped rosie buttons to launch the app from the right dock button (method #2).
The only method I really cared about is the short-press search button (method #1), which completely replaces the search button, so that it functions to turn off the screen (like it should have been from the factory) like the G1. This also allows it to work while the screen is still locked, so you can single press the trackpad, check the time/messages/missed call, then turn the screen back off without ever unlocking it! But I made this mod and guide, so that you have THREE options: the long-press method (like the one that you linked to) AND two NEW ways.
Using all of the default files while running CM 6.1.1 Colourized, I can get my DZ to sleep only by long-pressing the Search button, not a short-press.
I checked the .kl file and confirmed the USER2 key is 217 and that matches my Key Test number in Recovery.
A short-press of my Search button doesn't do anything.
I've set KillScreen as the default app for the long-press and it works as it should, but I'd like to leave that as a Search (Vlingo) button and have a short-press go directly to KillScreen.
Suggestions?
I tried the Rosie_killscreen.apk , it installs ok i get the little power icon on my Rosie launcher bar but when I press it, it doesn't do anything, I tried to re-download the file in case it was corrupt and re-install it but the same thing happens, nothing. I installed the Rosie_contacts.apk and it work fine but can get the Rosie_killscreen.apk to work. Has anyone gotten the Rosie_killscreen.apk to work?
EDIT- My fault forgot to install the main app..... Sorry, let me try this again.
Update: The app works great on the Rosie_launcher, Just a reminder to install the KillScreen.apk first, then follow the process for pushing the app to the Rosie launcher.
I like this very much!! I have Launcher Pro Paid and I have set it up as one of my swipe options on the dock.
I use cm6.1.1 lockscreen gestures and the "screen off and lock" app. I setup a gesture of "L" and link the gesture to the "screen off and lock" app so when I am on the lockscreen and do a "L" gesture and it shuts off the screen. I also have it set as a shortcut in the dock for adw launcher too so I can lock/screen off just by pressing it. So far it works great.
B73C said:
Using all of the default files while running CM 6.1.1 Colourized, I can get my DZ to sleep only by long-pressing the Search button, not a short-press.
I checked the .kl file and confirmed the USER2 key is 217 and that matches my Key Test number in Recovery.
A short-press of my Search button doesn't do anything.
I've set KillScreen as the default app for the long-press and it works as it should, but I'd like to leave that as a Search (Vlingo) button and have a short-press go directly to KillScreen.
Suggestions?
Click to expand...
Click to collapse
I'm not really sure what the issue is. If you choose the method where Kill Screen acts as the short-press search, you will not have a long press function anymore.
I'm experiencing a problem with the long press method where the screen turns off for a second but immediately turns back on to the lock screen. Manually launching the app shuts off the screen properly. Anyone else getting this?
I am having problems downloading the 2 .zip files
I use the one called "Lock Screen Button" in the market. It's simple and the icon is very clean.
cyricc said:
I'm experiencing a problem with the long press method where the screen turns off for a second but immediately turns back on to the lock screen. Manually launching the app shuts off the screen properly. Anyone else getting this?
Click to expand...
Click to collapse
After a bit of testing I'm pretty sure this has something to do with the capacitive buttons remaining active for a very brief time after the screen shuts off: since the search button is held while the kill screen action runs, it immediately triggers wake. Pressing the power button while holding down any of the capacitive buttons has the same effect (screen turns off then back on to lock screen).
I'm guessing this can be fixed by adding a delay to turning the screen off. Or by setting the capacitive buttons to not wake the screen somehow.
Can't uninstall kill screen app
I installed the KillScreen.apk, however if I try to uninstall the app via the manage applications I get "Uninstall not succesful" and app is still in my applications list.
How can i permanently remove the KillScreen.apk?
As for the app not working properly with the long-press method, you are right, it seems to be bugging. I will take a look and hopefully get a new version up soon. The other two methods work ok, but I don't use that method, so I didn't do enough testing
LQT said:
I installed the KillScreen.apk, however if I try to uninstall the app via the manage applications I get "Uninstall not succesful" and app is still in my applications list.
How can i permanently remove the KillScreen.apk?
Click to expand...
Click to collapse
This is the second time in one thread I've had to quote someone and tell them to READ. Do they not teach you kids to read in school anymore? READ PEOPLE. You are working with rooted phones in a programming development forums, you SHOULD have some smarts to you.
Since you missed the "--WARNING!!!!---:READ:---WARNING!!!!--" text in all caps across the whole screen when you first gave the app permission, allow me to take my time to type it again for you: You need to remove ANY app that has been given administrator permissions from the admin permissions list in order to uninstall it. Since you gave this app administrator permissions, you need to do so. Menu, Settings, Security, Select Device Administrators. Uncheck kill screen. There will be a pop up box. Do not just hit the ok blindly, READ that too. Then uninstall.
the1wingedangel said:
Since you missed the "--WARNING!!!!---:READ:---WARNING!!!!--" text in all caps across the whole screen when you first gave the app permission, allow me to take my time to type it again for you: You need to remove ANY app that has been given administrator permissions from the admin permissions list in order to uninstall it. Since you gave this app administrator permissions, you need to do so. Menu, Settings, Security, Select Device Administrators. Uncheck kill screen. There will be a pop up box. Do not just hit the ok blindly, READ that too. Then uninstall.
Click to expand...
Click to collapse
Dude relax, no reason to get so agitated!
I actually did press the ok blindly, the reason for that was that the phone didn't do anything after the installation. So i tried to tap the screen to make it work and by accident tapped the ok button before reading the warning post.
If you do tell people to read, please give them the information to read. Either put it in first post or put it somewhere inside the app so people can re-read it.
I managed to uninstall the app, thanks for the info.
Relax, cheers
LQT said:
Dude relax, no reason to get so agitated!
I actually did press the ok blindly, the reason for that was that the phone didn't do anything after the installation. So i tried to tap the screen to make it work and by accident tapped the ok button before reading the warning post.
If you do tell people to read, please give them the information to read. Either put it in first post or put it somewhere inside the app so people can re-read it.
I managed to uninstall the app, thanks for the info.
Relax, cheers
Click to expand...
Click to collapse
Actually I do have reason to get agitated! (Even though I wasn't that upset at the time, my posts often just come across that way) Because after 2 years of seeing stuff like this with android users, it gets very tiring! For example: the countless comments on the market for an app that says in the description "ONLY works on Nexus 1" and the commenter says "Does not work on Droid" and rates it 1 star. But I can forgive those, because its the general public. On a development forum, however, I expect nothing less than every member to have their wits about them. Though, realistically, it's probably just wishful thinking.
the1wingedangel said:
Actually I do have reason to get agitated! (Even though I wasn't that upset at the time, my posts often just come across that way) Because after 2 years of seeing stuff like this with android users, it gets very tiring! For example: the countless comments on the market for an app that says in the description "ONLY works on Nexus 1" and the commenter says "Does not work on Droid" and rates it 1 star. But I can forgive those, because its the general public. On a development forum, however, I expect nothing less than every member to have their wits about them. Though, realistically, it's probably just wishful thinking.
Click to expand...
Click to collapse
Lol! I do that same thing in my thread. It's hard to not snap on some people lots of times. I have come to the conclusion that a lot of people just don't have the brain power to read/comprehend certain things. I've had to learn to relax a bit... It's quite useless to argue with them because it just rolls off them with no worries while people like us simply struggle to understand why and end up getting pissed off. It's tough being cynical sometimes
Thanks for the little app! Just some feedback. Wanted to install method 1. Followed the steps. However, it still acts as method 3, long press on search, instead of just the short press. Running Virtuous 0.8.1.

Htc sense question

Okay I have 2 questions. How do I get to personalize button to serve it original function? And how do I get the www/com button on the hardware keyboard to say its original function as well?
Use the attached program. I can't remeber where I saw it (either somewhere on xda or another forum). I decided I like CM7 better so I haven't used it for awhile. I have no idea on your other issue.
Well after I typed this on my phone, I can't attach a file. When I get to computer will upload on this thread
Sent from my HTC Vision using XDA Premium App
Use these 2 APKs. The keylogger will tell you the value of the button, then the button mapper can change what that value does.
http://forum.xda-developers.com/showpost.php?p=12511062&postcount=5
Sorry about the delay
Here is what I have for the personalize button.
With the launchkey app i cant seem to get it to serve the "Personalize" function. It just gives me a menu when i use it... Could you explain how exactly you get it working?
Yes, once you run the program - you need to set which application you want the program to use. Once set, then when you press the button on the screen, that application will be launched.
-brad

PRO DEV? can you make search button as power button?

DEVELOPERS OUT THERE i hope someone will make our xperia play search button as power button and power button as search button..
i think its a nice idea..
Why?
Jordanooo said:
Why?
Click to expand...
Click to collapse
much easier to use power button if they change it to search button
I actually agree on this, my power button is quite fiddly to press, and having it at the front would solve that. But there is also the matter of accedently pressing it.
for you
Why would you need that may I ask?...The search button is called search button for the function of using search. Is this your real idea/question or your power button is not functioning and you need to use an alternative?
MacromatiX said:
Why would you need that may I ask?...The search button is called search button for the function of using search. Is this your real idea/question or your power button is not functioning and you need to use an alternative?
Click to expand...
Click to collapse
ive been in LG optimus one last time..
my search button is useless and now ive got this XPERIA PLAY and AGAIN
my search button is useless and i dont need this becoz i dont use it..
thats why i ask this if someone will make it
becoz power button is far to press
Here is how you do it
Download RootExplorer or a similar app that can edit /system/
Navigate to /system/usr/keylayout/
Open keypad-zeus.kl as a text file
Near the bottom, change
Code:
key 217 SEARCH
to
Code:
key 217 POWER
Save the changes made, and reboot your phone.
Be careful, this also makes the search button the screen lock button if I'm not mistaken.
Sent from my R800i using XDA
Have you had success with this working?
Also in regards to the keymapping, don't you need to change the power button to search and the search button to power...what's the key code for the power button?
Sent from my R800x using xda app-developers app
Do you can also map the search button as recent apps button in this way?
Sent from the best gaming phone in the world.
Xcited android user said:
Do you can also map the search button as recent apps button in this way?
Sent from the best gaming phone in the world.
Click to expand...
Click to collapse
Yes. That is what I have set for mine.
Leraeniesh said:
Yes. That is what I have set for mine.
Click to expand...
Click to collapse
How?
Sorry for my bad English. It's not my native language.
Xcited android user said:
How?
Sorry for my bad English. It's not my native language.
Click to expand...
Click to collapse
The easiest way would be to flash this

[Q] Remap home soft key long-press?

Couldn't find anything about this anywhere, so I'm starting a new thread.
Is there a way to remap what application loads when long-pressing the home soft-key? I've remapped what app loads when holding the volume-up key with the screen-off, but I'm looking to have a specific application run when holding the home button soft key, instead of the default "google" option that appears when doing it on the stock ROM.
Any help would be greatly appreciated, as would the monitors moving this thread to its proper location if it should belong somewhere else :good:
We'll need root.
I wish OEMs would include this level of customization by default. I wouldn't mind having my home button long press either launch my camera or the App Swap app and have my recent button long press switch to the last app.
Sent from my LG-H811 using Tapatalk
partylikeaninjastar said:
We'll need root.
Click to expand...
Click to collapse
Thank you. I was hoping there might be a workaround (like KeyPlus) or an app like Home2Shortcut which I used on my SGS5 to accomplish that change. Oh well. Guess I'll just keep doing what I've been doing: patiently waiting for root to drop whenever the dev's involved feel it's ready! Thanks for the quick reply!

Categories

Resources