Remapping the Physical Buttons - Galaxy Note II, Galaxy S III Developer Discussion

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 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

Cruiserdude said:
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
Click to expand...
Click to collapse
Thanks a bunch!

idiotzach15 said:
Thanks a bunch!
Click to expand...
Click to collapse
I'll be creating a flash zip for this "fix" soon. Does anyone know where I'd change the longpress on the homebutton action?

idiotzach15 said:
I'll be creating a flash zip for this "fix" soon. Does anyone know where I'd change the longpress on the homebutton action?
Click to expand...
Click to collapse
/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.

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

Cruiserdude said:
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
Click to expand...
Click to collapse
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

elesbb said:
/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.
Click to expand...
Click to collapse
Every file editor I try is unable to open/edit the android.policy.jar file. How do I edit it?

tonyf7 said:
Every file editor I try is unable to open/edit the android.policy.jar file. How do I edit it?
Click to expand...
Click to collapse
Have to decompile it using apktool
Sent from my SPH-L710 using xda app-developers app

elesbb said:
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
Click to expand...
Click to collapse
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?

hi guyz.. one question.. i'd want to remap the buttons with this logoc
1 press menù -> multitasking tab
long press menù -> menù
long press home buttons -> gvoice
any idea how to use it?
i'm on swift rom v3 + perseus kernel and, i don't have the sec_touchkey file! o.o
how to?
i'd want to use the stock tw launcher, not another one..
thanks
---------- Post added at 03:58 PM ---------- Previous post was at 03:21 PM ----------
Ok i edited the file and puted it in right folder.. now i have the multitasking in normal menù press, but NOT the menù in the hold.. what could i do?

hi, is there any way to wake-up screen without home key, power key and volume key? actualy my home button is now not as hard as it was before, i am afraid it may damage some day, so does power key, i know about few apps which wakes up using sensor, but it's not for me, it drains battery too much, i want something like waking up phone with capative touch keys, or swiping them, is it possible to change key 172 which is home button to a menu key for waking up? in system/usr/keylayout/ ?

Shekar.m1986 said:
hi, is there any way to wake-up screen without home key, power key and volume key? actualy my home button is now not as hard as it was before, i am afraid it may damage some day, so does power key, i know about few apps which wakes up using sensor, but it's not for me, it drains battery too much, i want something like waking up phone with capative touch keys, or swiping them, is it possible to change key 172 which is home button to a menu key for waking up? in system/usr/keylayout/ ?
Click to expand...
Click to collapse
the situation is simple.. ALL IS POSSIBLE..
i you know java code as advance user, i can send you files witch you should recompile
but.. the situation is simple.. if you always turn on the soft buttons, you'll lose a lot of energy, since ALL screen is alimented..
Soft touch buttons uses the same touch as screen, so, you always have to aliment it
ok.. 2 issues:
1) if leg touch the soft button, screen will be turned on
2) showp-1984 creates the swipe2wake, for htc phones, you need a lot of c++ knowledge to recompile it
But.. in my opinion, buttons are "immortal" than soft touch..
I have an old keyboard.. it had about 12 years.. and works good.. and.. i used it for 6 years til change, so, dont be scary, i don't think you are breaking your buttons!!
---------- Post added at 02:03 PM ---------- Previous post was at 01:57 PM ----------
Btw.. i find the code witch is the governor of the buttons.. it's in android.policy.jar file.. and.. i tryed to force the hold home button to hold menù button, and sure, it worked, with one issue: menù always had the search function
So.. the situation is simple... i don't know how to code with java, and sure, i need a good java programmer to do what i whould do.. at last.. only one "stupid thing".. change the hold home button app switch to menù.. so.. i could have:
Menù button as app switch with 1 press (easy to do)
standard press of home as move home function and hold it for the android MENU
And back as always
I only need one coder witch can modify me the @8 VALUE
Any good person??

iba21 said:
the situation is simple.. ALL IS POSSIBLE..
i you know java code as advance user, i can send you files witch you should recompile
but.. the situation is simple.. if you always turn on the soft buttons, you'll lose a lot of energy, since ALL screen is alimented..
Soft touch buttons uses the same touch as screen, so, you always have to aliment it
ok.. 2 issues:
1) if leg touch the soft button, screen will be turned on
2) showp-1984 creates the swipe2wake, for htc phones, you need a lot of c++ knowledge to recompile it
But.. in my opinion, buttons are "immortal" than soft touch..
I have an old keyboard.. it had about 12 years.. and works good.. and.. i used it for 6 years til change, so, dont be scary, i don't think you are breaking your buttons!!
---------- Post added at 02:03 PM ---------- Previous post was at 01:57 PM ----------
Btw.. i find the code witch is the governor of the buttons.. it's in android.policy.jar file.. and.. i tryed to force the hold home button to hold menù button, and sure, it worked, with one issue: menù always had the search function
So.. the situation is simple... i don't know how to code with java, and sure, i need a good java programmer to do what i whould do.. at last.. only one "stupid thing".. change the hold home button app switch to menù.. so.. i could have:
Menù button as app switch with 1 press (easy to do)
standard press of home as move home function and hold it for the android MENU
And back as always
I only need one coder witch can modify me the @8 VALUE
Any good person??
Click to expand...
Click to collapse
I see, actually you're right, i forgot that we have to decompile android.policy.jar to be able to change wake up keys, i remember it when i saw someone changed wake-up key to volume buttons through android.policy.jar, it's quite strange that with samsung decvices which uses physical home button to screen wake, doesn't have any mod to alternative method, one you already mentioned sweep2wake, a pleasent feature to relief power button of htc devices, what about the relief for Samsung's physical home key? i am not so fussed about other use of physical key, i only want to change screen wake key to capacitive menu key or something like sweep2wake..i can see after sometime, lots of users complain about home key, so a handy mod should be there.
by the way can you send me an edited file with menu (capacitive button) wake up enabled?

Shekar.m1986 said:
I see, actually you're right, i forgot that we have to decompile android.policy.jar to be able to change wake up keys, i remember it when i saw someone changed wake-up key to volume buttons through android.policy.jar, it's quite strange that with samsung decvices which uses physical home button to screen wake, doesn't have any mod to alternative method, one you already mentioned sweep2wake, a pleasent feature to relief power button of htc devices, what about the relief for Samsung's physical home key? i am not so fussed about other use of physical key, i only want to change screen wake key to capacitive menu key or something like sweep2wake..i can see after sometime, lots of users complain about home key, so a handy mod should be there.
by the way can you send me an edited file with menu (capacitive button) wake up enabled?
Click to expand...
Click to collapse
I'd want but, i'm not a java programmer, i don't know how to do to remap a button, do you think i know how to force the electromagneticity on??
I think is not easy whaylt ypu would do.. and sure.. you have to modify more than 1 jar file.. because.. i ONLY have to REMAP a button, so, stock, only have to do ANOTHER THING... you want to change a power features.. i think you have to modify the kernel (sweep 2 wake is a feature of the kernel, not of the rom.. kernel is writed in c++.. android is writed in java, uses the java machine)
---------- Post added at 09:05 PM ---------- Previous post was at 08:22 PM ----------
Oh right.. one thing.. emh.. in my opinion.. button is a button, and samusung did some test about the resistence of the button
Sure.. time destroys all.. so.. you could have a softly botton after 12 months.. but.. i don't think you'll damage it soon..
Warranty is here.. you can send phone to the costructor if you have a problem
P.s. i have old phones, as like a siemens s10.. and.. ALL buttons are ok..
That phone was used by:
Dad > mom > me > brother > second brother
It has about, 8years of usage.. no prob..
Dont know why you are so worried!

iba21 said:
I'd want but, i'm not a java programmer, i don't know how to do to remap a button, do you think i know how to force the electromagneticity on??
I think is not easy whaylt ypu would do.. and sure.. you have to modify more than 1 jar file.. because.. i ONLY have to REMAP a button, so, stock, only have to do ANOTHER THING... you want to change a power features.. i think you have to modify the kernel (sweep 2 wake is a feature of the kernel, not of the rom.. kernel is writed in c++.. android is writed in java, uses the java machine)
---------- Post added at 09:05 PM ---------- Previous post was at 08:22 PM ----------
Oh right.. one thing.. emh.. in my opinion.. button is a button, and samusung did some test about the resistence of the button
Sure.. time destroys all.. so.. you could have a softly botton after 12 months.. but.. i don't think you'll damage it soon..
Warranty is here.. you can send phone to the costructor if you have a problem
P.s. i have old phones, as like a siemens s10.. and.. ALL buttons are ok..
That phone was used by:
Dad > mom > me > brother > second brother
It has about, 8years of usage.. no prob..
Dont know why you are so worried!
Click to expand...
Click to collapse
This is an expensive phone, so we would definitely worry about it i know it does rarely broken, but it does more or less, i don't know why samsung intend to choose physical home instead of capacitive, i had HTC Sensation, and i was glad to use sweep2wake on it to save power button, samsung's power button gives loose feeling right out of the box like it'll break anytime, so samsung needs sweep2wake or something like that much more than HTC devices, hopefully some devs will look at it, THIS WAKE-UP KEY NEED TO BE HACKED AND REPLACED, simple is that, although soft keys gives it little bit relief, but we have to wake-up device atleast 30-50 times in working days, so that's why i am really looking forward to it, can we both join hands to bring developers attention toward it? if you also want to wake-up screen with anything other than physical keys i'm sure you must be missing sweep2wake in note 2

I didn't use s2w.. why? It uses too mouch energy in standby
showp is one of my great friends in xda, and i love his kernel + his MPDECISION code
Btw, for me, you are crazy
Never ever had problems with phone buttons.. i had an n95, i sent about 1 bilion of sms.. here in italy vodafone created a promo witch gives about 100free sms per day.. i used everytime all the sms.. and.. sure.. i had to press the send button 2 timed every sms + all the other
I used that phone for 3 years.. changed it with an hd2... bought the first day (n95) and hd2 used.. 365 days x 3 = 1095.. 1095 x 100 = 19500 x 2 = 219,000 + all the other used to navigate in menù
Btw.. n95 was broken in display cable.. all buttons perfect!!

has anyone tried ButtonRemapper? http://forum.xda-developers.com/showthread.php?t=850464
before doing all the hard work

Yep and didnt work!

Related

Long End Key remap

Hi. Suppose I just want to remap the long end key press button to something other than the HTC dafault. Do I need AEBPlus for that? I assume that would be a overkill for remapping just one button. The HTC interal app only allows to either display the quick list or make 4 other actions. I was wondering if I can change that to something else without using the AEBPlus app. I just wanted to run the comm manager rather than the htc options
Thanks
Don't get your hopes up about AE Button cause it don't work if your using touch gl. Apparently touch fl keeps regrabning the keys so sometimes they work snd sometimes they dont. I gave up. i think ot might work better with the hold button but like i said i got frustrated snd gaveup when thr suthor told mr there was nothing he could do..
craigwillie said:
Don't get your hopes up about AE Button cause it don't work if your using touch gl. Apparently touch fl keeps regrabning the keys so sometimes they work snd sometimes they dont. I gave up. i think ot might work better with the hold button but like i said i got frustrated snd gaveup when thr suthor told mr there was nothing he could do..
Click to expand...
Click to collapse
Actually I don't need it working with the TouchFlo, as I don't use TF. I only want to remap the long end press button to the comm manager. Of course it would have been great to also map a long press on the Home button or the Back button but I think I read that's not possible even without TouchFlo ?
what no one answered ? wow i thought that's easy,a metter of registry or link change. quite disappointing.
I am also looking for a way to change the back button to run some other program...
How to assign a shortcut to EndKey, SendKey ....
Not tried myself on TP, but maybe it's useful:
http://forum.xda-developers.com/showthread.php?t=356322
Create a shortcut in your windows directory called long_end.lnk
whatever the shortcut points to will run when you long press the end key.
There are a few of these hard press shortcuts
long_end.lnk
long_send.lnk
long_power.lnk
long_ptt.lnk
short_power.lnk
short_ptt.lnk
I can remap all the buttons except the Long End. Somehow the Long End button is mapped to the phone Lock. Where can I disable that and allow for my own?
Start, settings, system tab, long press end key
if you don't see what you want there ... we might have to figure out how to disable the long press htc software
I cooked my own rom and I didn't put in long press end key. I assumed it wouldn't have installed any reg settings for it, guess I'll have to check. Thanks!
For some reason if you don't add HTC Long End to the ROM, it will stick on one setting and can't be changed. Weird, but fixable. If you install HTC End Key (the cab is somewhere on here) it will override the previous setting and then you can either select your preference from within the program or create a custom link. Not sure about the second idea working, since I haven't tried it myself, but I've been able to override HTC End Key when it was installed on previous phones. You could also consider un-installing it after installing it if all else fails.
baub said:
For some reason if you don't add HTC Long End to the ROM, it will stick on one setting and can't be changed. Weird, but fixable. If you install HTC End Key (the cab is somewhere on here) it will override the previous setting and then you can either select your preference from within the program or create a custom link. Not sure about the second idea working, since I haven't tried it myself, but I've been able to override HTC End Key when it was installed on previous phones. You could also consider un-installing it after installing it if all else fails.
Click to expand...
Click to collapse
Yeah, I recooked the Long End Key Press in, but there isn't a custom selection part of it so that must be a different version of End Key software. It's ok not too important.
AEB
Just for those who wonder, AEButton can remap everything (single, double, triple, long presses) on all keys except two: Long Green and Long Red.
You either need to disable Long End Key software or find some other way to hard map these.
Using my HTC Touch Pro. I am still unablet to map the Long press End Key to something other than the limited options that the HTC Long Press End Key program settings offer.
I simply wish to map the long press end key to run a different program. I tried the suggestion offered on this post (http://forum.xda-developers.com/showthread.php?p=1783616#post1783616) but it doesn't work. I put a file called Long_End.lnk in the windows directory, soft reset the device and still it doesn't map to that. Only displays the HTC 'quick list'.
I am not running TF3D.
Anyhelp ? To map to any program I choose ?
Thanks
So no buddy managed to map the End button long press to some other program than the options that the HTC's prg in the settings allow ?
I want to remap the End key to open Phone Weaver Profiles which is much more useful than what the HTC Long End Pressapp offers.
nik3r said:
Just for those who wonder, AEButton can remap everything (single, double, triple, long presses) on all keys except two: Long Green and Long Red.
You either need to disable Long End Key software or find some other way to hard map these.
Click to expand...
Click to collapse
That's not the full story ....
on ex: HTC HD
there are buttons:
"Green Key", -> mapping possible but without Long Press
"Home Key" -> nothing possible !!!
"Back Key" -> not really mapable (mapping possible, but always send to wanted mapping ~backspace and jump back to Homescreen and then the mapped button will execute - little bit strange ..)
Longpress also doesn't work
"Red Key", -> mapping possible but without Long Press
tried with aebutton also (last version)
some additional ideas ?
cu camel
Proto732 said:
Start, settings, system tab, long press end key
if you don't see what you want there ... we might have to figure out how to disable the long press htc software
Click to expand...
Click to collapse
HI!
I'm another one that tried everything to remap the long end key without that HTC app and no solutions.
What we really need is to know how to disable that app from the system.
Anyone help us!

[MOD] [21/07] Wake up using Home, Menu, Search or Back UPDATE. [Trackball wake]

Flash any of the below links through your desired recovery console. Clockwork or R.A .
Big thanks to lambrospower and KingChris. Nice work guys...
Wake up using Menu Button
Wake up using only Menu, without use of the Power button
Wake up using the Search button, without use of the Power button
Wake up using the Back button, without the use of the Power button
Wake up using the Home button, without use of the Power button
Track-Ball Wake (With Power Enabled)
Track-Ball Wake (Only Trackball)
Restore original functionality (Just the power button)
Note:
These should work with both HTC and Stock ROMS, either on 2.1 or 2.2. Any troubles, post your comment below with a brief description of what went wrong, We'll try out best to help.
Nandroid first....as allways.
Enjoy.
CP.
For the General progress of this mod, check out http://forum.xda-developers.com/showthread.php?t=683902
Is there also one for the "trackball" ? Would be perfect for me If not, I'll try one of the above anyway. Thanks!
how to deactivate if you dont like it?
No they haven't found a way yet to use the trackball as a wake up call. Seem's strange as all the other buttons work. I'll have a look in other places tho, If I find it I'll post it.
Good point Simc13, I'll quickly make an update zip that'll restore normal functionality.
CP
7pellc said:
No they haven't found a way yet to use the trackball as a wake up call. Seem's strange as all the other buttons work. I'll have a look in other places tho, If I find it I'll post it.
Good point Simc13, I'll quickly make an update zip that'll restore normal functionality.
CP
Click to expand...
Click to collapse
Great & quick support!
OP updated.
Now includes back to original functionality.
CP
Re: [MOD] Wake up using Home, Menu, Search or Back
What about to use volume down key to wake up the phone? I think it would be an easy way.
-------------------------------------
Sent via the XDA Tapatalk App
lsmgeb89 said:
What about to use volume down key to wake up the phone? I think it would be an easy way.
-------------------------------------
Sent via the XDA Tapatalk App
Click to expand...
Click to collapse
I am not sure if this would make sense, as the volume rocker keeps working when you are listening music and the screen is off.
hi, im the one named Burst on www.android-hilfe.de
i want to set a link to the original post here on XDA where the mod has started
http://forum.xda-developers.com/showthread.php?t=683902
work with any button
Hi guys. This post was exactly what I was looking for.
I flashed only the search key to wakeup.
Result: now it wakes up with any button (also volume and trackpad).
Is it my mistake (which one?) or what?
Just flashed from the recovery and rebooted.
Thanks for your support
linkback: http://forum.xda-developers.com/showthread.php?t=683902
Thankyou soooo much! Just what I wanted!
janvandusschoten said:
Is there also one for the "trackball" ? Would be perfect for me If not, I'll try one of the above anyway. Thanks!
Click to expand...
Click to collapse
+
Want wake up with trackball too
thx
++
Trackball.
Is needed all wipe??
@kingChris
I'll add your link to the first post mate.
It's nice to see mods with different buttons working. I used kingchris's mod as soon as he posted, and it's been working great since then.
is it possible to have the same function as stock hero 1.5/2.1 where u press the menu button twice, it unlocks the lockscreen?
ivicask said:
++
Trackball.
Click to expand...
Click to collapse
+++
i have looked in system/usr/ and there are more files showing key numbers, i couldnt find trackball tho..
Does this work with MCR 3.1?

[Q] How can I change the bottom button's actions?

Hello community,
Let me start off by saying that I didn't have any luck in finding my answers in the similar posts found.
I will be more explicit about my question.
I just rooted my HTC Sensation and installed the Custom ROM Coredroid v2.4, everything works perfect but I noticed the bottom right button (next to Phone) is now a direct on key press shortcut to the Internet Browser.
I prefer my old button "action" which was the one enabling me to add widgets personalize themes etc.. (now doable by pressing and holding down anywhere on the desktop)
So I was wondering if I could change that button back to what I was used to be/do, and if not, at least make it open Dolphin mini or Opera mini, instead of default browser.
Hope I was clear enough, and that I didn't double post because I missed a similar one to me.
Thanks in advance for your answers.
I'm not yet on a Sensation, but this is how to remap buttons (physical buttons) on the htc mytouch 4g.
In app Root Explorer:
System>usr>keylayout >glacier-keypad.kl
Select "Mount R/W" button on top right then open the file in text editor.
I did the following to remap the "SMART" button to become a power off/reboot button because the actual power button on my previous mt4g stopped working...didn't want that same problem again (was overused from flashing, reboots and shutting the screen off compulsively).
Changed key 183 from SEARCH to POWER, then saved file. It doesn't work to turn the phone on and I lose these remap settings when I flash a new ROM, but I hope/suspect it may be just as easy to remap the capacitative buttons on the Sensation.
Sent from my HTC Glacier using XDA Premium App
thepza said:
I'm not yet on a Sensation, but this is how to remap buttons (physical buttons) on the htc mytouch 4g.
In app Root Explorer:
System>usr>keylayout >glacier-keypad.kl
Select "Mount R/W" button on top right then open the file in text editor.
I did the following to remap the "SMART" button to become a power off/reboot button because the actual power button on my previous mt4g stopped working...didn't want that same problem again (was overused from flashing, reboots and shutting the screen off compulsively).
Changed key 183 from SEARCH to POWER, then saved file. It doesn't work to turn the phone on and I lose these remap settings when I flash a new ROM, but I hope/suspect it may be just as easy to remap the capacitative buttons on the Sensation.
Sent from my HTC Glacier using XDA Premium App
Click to expand...
Click to collapse
If I read correctly, i don't think he wants to remap that stuff at all. He just wants to change something in sense UI. You could TRY (I'm assuming it's the rosie.apk doing this) getting a rosie.apk from another rom such as ARHD 4.1.x and replace the rosie.apk on your phone. Try that, if worse comes to worst, you can
a) backup the rosie.apk that you currently have and just push it back into your phone if the above fails
b) restore a nandroid!
Just experiment and find out
---------- Post added at 07:49 PM ---------- Previous post was at 07:47 PM ----------
Actually I decided to be nice. Took a look at that rom and it apepars there is a "tweaks"
Go to settings>tweaks> and fix it up

[Q] button remap?

Is it possible to remap the menu button on the verizon s 3 to multitasking?
I'm going to think your going to have to be rooted, and maybe change something in the build prop.
Apex launcher let's customize buttons in the settings.. Just download it from the play store!
http://forum.xda-developers.com/showthread.php?t=1789000
Check out this thread. This app remaps home button but on the app Page in play store the same dev also has an app that remaps other buttons if I'm not mistaken.
Hope this helps.
Home2shortcut
Sent str8 from my half eaten Banilla Ice Cream Samich
Yes, its possible, I have my buttons totally remapped with:
Menu button - Home/Multitasking
Home button - Menu/whatever holding it down does
Back - Back
I also made it so that the home button doesn't wake the phone as well.
In a couple days (or whenever i have time really) im gonna put a guide together how to do this in detail (i havent seen an extensive one yet).
BEFORE DOING THIS, BACK UP EVERYTHING!!! I'M NOT RESPONSIBLE FOR ANY PROBLEMS OR MISHAPS.
Also, you need root for your phone to mount the system as writable.
NOTE when i first did this, i only changed one at a time, and made the mistake as not having a Menu button (i had two home buttons and a back button) which proved tricky to find a way around. Just be very careful!
In short, modify the files sec_touchkey.kl and sec_keys.kl within ES File Explorer or Root Explorer under ~/system/usr/keylayout/ . As soon as you edit these and save them, the App will automatically create a sec_touchkey.kl.bak or sec_keys.kl.bak file next to your modified file. After an edit, you'll need to reboot your phone for the changes to be in effect.
I would advise to look at these files in detail before mounting the system as writable, to avoid mistakes.
Good luck!!
usatf1290 said:
Yes, its possible, I have my buttons totally remapped with:
Menu button - Home/Multitasking
Home button - Menu/whatever holding it down does
Back - Back
I also made it so that the home button doesn't wake the phone as well.
In a couple days (or whenever i have time really) im gonna put a guide together how to do this in detail (i havent seen an extensive one yet).
BEFORE DOING THIS, BACK UP EVERYTHING!!! I'M NOT RESPONSIBLE FOR ANY PROBLEMS OR MISHAPS.
Also, you need root for your phone to mount the system as writable.
NOTE when i first did this, i only changed one at a time, and made the mistake as not having a Menu button (i had two home buttons and a back button) which proved tricky to find a way around. Just be very careful!
In short, modify the files sec_touchkey.kl and sec_keys.kl within ES File Explorer or Root Explorer under ~/system/usr/keylayout/ . As soon as you edit these and save them, the App will automatically create a sec_touchkey.kl.bak or sec_keys.kl.bak file next to your modified file. After an edit, you'll need to reboot your phone for the changes to be in effect.
I would advise to look at these files in detail before mounting the system as writable, to avoid mistakes.
Good luck!!
Click to expand...
Click to collapse
Nice! So it's possible to map the menu key to "open apps" after all? I tried messing with those files awhile ago but couldn't get the menu remapped to recent apps and hold home for menu.
I've looked all over, and tried a lot of things, and its proving more difficult than i had thought to simply remap menu longpress to recent apps, and home longpress to menu.
I tried lots of things such as switching around the order, adding "APP_SWITCH" After HOME, and "RECENT" after HOME.
It seems to me there is no command that would readily do this.
In order to do this, I'll have to dig and find where the command "HOME" actually is, take out the recent apps section from that, and add it to the location of the "MENU" command.
However, if you don't mind using the Menu button as a home button (for now), and the home button as a menu button, its as simple as switching HOME and MENU within the sec_touchkey.kl file (then rebooting).
Bumpers
Try downloading nova launcher. You can remap the keys inside its settings. I used it to set the home key to google voice search.
werked said:
http://forum.xda-developers.com/showthread.php?t=1789000
Check out this thread. This app remaps home button but on the app Page in play store the same dev also has an app that remaps other buttons if I'm not mistaken.
Hope this helps.
Home2shortcut
Sent str8 from my half eaten Banilla Ice Cream Samich
Click to expand...
Click to collapse
Good find! thanks for that. This seems to be a good app, however it is not working the way i want it to. I have Nova launcher pro installed, and the ported version of Google Now. I wanted to map the double press to launch Google now, but could not make it work. I could remap anything else though, so this is a good app to have.
---------- Post added at 01:31 PM ---------- Previous post was at 01:21 PM ----------
kmdtcs said:
Try downloading nova launcher. You can remap the keys inside its settings. I used it to set the home key to google voice search.
Click to expand...
Click to collapse
I as well have Nova Prime. I could remap the home button, but not the double tap on home button. (maybe this will help someone else out as well)

[Q] Disabling the long press function of the hw power off button.

Hi everyone,i looked for a lot of solution (here and on other forums) but none of them worked. Even Acer technics abandoned me so it's all up to software now.
I will explain briefly my problem.
The power off button of my Acer Liquid e2 (i posted this here because there are no specific board for this phone) became incredibly sensible,even when the phone is just standing on a table it hard power off because of the long press of the power off button all by itself.
Now,i tried cleaning it,insult him,even borrow him to the assistance (they said that the button is probably attached to the motherboard so no repair,buy a new one) Not a single hardware solution worked (this phone never took a hit,but i have no warranty).
So i tried software,i used two different application to understand what was the button pressed,thanks to keytracker and whichbutton now i know that the longpress of power off button is 116,and the function is KEYCODE_POWER.
Now i wanted to simply remap the hw key so it does nothing but none of the two button appear in Button remapper neither the number or the function. So i was thinking to manually edit the file that manage this kind of thing is that possible? How can i disable the power off button? Obviously the change must be made after the boot,and in a way that still let me power on the phone and unlock (for the unlock part i could just remap a long press of the back button). This is way out of my league. Any advice,any help any possible solution are much appreciated.
Sorry for my bad english and i hope someone can help,otherwise i will have to take another phone...and i really can't afford it.
Megasd said:
Hi everyone,i looked for a lot of solution (here and on other forums) but none of them worked. Even Acer technics abandoned me so it's all up to software now.
I will explain briefly my problem.
The power off button of my Acer Liquid e2 (i posted this here because there are no specific board for this phone) became incredibly sensible,even when the phone is just standing on a table it hard power off because of the long press of the power off button all by itself.
Now,i tried cleaning it,insult him,even borrow him to the assistance (they said that the button is probably attached to the motherboard so no repair,buy a new one) Not a single hardware solution worked (this phone never took a hit,but i have no warranty).
So i tried software,i used two different application to understand what was the button pressed,thanks to keytracker and whichbutton now i know that the longpress of power off button is 116,and the function is KEYCODE_POWER.
Now i wanted to simply remap the hw key so it does nothing but none of the two button appear in Button remapper neither the number or the function. So i was thinking to manually edit the file that manage this kind of thing is that possible? How can i disable the power off button? Obviously the change must be made after the boot,and in a way that still let me power on the phone and unlock (for the unlock part i could just remap a long press of the back button). This is way out of my league. Any advice,any help any possible solution are much appreciated.
Sorry for my bad english and i hope someone can help,otherwise i will have to take another phone...and i really can't afford it.
Click to expand...
Click to collapse
I know exactly what you are looking for.
I will get back to you in the next couple of minutes to tell you the file that needs to be edited.
Thanks.
Lgrootnoob said:
I know exactly what you are looking for.
I will get back to you in the next couple of minutes to tell you the file that needs to be edited.
Thanks.
Click to expand...
Click to collapse
Thanks for the help i will wait for the answer,i was thinking that if we find a way to disable only the power off function it will be perfect.
Please read this first http://source.android.com/devices/tech/input/key-layout-files.html
Ok, its in /system/usr/keylayout
Just edit the files in a text editor for your specific key number
Lgrootnoob said:
Please read this first http://source.android.com/devices/tech/input/key-layout-files.html
Ok, its in /system/usr/keylayout
Just edit the files in a text editor for your specific key number
Click to expand...
Click to collapse
I tried to edit that file even before posting here but the only key function for 116 is power wake.I looked for all the files in the directory and none of them refer to the function im looking for. Can you be more specific?
Megasd said:
I tried to edit that file even before posting here but the only key function for 116 is power wake.I looked for all the files in the directory and none of them refer to the function im looking for. Can you be more specific?
Click to expand...
Click to collapse
This is the only way to do it.
Except for some sort of xposed module if you find one.
Dont look for exactly it, but experiment and look for off the wall keys that might be helpful to edit.
---------- Post added at 02:37 PM ---------- Previous post was at 02:35 PM ----------
This thread will help http://forum.xda-developers.com/showthread.php?t=2302169
Read last post.
Lgrootnoob said:
This is the only way to do it.
Except for some sort of xposed module if you find one.
Dont look for exactly it, but experiment and look for off the wall keys that might be helpful to edit.
Click to expand...
Click to collapse
I dont like to experiment with hardware key,im looking for a way to delete only the KEYCODE_POWER function,if i completely remove the 116 string i won't even be able to boot the phone and i don't like to brick things.
Edit: That kind of edit could work,the problem is that this string:
KEY 116 POWER WAKE
KEY 116 POWER
Should stop the problem from coming when in lockscreen,i suppose that will kind of work..thanks a lot i will try it and let you know.
Megasd said:
I dont like to experiment with hardware key,im looking for a way to delete only the KEYCODE_POWER function,if i completely remove the 116 string i won't even be able to boot the phone and i don't like to brick things.
Click to expand...
Click to collapse
I doubt it because the bootloader handles power on and the POWER function seems like it would allow you to turn the screen on. Do you want me to try it on my phone before you do it on yours?
And he never said to delete it, he only said to change it to just POWER not POWER WAKE.
Seems like to delete the keycode you would have to edit the android framework and that is beyond the scope of my efforts.
EDIT: Okay I got your reply.
Lgrootnoob said:
I doubt it because the bootloader handles power on and the POWER function seems like it would allow you to turn the screen on. Do you want me to try it on my phone before you do it on yours?
And he never said to delete it, he only said to change it to just POWER not POWER WAKE.
Seems like to delete the keycode you would have to edit the android framework and that is beyond the scope of my efforts.
EDIT: Okay I got your reply.
Click to expand...
Click to collapse
I would like to thank you for the answer and the help you are giving to me,you are very kind to do so,
I can't find that specific file seckey.kl probably it varies from devices to devices..i managed to find two different files that both have the string power wake,and they are mtk-kdp.kl and querty.kl what do you think? i should probably edit both of them..but what do you think?
Megasd said:
I would like to thank you for the answer and the help you are giving to me,you are very kind to do so,
I can't find that specific file seckey.kl probably it varies from devices to devices..i managed to find two different files that both have the string power wake,and they are mtk-kdp.kl and querty.kl what do you think? i should probably edit both of them..but what do you think?
Click to expand...
Click to collapse
The android docs only said not to edit generic.kl so it seems your fine.
I would do a Recovery backup if possible then edit all of the key values.
And also make sure usb debugging is on so if you cant use the power button that you could recover with an adb shell.
Please hit the thanks button if you have the time.
Lgrootnoob said:
The android docs only said not to edit generic.kl so it seems your fine.
I would do a Recovery backup if possible then edit all of the key values.
And also make sure usb debugging is on so if you cant use the power button that you could recover with an adb shell.
Please hit the thanks button if you have the time.
Click to expand...
Click to collapse
You are a mastermind my friend A MASTERMIND the problem is solved the power off button work to lock the screen but dosent shutdown the phone anymore so everything is fixed!! i know my thanks are not usefull so i would like to ask a question,do you have any project that need to be founded? i saved a lot of money thanks to you and i will be glad to help you back. Again thanks.
Megasd said:
You are a mastermind my friend A MASTERMIND the problem is solved the power off button work to lock the screen but dosent shutdown the phone anymore so everything is fixed!! i know my thanks are not usefull so i would like to ask a question,do you have any project that need to be founded? i saved a lot of money thanks to you and i will be glad to help you back. Again thanks.
Click to expand...
Click to collapse
Glad to see it worked for you.
I will get back to you soon.
I'm building a new computer(My first build) that needs a little boost.
---------- Post added at 03:42 PM ---------- Previous post was at 03:08 PM ----------
Just realized we have to use the paypal function or google wallet to be able to accept donations.
So I will add a button for it tonight.

Categories

Resources