Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,778,037 Members 52,532 Now Online
XDA Developers Android and Mobile Development Forum

Remapping the Physical Buttons

Tip us?
 
idiotzach15
Old
#1  
Senior Member - OP
Thanks Meter 75
Posts: 391
Join Date: Apr 2012
Phone Remapping the Physical Buttons

well, recently I've been trying to remap the softkeys on the note II, and I'm just not making progress. My goal is to create a small mod that turns the softkey lights off, and remaps the menu key for the back key, and the back key to recents, as well as somehow changing the home button longpress to a google now shortcut.

After doing some research, I figured changing the Generic.kl (/system/usr/keylayout/) lines 139 and 158 would make progress. However, all I've accomplished so far is disabling the softkeys.

Any help or information on this subject would be greatly appreciated.

Thanks in advance.


- and yes, I tried the ButtonRemapper apk
I'M A DUMNFUK....but

Yay for SafeStrap! now I can flash some of the things.

LOCKED Galaxy Note II (VZW)
Running TrentzRom

Stock Kernel for life, but not by choice.
The Following User Says Thank You to idiotzach15 For This Useful Post: [ Click to Expand ]
 
Cruiserdude
Old
#2  
Senior Member
Thanks Meter 307
Posts: 465
Join Date: Jul 2010
Default Re: Remapping the Physical Buttons

I made this file months ago, and it's worked on every TW rom I've had, since I HATE the backwards button layout Samsung chose. Download this file, go to your /system/usr/keylayout folder, rename your existing sec_touchkey.kl to sec_touchkey.kl.bak, then move the file I gave you into that folder. Set permissions and reboot, and you'll have the setup you want.

Obviously, just turn the backlights off in the Display settings. Do note that you won't have a menu button after you do this, I just use Button Savior to put a little shortcut off to the side. But if you come up with a more elegant solution, please feel free to let me know.

That file should do what you want, all I ask is that you credit me if you share it with anyone, put it in a rom, or whatever.

http://db.tt/RzSutNxL

Sent from my SCH-I535 using Tapatalk 2
Team OctOS

The truth is out there.
The Following 3 Users Say Thank You to Cruiserdude For This Useful Post: [ Click to Expand ]
 
idiotzach15
Old
#3  
Senior Member - OP
Thanks Meter 75
Posts: 391
Join Date: Apr 2012
Quote:
Originally Posted by Cruiserdude View Post
I made this file months ago, and it's worked on every TW rom I've had, since I HATE the backwards button layout Samsung chose. Download this file, go to your /system/usr/keylayout folder, rename your existing sec_touchkey.kl to sec_touchkey.kl.bak, then move the file I gave you into that folder. Set permissions and reboot, and you'll have the setup you want.

Obviously, just turn the backlights off in the Display settings. Do note that you won't have a menu button after you do this, I just use Button Savior to put a little shortcut off to the side. But if you come up with a more elegant solution, please feel free to let me know.

That file should do what you want, all I ask is that you credit me if you share it with anyone, put it in a rom, or whatever.

http://db.tt/RzSutNxL

Sent from my SCH-I535 using Tapatalk 2
Thanks a bunch!
I'M A DUMNFUK....but

Yay for SafeStrap! now I can flash some of the things.

LOCKED Galaxy Note II (VZW)
Running TrentzRom

Stock Kernel for life, but not by choice.
 
idiotzach15
Old
#4  
Senior Member - OP
Thanks Meter 75
Posts: 391
Join Date: Apr 2012
Quote:
Originally Posted by idiotzach15 View Post
Thanks a bunch!
I'll be creating a flash zip for this "fix" soon. Does anyone know where I'd change the longpress on the homebutton action?
I'M A DUMNFUK....but

Yay for SafeStrap! now I can flash some of the things.

LOCKED Galaxy Note II (VZW)
Running TrentzRom

Stock Kernel for life, but not by choice.
 
elesbb
Old
#5  
elesbb's Avatar
Senior Member
Thanks Meter 4326
Posts: 6,734
Join Date: Jun 2010

 
DONATE TO ME
Quote:
Originally Posted by idiotzach15 View Post
I'll be creating a flash zip for this "fix" soon. Does anyone know where I'd change the longpress on the homebutton action?
/system/framework/android.policy.jar/PhoneWindowManager.java

At leasts thats what i can remember lol. Thats what i had to edit on my Tablet to make long press on home function as long press search.
 
Cruiserdude
Old
#6  
Senior Member
Thanks Meter 307
Posts: 465
Join Date: Jul 2010
Default Re: Remapping the Physical Buttons

Yeah, I'd love to find a way to enable a long press of the right hand capacitive button (back button stock, but it's the task switcher with that file I posted) to act as a menu button. That would be awesome.

Alternatively, I'd love to figure out how to change the TW soft keys to AOSP theme and layout. I love using soft keys, but I can't stand the backwards layout Samsung has chosen, and can't bring myself to using it if I can help it.

Sent from my SCH-I535 using Tapatalk 2
Team OctOS

The truth is out there.
 
elesbb
Old
#7  
elesbb's Avatar
Senior Member
Thanks Meter 4326
Posts: 6,734
Join Date: Jun 2010

 
DONATE TO ME
Default Re: Remapping the Physical Buttons

Quote:
Originally Posted by Cruiserdude View Post
Yeah, I'd love to find a way to enable a long press of the right hand capacitive button (back button stock, but it's the task switcher with that file I posted) to act as a menu button. That would be awesome.

Alternatively, I'd love to figure out how to change the TW soft keys to AOSP theme and layout. I love using soft keys, but I can't stand the backwards layout Samsung has chosen, and can't bring myself to using it if I can help it.

Sent from my SCH-I535 using Tapatalk 2
You can add your own methods to the android.policy.jar file to handle different on hold actions.

Sent from my SGH-T999

"So I put my phone into airplane mode and threw it... worst transformer ever. -.-" -My friend
 
tonyf7
Old
#8  
Member
Thanks Meter 6
Posts: 42
Join Date: Jul 2012
Quote:
Originally Posted by elesbb View Post
/system/framework/android.policy.jar/PhoneWindowManager.java

At leasts thats what i can remember lol. Thats what i had to edit on my Tablet to make long press on home function as long press search.
Every file editor I try is unable to open/edit the android.policy.jar file. How do I edit it?
 
Notorious
Old
#9  
Notorious's Avatar
Senior Member
Thanks Meter 5054
Posts: 7,905
Join Date: Aug 2011
Location: Sydney

 
DONATE TO ME
Default Re: Remapping the Physical Buttons

Quote:
Originally Posted by tonyf7 View Post
Every file editor I try is unable to open/edit the android.policy.jar file. How do I edit it?
Have to decompile it using apktool

Sent from my SPH-L710 using xda app-developers app
 
shaxs
Old
#10  
Senior Member
Thanks Meter 27
Posts: 397
Join Date: Aug 2010
Quote:
Originally Posted by elesbb View Post
You can add your own methods to the android.policy.jar file to handle different on hold actions.

Sent from my SGH-T999

"So I put my phone into airplane mode and threw it... worst transformer ever. -.-" -My friend
Is it possible to add a method that when back is pressed twice it launches an app? Or can I modify long press to launch an app like voice commands?

Tags
capacitive button, capacitive buttons not working
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes