New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
etnpnys
Old
#261  
Senior Member
Thanks Meter 10
Posts: 162
Join Date: Jul 2010
Quote:
Originally Posted by holysmokesbatty View Post
Changing the physical button is a matter of editing .kl files in usr/keylayout. For those, edit sec_touchkey.kl, sec_keys.kl and Generic.kl.

In sec_touchkey just change MENU and BACK to either VIRTUAL or (undefined)

In sec_keys and Generic change Button 172 from HOME to CAMERA.
Sorry if it's been a while here... I have the Sprint S3 and it's rooted - I have not flashed any ROM on it at all. I'm about to go to Hawaii and so I'm shopping for a waterproof case, but all screen functions are rendered useless underwater because it doesn't recognize any taps. So I want to remap the shutter to the HOME button. Ideally, tapping HOME would still turn on the phone and return me to the home screen, and then maybe we can remap the longpress on the BACK button to be multitasking, and longpressing HOME would give me camera launch and shutter. Is this possible?

I changed button 172 to CAMERA in both sec_keys.kl and Generic.kl, but that basically just made my HOME button do absolutely nothing. I reverted it back and my buttons are currently normal.
 
monstaX
Old
#262  
Senior Member - OP
Thanks Meter 140
Posts: 434
Join Date: Dec 2011
Location: Texas
Quote:
Originally Posted by etnpnys View Post
Sorry if it's been a while here... I have the Sprint S3 and it's rooted - I have not flashed any ROM on it at all. I'm about to go to Hawaii and so I'm shopping for a waterproof case, but all screen functions are rendered useless underwater because it doesn't recognize any taps. So I want to remap the shutter to the HOME button. Ideally, tapping HOME would still turn on the phone and return me to the home screen, and then maybe we can remap the longpress on the BACK button to be multitasking, and longpressing HOME would give me camera launch and shutter. Is this possible?

I changed button 172 to CAMERA in both sec_keys.kl and Generic.kl, but that basically just made my HOME button do absolutely nothing. I reverted it back and my buttons are currently normal.
Did u do a reboot after editing? Wherever it says HOME, rename to CAMERA. In most of the files in /system/usr/keylayout

Sent from my SPH-L710 using xda app-developers app
Probably Sent from my decked out Epic 4G with CM9 Beta1, fully SUPERCHARGED running at 1.4 GHz with Shadow Kernel. It loses 1 Percent of battery every 5 minutes WHILE it is PLUGGED IN. So I am usually on Airplane Mode Lol. If I forget to hit thanks.. SORRY!!
The Following User Says Thank You to monstaX For This Useful Post: [ Click to Expand ]
 
etnpnys
Old
#263  
Senior Member
Thanks Meter 10
Posts: 162
Join Date: Jul 2010
Quote:
Originally Posted by monstaX View Post
Did u do a reboot after editing? Wherever it says HOME, rename to CAMERA. In most of the files in /system/usr/keylayout

Sent from my SPH-L710 using xda app-developers app
Whoa - so there are more locations than the ones that I specified above? And yes I rebooted. Here's another question though now: it didn't work so I restored my backup files and the home button STILL does nothing! Now what! ?
 
monstaX
Old
#264  
Senior Member - OP
Thanks Meter 140
Posts: 434
Join Date: Dec 2011
Location: Texas
Quote:
Originally Posted by etnpnys View Post
Whoa - so there are more locations than the ones that I specified above? And yes I rebooted. Here's another question though now: it didn't work so I restored my backup files and the home button STILL does nothing! Now what! ?
When I did this, I just renamed everything in ever file that said "home" to "CAMERA" not sure which ones did it. But I believe if you search, you can find modified APK's to where they are modified so that once the camera is opened it remaps for that particular time when it is open.

Sent from my SPH-L710 using xda app-developers app
Probably Sent from my decked out Epic 4G with CM9 Beta1, fully SUPERCHARGED running at 1.4 GHz with Shadow Kernel. It loses 1 Percent of battery every 5 minutes WHILE it is PLUGGED IN. So I am usually on Airplane Mode Lol. If I forget to hit thanks.. SORRY!!
The Following User Says Thank You to monstaX For This Useful Post: [ Click to Expand ]
 
etnpnys
Old
#265  
Senior Member
Thanks Meter 10
Posts: 162
Join Date: Jul 2010
Quote:
Originally Posted by monstaX View Post
When I did this, I just renamed everything in ever file that said "home" to "CAMERA" not sure which ones did it. But I believe if you search, you can find modified APK's to where they are modified so that once the camera is opened it remaps for that particular time when it is open.

Sent from my SPH-L710 using xda app-developers app
Well, I backed up what I needed and reset my phone back to factory. To my chagrin, it looks like this didn't do a single thing to the /System directory, so my home button continued to be completely inoperable. Now, I know that it physically worked still because I could boot into Recovery and use it to select items and what-not, so whatever went wrong was due to my fiddling with the *.kl files. So, how does one go about restoring the /System directory? Formatting it in Recovery and flashing a new ROM. I didn't want to do this, but I flashed CM10.1 and it gave me everything I was looking for - at least for Hawaii in a week. I was able (through CM settings) to set the power button to shutter, the menu button to App Switcher (long press for Menu still), Home button stays Home (with a long press to Google Now). With the exception of the photos taken not looking *as* good, I guess this'll do until I get back.