Remapping Physical Power Button - Samsung Galaxy Nexus

Hello all! I have recently become fascinated with the app here ( http://forum.xda-developers.com/showthread.php?t=1721895 ) and now have no use for my power button. i want to remap it to do absolutely nothing just like it was broken so that my pesky brother cannot get into my phone. I went to system/usr/keylayout/tuna-gpio-keypad.kl and changed key 116 which is the power button to none but nothing happened. does anyone know what to put there to do such a thing?

I just tried deleting the key 116 and it disabled the power button but then caused PGM to stop working. Still trying to figure this out.
EDIT:Someone has to know how to do this. XDA is the smartest community Ive followed

Perhaps turn it into a camera button.
butter and jelly please...

@rbiter said:
Perhaps turn it into a camera button.
butter and jelly please...
Click to expand...
Click to collapse
When you turn it into another function lets say HOME. The swipes from the PGM application look at that key and do what said key says. so we need to find a way to add a fake key, say key 1000 with the function POWER for it to work. but Im not smart enough to do that. i downloaded the free app and decompiled it hoping to find A line of code that says look at key 116 for slide to wake but i have yet to see something like that. my theory is that if we change what it looks for in the app and then manually add that into ( system/usr/blah blah ) it should work. Sounds good to me at least. what do you think?

Bumpity bump bump! Someone must know!

^
Sent from my Galaxy Nexus using Tapatalk 2

This may turn into a rom option in the future.
[Very interested]
Sent from my Galaxy Nexus using xda premium

Related

[Q] Can't remap optical joystick?

Besides editing the .kl files, is there something else I need to do to remap the click function of the optical pad? I don't seem to have any success so far...
In both the incrediblec-keypad.kl and qwerty.kl files, the following line exists:
Code:
key 232 DPAD_CENTER WAKE_DROPPED
I have tried simply changing "DPAD_CENTER" to "CAMERA" (in both files) and then rebooting, but the phone does not behave any differently. If I use this same procedure for a different key (like Volume-Up, for example) it works perfectly. Is there something else in the framework that is preventing remapping of the optical click though?
For what it's worth, I'm running Virtuous 3.0.1... though given the fact that I can remap other keys, I'd assume it isn't a ROM issue
I tried the exact same thing. My one problem with this phone is that I can't bind something to this key. I would LOVE to get it to load the camera. I made a thread a few weeks ago, but no one responded. I was thinking making dpad_center isn't actually the right identifier for this key? BUMP!
I wish I could find a way to wake the phone up consistently with the track pad.
1967ls2 said:
I wish I could find a way to wake the phone up consistently with the track pad.
Click to expand...
Click to collapse
I second this
Sent from my Incredible using XDA App
Gahh Its Lee said:
I second this
Sent from my Incredible using XDA App
Click to expand...
Click to collapse
There's a forum dedicated to this tweak
I'm using it now
Sent from my ADR6300 using XDA App
Search optical joystick wake
Sent from my ADR6300 using Tapatalk
So no one has any solutions for mapping the camera to the optical click?
intenselyinsane said:
Search optical joystick wake
Sent from my ADR6300 using Tapatalk
Click to expand...
Click to collapse
I ran a search for "optical joystick wake" and I don't seem to be able to find the thread you are referring to.
From forum.xda-developers.com/showthread.php?t=825511[/url] it appears that key 232 is incorrect. It should be key 272.
Runawaycoder said:
From forum.xda-developers.com/showthread.php?t=825511[/url] it appears that key 232 is incorrect. It should be key 272.
Click to expand...
Click to collapse
Thank you very much! That is quite helpful. Let me try some experiments on my end and see if I can get this working now...
First off, let me offer major thanks to TheLynxy for clearing up the whole 232/272 thing: I was wondering why rebinding the optical trackpad click never did anything (I was leaving it at 232)
What I've always wanted to do with mine was map it to be a camera button. It would seem that still does not work, even now using the correct key #
If I use the following, nothing at all happens (the phone doesn't even wake up)
Code:
key 272 CAMERA WAKE
Interestingly, however, using the FOCUS command instead will wake the device, but still does not start the camera (even if the camera is already running in the background)
Code:
key 272 FOCUS WAKE
TheLynxy said:
When the phone is on, the trackpad behaves like normal, eg the active application decides what the button does.
Click to expand...
Click to collapse
This is another interesting point about the whole thing. It seems like this is a button that is really on lockdown by the phone.
So while some progress was made, I still can't get the camera functionality I wanted. Oh well.

Back Button App for physical keyboard

There's a search button and menu button but no back button on the physical keyboard. Somebody should make a mini app that acts as a back button, so we could assign 1 of our 3 keys to the app and have that functionability.
I live in very cold weather and between my fingers getting so cold the buttons wont recognize my press or wearing gloves and having to remove them to hit one of the buttons, this could be a useful app for people (me).
Also a home button app could work as well for them.
What do ya think?
Sent from my T-Mobile G2 using XDA App
+1 for this idea. I wear gloves constantly outside...
I too would like to have a physical back button. +2 to this idea! I couldn't find any easy solution to this on my own, but it would be great to have a back button mapped to the second or third quick key.
Sent from my T-Mobile G2 using XDA App
erm..might sound stupid but does the backspace key not do this already (when not in a text field).
The backspace/delete key does not do this.
I was referred to this post by fellow XDA user nomadism. He writes:
nomadism said:
"user1" "user2" "user3" are the three QuickKeys, starting from the left
Click to expand...
Click to collapse
I set it to "user3", so there won't be any accidents pressing the key.
Sent from my T-Mobile G2 using Tapatalk Pro
Cyanogenmod 6.1.0 stable + ClockworkMod 2.5.1.3 + sonnysekhon's Gingerbread theme
Well with the stock rom and a temp root, it acts like it works but then never does..says I need to reboot to take effect but when I do it doesn't work, am I doing it wrong? I had to use the first version cause the second version of the app would crash on me
collins521 said:
Well with the stock rom and a temp root, it acts like it works but then never does..says I need to reboot to take effect but when I do it doesn't work, am I doing it wrong? I had to use the first version cause the second version of the app would crash on me
Click to expand...
Click to collapse
Pretty sure you need full root / S-Off for this as the /system/usr/ files it overwrites would get reset to stock every time you reboot with temproot.
Well, yeah, it needs root. As the thread says "for full rooted devices. (NAND unlocked. Full, permanent write access to the system dir is needed)".
I'm sure you can't do this without root.
Use your nose to press the soft key, it's usually warmer than your fingers. Also convenient if your hands are full.
Guess this could help:
http://forum.xda-developers.com/showthread.php?t=850464
They got some gloves I think from isotoner, called smart touch, made specifically for touch screen phones. You should check it out.
Sent from my T-Mobile G2 using XDA App
g4rb4g3 said:
Guess this could help:
http://forum.xda-developers.com/showthread.php?t=850464
Click to expand...
Click to collapse
Thats exactly what I use. I also used this program to set "@"to DPAD_LEFT and "www" to DPAD_RIGHT. It works as an up and down button. Like a mini replacement for the trackpad. I figured if ur fingers were too cold to reach the back button, you might could use some help witht that trackpad too ; )

[App] NOT-VERY-INTERESTING Bar

Standard Disclaimer: I am in no way responsible for your device ,marriage, or social life, so don't come crying to me when something happens to one or all of them. You assume all responsibility and risk.
THIS APP IS BETA:
This is a simple app I made for the A100 semi- based off the popular HideBar app by Pieter Pareit. What this app does is allow you to use the capacitive Home Button on the device (A100) to toggle the Notification Bar on/off.
HOW TO SET UP​
Download the two files in the folder
Take the "gpio-keys.kl" file and move it to "/system/usr/keylayout" (make sure to make a backup of the old one before pasting)
Make sure permissions are set to RWXRWXRWX or at LEAST RW-R--R--
Now Install the downloaded APK like normal.
FILES CAN BE FOUND HERE
HOW TO USE​The gpio-keys file basically changes the home button to act as a search button (which this beta app uses) so to use the toggle, just LONG PRESS the search button and select the toggle. The first time it will ask for root permissions. I do recommend setting it as the default app. There is no app icon.
TO DO: This app is in beta, so I need you guys to let me know any bugs you find! Besides that I plan to bypass the need to use a search button.
THANKS TOO: dima_tr for, Pieter Pareit for his HideBar App , sanixk for his tutorial on how to remap hardware keys , crossix for his continued development on this device ,aznmode for letting us all know about HideBar originally , and Acer for a great tablet
Just in case
Sent from my Acer A100 using XDA Premium
What I get no thanks for initially posting the hidebar app? lol. Jk I dont think I was the first one to. Anyway, thanks for this. Will try it out when I get home!
aznmode said:
What I get no thanks for initially posting the hidebar app? lol. Jk I dont think I was the first one to. Anyway, thanks for this. Will try it out when I get home!
Click to expand...
Click to collapse
You actually were the first to post about it xD (at least that I saw) so definitely added your name.
Let me know how it works for you
Sent from my EVO 4G
I can't seem to get this working on my A10. I put the gpio-keys.kl file where it belongs. I installed the apk. Permissions are correct. I may be wrong but seems that the gpio-keys.kl from the download is identical to the one in my "/system/usr/keylayout"
this is the one I downloaded
key 136 SEARCH WAKE_DROPPED
key 139 MENU WAKE
key 102 HOME
key 158 BACK WAKE_DROPPED
key 116 POWER WAKE
key 115 VOLUME_UP WAKE_DROPPED
key 114 VOLUME_DOWN WAKE_DROPPED
this one is my backup copy from "/system/usr/keylayout"
key 136 SEARCH WAKE_DROPPED
key 139 MENU WAKE
key 102 HOME
key 158 BACK WAKE_DROPPED
key 116 POWER WAKE
key 115 VOLUME_UP WAKE_DROPPED
key 114 VOLUME_DOWN WAKE_DROPPED
am i missing something?
You have to change
key 102 HOME
to
key 102 SEARCH
simoneser said:
You have to change
key 102 HOME
to
key 102 SEARCH
Click to expand...
Click to collapse
Yes that is correct I thought I changed it to make it easier I apologize ill fix that.
Thanks simoneser
EDIT:I reuploaded the gpio-keys.kl file. Should work fine now, I apologize.
Sent from my EVO 4G
got it working
I like it so far. I'm going to check it out for a while. Thanks!
Good job! it works great. There is a typo in gpio-keys.kl though, an `s` is the first char.
eww245 said:
Good job! it works great. There is a typo in gpio-keys.kl though, an `s` is the first char.
Click to expand...
Click to collapse
Thanks for letting me know, I reuploaded a fixed version. =)
Hopefully in the next couple weeks ill have a version that doesn't need an extra gpio-keys file and just uses the home button, but that looks like it takes looking into the binding and not just android.intents so with a busy life don't hold me on the time frame
Thanks allot for making the app. Any known issues we should watch out for or things we should avoid doing with it enabled etc?
I did find an issue with using this. I was watching a video in Netflix with my taskbar hidden and the home button worked as a search button only. The long press would not work. I had no way to exit the program without restarting my tab. Any way to fix this? I'm sure there are other apps that would have this issue as well.
Sent from my A500 using xda premium
NoSudo said:
Thanks allot for making the app. Any known issues we should watch out for or things we should avoid doing with it enabled etc?
Click to expand...
Click to collapse
Well the only issue is that at the moment this does call for the search button so any app that doesn't have a need for it won't be able to launch the app.
As for the problem above (cant multiqoute on tapatalk) that's a weird issue , but it seems like it goes along with what I said above and their is no workaround until I make the app use the home button as a "home button"
Sent from my EVO 4G
will you continue to work on this to make it more functional?
thanks for the hard work put in it anyway
nunoruf said:
will you continue to work on this to make it more functional?
thanks for the hard work put in it anyway
Click to expand...
Click to collapse
Oh wow, I almost forgot about this (not in the A100 threads much)
But I suppose it's possible. I'm not very sure about ICS compatibility, but I'll take another look at this soon
Sent from my EVO 3D using Tapatalk 2
Yes, it would be amazing if you could find the time to update this to be ICS compatible!
Yes please make this ics compatible
Sent from my A100 using Tapatalk 2
Any progress on this purty please?
I don't have a comp right now so I can't work on this. Eventually though
Sent from my PG86100 using Tapatalk 2
yes ..
yes...
+1 for ICS compatibility !

[Q] Disable Capacitive Buttons (Q)

Hello Brochachos from all over the world! I was wondering if there was any way to turn off capacitive buttons fully and just use the on-screen soft keys? That would be awesome. Thank you for your insight and help on this fellow xda members! <3 kse91holydiver
kse91holydiver said:
Hello Brochachos from all over the world! I was wondering if there was any way to turn off capacitive buttons fully and just use the on-screen soft keys? That would be awesome. Thank you for your insight and help on this fellow xda members! <3 kse91holydiver
Click to expand...
Click to collapse
I had a mod for the nexus s that disabled the keys, I could adapt it to this phone probably. Using cm9 i'm guessing?
No, actually I'm using AOKP, does that change the difficulty in adapting it?
NVM I looked at your mod and adapted it myself, no flash zip necessary. For anyone else who wants to know you delete the text in /system/usr/keylayout/sec_touchkey.kl and then save changes in a root explorer app.
Is there any trick to turning the lights off on cm9?
Sent from my SPH-D710 using xda premium
Yeah I don't want to completely disable the keys themselves, I just want to turn the annoying, battery-wasting backlight off. The CM9 setting to do so does not work.
webran61 said:
Yeah I don't want to completely disable the keys themselves, I just want to turn the annoying, battery-wasting backlight off. The CM9 setting to do so does not work.
Click to expand...
Click to collapse
I want to know this too.
This was made by T.C.P. But I use it on CM9 Codename and AOKP. Turns off the lights but they still work. Flash in recovery and enjoy.
http://db.tt/clMO98XH
Sent from my SPH-D710 using xda premium
Qwallace70129 said:
This was made by T.C.P. But I use it on CM9 Codename and AOKP. Turns off the lights but they still work. Flash in recovery and enjoy.
http://db.tt/clMO98XH
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
Could I just push this file somewhere in the system? What's the path?
phatmanxxl said:
Could I just push this file somewhere in the system? What's the path?
Click to expand...
Click to collapse
/system/lib/hw/
Push it there and reboot
Some ICS roms like codename have a "lights.sph-d710.so" file so push the the lights.exynos4.so and delete the d710 one then reboot (if that's the case).
batting1000 said:
/system/lib/hw/
Push it there and reboot
Some ICS roms like codename have a "lights.sph-d710.so" file so push the the lights.exynos4.so and delete the d710 one then reboot (if that's the case).
Click to expand...
Click to collapse
Yea I just read the script and did that thanks. It works.
Qwallace70129 said:
This was made by T.C.P. But I use it on CM9 Codename and AOKP. Turns off the lights but they still work. Flash in recovery and enjoy.
http://db.tt/clMO98XH
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
It seems once the d710 file is deleted the brigbtness goes crazy and the widget for brightness stops working, anyone else?
Sent from my SPH-D710 using xda premium
TeamERA said:
It seems once the d710 file is deleted the brigbtness goes crazy and the widget for brightness stops working, anyone else?
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
That's why I said make sure you add the lights.exynos4.so after you delete the d710 file and then reboot.
Don't forget to set permissions before your reboot.
Why would you ever want on screen buttons instead. Phone screens are small as is, and youre choosing to use a portion of it to be dedicated to buttons you already have? Not to mention theyre not as responsive as capacitive buttons and theyre bound to get in the way sooo much more. I think its the worst part of ics, and Ill be dissapointed if the s3 ships without capacitive buttons, even if it does make ot look cooler. And the removal of search and menu is downright retarded
The .so file does indeed work. Thanks so much for the workaround.
Also on the general subject I would much prefer fewer buttons on my mobile device. My HP laptop has capacitive buttons and they are the cause of many headaches. Even the menu button on my E4GT sporadically activates on its own from time to time. Google did it right with ICS and the Galaxy Nexus. The keys are there only when you need them and auto-hide when you don't meaning the screen real-estate is not as much of an issue as one might think.
Sent from my Touchpad using xda premium
webran61 said:
The .so file does indeed work. Thanks so much for the workaround.
Also on the general subject I would much prefer fewer buttons on my mobile device. My HP laptop has capacitive buttons and they are the cause of many headaches. Even the menu button on my E4GT sporadically activates on its own from time to time. Google did it right with ICS and the Galaxy Nexus. The keys are there only when you need them and auto-hide when you don't meaning the screen real-estate is not as much of an issue as one might think.
Sent from my Touchpad using xda premium
Click to expand...
Click to collapse
If they dissapear its rare. And that portion of the screen is blacked out anyways. Ive never had an issue with my capacitive buttons.
webran61 said:
Yeah I don't want to completely disable the keys themselves, I just want to turn the annoying, battery-wasting backlight off. The CM9 setting to do so does not work.
Click to expand...
Click to collapse
Have you tried RootDim, in lock mode?
MultiLockOn said:
Why would you ever want on screen buttons instead.
Click to expand...
Click to collapse
I am trying to do it because my hardware buttons randomly press themselves making the phone difficult to use. I get where you are coming from though.
I'm searching around trying to fix my phantom search button issue but don't want to flash a different rom or start a new thread... I'm rooted with framaroot (great system, so easy to do), have busy box, root browser- virgin mobile S2 SPH-D710, same as the Epic 4G touch. I found a thread in another forum talking about editing the button to simply no longer have a task, but in regards to the menu button and not the search button which is the one that is giving me the phantom issue. Thread is here:
http://androidforums.com/galaxy-s2-...th-ics-jb-phantom-menu-keypress-easy-fix.html
http://forum.xda-developers.com/showthread.php?t=2203059
Anyone know how to go about deleting the functionality of the search button?
I want to take this approach as it seems the only way short of a new/referb or hunting down a custom rom where the software somehow fixes the issue via programming. I did have virgin send me a referb and it had the same issue lol, so working on fixing it the xda way haha. For those with the same issue and wondering what is causing it, IMO the best explanation I found was from another forum, it seems to be hardware, where a screen replacement or capacitor addition is the fix because some S2s had bad quality control and a magnetic shield was not installed correctly and when the cell antenna is in a low reception area, it increases power and that causes an inductive voltage situation or some other power issue and makes the handset think the menu or search button is pressed. I found some who feel that even though it's a hardware issue, of course the software could be set to prevent the cell antenna from 'juicing up' in low reception areas.

Remapping the home button

Ive been trying to make my home button function the same as the power button. First I made a nandroid and rebooted andthen went here--> System/usr/keylayout/generic.kl and changedkey# whatever-said-home to say POWER. rebooted and it didn't work, it worked just like normal. Then I went back and changed every key that said home to power anywhere in the keylayout directories and still, it works like normal! Any advice or knowledge to help me solve this puzzle?
Thanks!
Sent from my Kangadore 64
I'm on an aokp build BTW and I tried the button remapping app as well. Stubborn button =
Sent from my Kangadore 64
Well for starters, did you reboot?
There should be a thread in one of the US variants forums that tells you about the key layouts.
Theres also an app that will give you info on what button you just pushed.
Been a while so cant remember the name and dont know if itll be compatible, but maybe someone else does and will chime in.
Sent from my SGH-T999 using xda app-developers app
I've rebooted with every change. I tried theapp that tells you what button you pushed but it doesn't show what the power or home buttons key in as, its in the FAQ of the app I don't know what the issue is, I can change other buttons around but this one refuses to cooperate.
Sent from my Kangadore 64
mrtoast said:
I've rebooted with every change. I tried theapp that tells you what button you pushed but it doesn't show what the power or home buttons key in as, its in the FAQ of the app I don't know what the issue is, I can change other buttons around but this one refuses to cooperate.
Sent from my Kangadore 64
Click to expand...
Click to collapse
You have to edit the sec-keys.kl file to whatever you want then reboot. Generic.kl only takes effect if sec-keys.kl isn't there. So edit sec-keys.kl then reboot and you should be golden
Sent from my Galaxy Nexus using Tapatalk 2
@OP....
Got a better idea. Download apex launcher, and download screen off and lock.....
Open apex settings, behavior settings, home button...
Have it launch screen off and lock when pressed. Your phone will now turn off when you press the home button from your home screen.
Viola
@elesbb That worked like a champ! Thank you very much
Sent from my Kangadore 64
mrtoast said:
@elesbb That worked like a champ! Thank you very much
Sent from my Kangadore 64
Click to expand...
Click to collapse
Could you be specific as to what you changed exactly. I am also interested in this...... Thanks!
mrtoast said:
@elesbb That worked like a champ! Thank you very much
Sent from my Kangadore 64
Click to expand...
Click to collapse
Glad it worked!
dls5375 said:
Could you be specific as to what you changed exactly. I am also interested in this...... Thanks!
Click to expand...
Click to collapse
all they did was change what function the home button does. Look at a few posts up to see the file they changed and it's quite self explanatory, you will see a list of four buttons and their default assignments. Then you can either disable one by putting a # in front of the entire line or change them to say make the home function as a camera button.
Sent from my SGH-T999 using Tapatalk 2
elesbb said:
Glad it worked!
all they did was change what function the home button does. Look at a few posts up to see the file they changed and it's quite self explanatory, you will see a list of four buttons and their default assignments. Then you can either disable one by putting a # in front of the entire line or change them to say make the home function as a camera button.
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
OK, I got it....just change HOME to POWER and reboot....thanks
dls5375 said:
OK, I got it....just change HOME to POWER and reboot....thanks
Click to expand...
Click to collapse
No problem. Let us know if you run into any issues!

Categories

Resources