Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Remapping the Physical Buttons

OP idiotzach15

13th February 2013, 06:29 AM   |  #1  
OP Senior Member
Thanks Meter: 75
 
394 posts
Join Date:Joined: Apr 2012
More
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
The Following User Says Thank You to idiotzach15 For This Useful Post: [ View ]
13th February 2013, 05:43 PM   |  #2  
Senior Member
Thanks Meter: 313
 
487 posts
Join Date:Joined: Jul 2010
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
The Following 3 Users Say Thank You to Cruiserdude For This Useful Post: [ View ]
13th February 2013, 06:37 PM   |  #3  
OP Senior Member
Thanks Meter: 75
 
394 posts
Join Date:Joined: Apr 2012
More
Quote:
Originally Posted by Cruiserdude

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!
13th February 2013, 07:41 PM   |  #4  
OP Senior Member
Thanks Meter: 75
 
394 posts
Join Date:Joined: Apr 2012
More
Quote:
Originally Posted by idiotzach15

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?
16th February 2013, 06:36 PM   |  #5  
elesbb's Avatar
Senior Member
Thanks Meter: 4,469
 
6,922 posts
Join Date:Joined: Jun 2010
Donate to Me
More
Quote:
Originally Posted by idiotzach15

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.
16th February 2013, 11:23 PM   |  #6  
Senior Member
Thanks Meter: 313
 
487 posts
Join Date:Joined: Jul 2010
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
17th February 2013, 04:10 AM   |  #7  
elesbb's Avatar
Senior Member
Thanks Meter: 4,469
 
6,922 posts
Join Date:Joined: Jun 2010
Donate to Me
More
Re: Remapping the Physical Buttons
Quote:
Originally Posted by Cruiserdude

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
31st March 2013, 12:40 AM   |  #8  
Member
Thanks Meter: 9
 
61 posts
Join Date:Joined: Jul 2012
More
Quote:
Originally Posted by elesbb

/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?
3rd April 2013, 04:36 PM   |  #9  
Notorious's Avatar
Senior Member
Flag Sydney
Thanks Meter: 5,133
 
8,067 posts
Join Date:Joined: Aug 2011
Donate to Me
More
Re: Remapping the Physical Buttons
Quote:
Originally Posted by tonyf7

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
22nd April 2013, 07:02 AM   |  #10  
Senior Member
Thanks Meter: 36
 
439 posts
Join Date:Joined: Aug 2010
Quote:
Originally Posted by elesbb

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?

Post Reply Subscribe to Thread

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

Advanced Search
Display Modes