[MOD] Remapping The Nvidia Button - Shield Android Development

I was just looking around at ways to remap my Shield's keys and found this nice little trick to turn the Nvidia button into a proper lock button like on phones and tablets, or a home button, rather than launch the TegraZone app (which is basically useless if you don't stream) . Here's how it's done:
You must be rooted to do this
Go into /system/usr/keylayout/ and open the file "gpio-keys.kl"
Go down to the line that says "key 116 STB_POWER WAKE"
Here's where you choose home or lock:
If you want the Nvidia button to act as a lock button, change that line to "key 116 POWER WAKE_DROPPED"
If you want the Nvidia button to act as a home button, change that line to "key 116 HOME WAKE_DROPPED"
Save the file
Restart Shield
Enjoy!

Awesome! Looking forward to trying this out soon.

I actually use the TegraZone app for NVIDIA Grid, but cool find, nonetheless!

But why would you want two home keys?

Because you could possibly use the old home key as something else, or free it up as a mappable key for gaming

OMGrant said:
Because you could possibly use the old home key as something else, or free it up as a mappable key for gaming
Click to expand...
Click to collapse
Yep
Sent from my HTC One mini using XDA Free mobile app

Late, and possibly stupid question, but it's still possible to power on the Shield after that, right ?
There's just something scary about overwriting a line that says "Power Wake"

So anyway, in case you try this, be sure to have Gravitybox installed or something to remap your buttons, because you'll loose access to the power menu

Related

Help: Want to remap hard button

Hi all,
Anyone can help to remap the hard button??
I want to change the Home key to Alt-tab, and the Back key change to OK/Close (1 press for ok and long press for real close the application). I have tried AE button plus, but not function very well.
Attached is the Alt-tab s/w i have used.
Don't know why HTC put a Home and Back key in WM pro device
Thank you very much,
did you reset the device after you changed the settings?
yes, but still doesn't work
There's a software called Hbutton. You might wanna try it.
Just tried Hbutton, but it doesn't work on diamond.........
Awww.. now how am I gonna survive on the diamond without Hbutton?!
There's another software called SmartSkeys (or something oike that) Not sure of it'll work.
Anyone got any suggestions on which software to use to map diamond buttons to many functionalities?
This one works on Diamond: AE Button Plus.
To my understanding from testing AEButton on the Diamond, I have realized that:
The HOME key cannot be remapped.
The Back key is essentially a "WIN" key. You can create a new button and remap the Back key. HOWEVER, the shortcuts DOES NOT WORK when you are at today screen. So here is what I do, I remapped the Back key single click to "Escape". double click to close program, long click to close all programs.
Thats the only logical thing i can think about using the back button due to the limitations.
Any ideas?
Escape = ok/close ?
With AEB Plus I managed to map "action long" to "task manager", but the setting doesn't seem to survive a soft reset.
Problem with TouchFLO 3D.
Disable TouchFLO 3D, you might map home/ok button by mappingware.
Setting -> Personal -> Today -> Items
Use SortInchKey, if you enable TouchFLO, you might map VolUp/VolDown/Ok(exclude Today screen) buttons.
Tried AE Button Plus 2.6.3, the "ok" button in AE Button Plus list can refer to back key, my setting is press 1 to minimize, long press to close current application. However, AE Button Plus can't handle the Home button. I already sent a request to them, hope their next version can sort it out.
I'm posting here to find this later. I use AEB on all my devices and want a Diamond. Hopefully it gets "worked out".
tkhs said:
Problem with TouchFLO 3D.
Disable TouchFLO 3D, you might map home/ok button by mappingware.
Setting -> Personal -> Today -> Items
Use SortInchKey, if you enable TouchFLO, you might map VolUp/VolDown/Ok(exclude Today screen) buttons.
Click to expand...
Click to collapse
Yes, the mappings worked when TouchFLO was disabled. But when TouchFLO was enabled again, the mappings then didn't work.
Can someone please help me?
I use a golf GPS/Scoring program on my diamond (mobile golf scorer) and on it there is an option to use hardware button to turn display on/off, this keeps the gps active permantly. Its mapped in the program as 'button c' which from what i can tell should be the 'right hardware button' on a usual ppc.
I'm trying to map it as 'back button' using AEBPlus but it will only work on the main diamond screen or 'today' screen. I've tried mapping it to various buttons on the diamond but When i start the golf program it does not work.
Has anyone any ideas? I need to remap a button that will turn the display off no matter what i'm running.
Thanks again
I'd love to change the function of the "Back Button" aswell,
it has been annoying me since the first day I got it.
HButton seemed very promising, but sadly, it doesn't work.
Do hardware keys also have a registry number like the softkeys?
Like 112/113 for the softkeys?
Wondering anyone will use "Home" and "Back" button regularly....Maybe u guys can share your experience on how to smartly use this 2 buttons as I don't have any idea.........
Hello everyone!
This topic is very actual especially on all russian forums (hpc.ru 4pda.ru 4pda.info). Did anyone overcomed this difficulty with remapping hardware buttons? I tryed AEButton Plus but I was unsuccessfull in remapping the dimaond's "back" button - is there any one who did it? Please share the experience - it would be very very usefull to remap this button and to bind it to launching Dynamo3 task manager.
Thanks in advance.
ILya.
None of the programs named here work correctly on the Diamond, including AE Buttons Plus.
However, these buttons CAN be mapped. I know that because the capacitive buttons tester program can detect and show that you pressed these buttons. While this program is active, if you press the home key, it shows that you pressed the home key, but you don't go to the home screen. So it's possible, but only HTC knows how. We need their API's.
aydc said:
None of the programs named here work correctly on the Diamond, including AE Buttons Plus.
However, these buttons CAN be mapped. I know that because the capacitive buttons tester program can detect and show that you pressed these buttons. While this program is active, if you press the home key, it shows that you pressed the home key, but you don't go to the home screen. So it's possible, but only HTC knows how. We need their API's.
Click to expand...
Click to collapse
so this method willn't work too? http://forum.xda-developers.com/showthread.php?t=355141
the silly part on the htc side is to have 3 of 4 hw buttons do almost the same - if you are in an application, pressing home, back or hang-up button will act as "escape". am i wrong?
for one thing, it would be at least useful to have an "ok" button.
the ideal setup for me would be to use the "go to the tf3d home tab" function of the home key by pressing the "hang-up" button and use the home key as "ok"...

remap home key and ok key

Hi, I'd like to remap the hard keys as follows:
- Home key -> Start menu
- Back arrow key -> OK button
any clues about what registry entries are these two hidden under?
Telling me the button code is enough... thanks.
Maybe this one helps. Can't test it myself as i have no Diamond yet.
http://forum.xda-developers.com/showthread.php?t=400732
The OK-button might be:
HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\Keys\40C2
nope, no avail - have checked 40C1 to 40C7 but the only thing that fires an event is the green phone long press (40C6), others no avail (
new info - I have found the key codes using AE Button Plus as follows:
- Home button = #00ED (+no flag)
- Back button = #405C (+Win flag)
continuing research...
( No, I simply do not want to use AE Button Plus... )
Any luck on the research?
afaik, once you run touch 3d. The home key will always overwrite by it.....
HButton
I am wondering about the hardware key's to
I use a program (Hbutton) to give more functions to a hardwere button,
only key in HKLM/Software/Microsoft/Shell/Keys called "40C6" (the call button can be used.
does anybody know how to add the rest of the hardware buttons?
- back
- ok/enter
- home
- end/ divice lock (does someone know how to change the hold time)
- up and down?
homeplayer said:
does anybody know how to add the rest of the hardware buttons?
Click to expand...
Click to collapse
I have ended up using AE Button plus. It doesn't initially list the buttons, but you can add them from the file menu.
Now I have control of all my buttons.
but jamesd256, do you know a solution without using AEBplus ? maybe just in modifying registry....

Remapping keys.. [camera]

I am interested in remapping the key to take a photo using the htc camera. Has this been done, or is it even possible? I found nothing specific to the hero in my searches so I'm not sure. I just hate using the trackball.
barnacles10 said:
I am interested in remapping the key to take a photo using the htc camera. Has this been done, or is it even possible? I found nothing specific to the hero in my searches so I'm not sure. I just hate using the trackball.
Click to expand...
Click to collapse
Just edit the heroc-keypad.kl(may have a different name) in system/usr/keylayout;
I always remap my "phone" button to be the "camera" instead, and then I use the "search" button for autofocus.
Decad3nce said:
Just edit the heroc-keypad.kl(may have a different name) in system/usr/keylayout;
I always remap my "phone" button to be the "camera" instead, and then I use the "search" button for autofocus.
Click to expand...
Click to collapse
So I just opened the heroc-keypad and I honestly don't know what to do in there or rather what does what. I'm real interested in this since i don't use my volume keys and eventually when the I1 comes out on sprint which will be the first sprint phone with push to talk and android I would like to port it to our phones (or try) so that we have ptt
thatguythatdid said:
So I just opened the heroc-keypad and I honestly don't know what to do in there or rather what does what. I'm real interested in this since i don't use my volume keys and eventually when the I1 comes out on sprint which will be the first sprint phone with push to talk and android I would like to port it to our phones (or try) so that we have ptt
Click to expand...
Click to collapse
Well essentially it shows you what key does what.
Code:
key 102 HOME
key 139 MENU WAKE_DROPPED
key 158 BACK
key 127 FOCUS
key 231 CAMERA
key 107 ENDCALL WAKE_DROPPED
key 191 DPAD_CENTER
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE
Key 231 is usually "CALL" and Key 127 is usually "SEARCH"
I just went in and changed it to "CAMERA" and "FOCUS" and then pushed the file back to system/usr/keylayout/
You can also change things like "WAKE" if you want the action to wake the phone from sleep. It wouldn't be too hard to create a new action to be called by the physical button push. Though I haven't tinkered around too much with that.
Thanks gonna try some things out
thanks, I might try this. So what happens when you push the phone button on the home screen say. Does your camera boot?
barnacles10 said:
thanks, I might try this. So what happens when you push the phone button on the home screen say. Does your camera boot?
Click to expand...
Click to collapse
Yep, sometimes requires a long-press though.
Then if I push "Search" for auto-focus, followed by "Phone" again for camera, it takes a snap shot.
Really handy.

How to remap the G-key to any app?

I saw threads remap the g-key to camera. But I want to map it to a volume app.
Thanks for the help.
Here is what i found;
1.Firstly, you need a rooted LG Optimus Black.
2.Find the file“TWL4030_Keypad.kl”, it’s in /system/usr/keylayout/
3.Backup the file, copy or rename.
4.Then open the “TWL4030_Keypad.kl”, scroll down to 3rd line from the bottom, it should be “key 95 GESTURE”.
5.If you want to use your phone’s “G Button” as camera button, change it to “key 95 CAMERA WAKE_DROPPED” (Once you launch the camera app, you can press the “G button” to take a picture immediately)
6.If you want to use use your phone’s “G Button as power/lock button, change it to “key 95 POWER WAKE_DROPPED”
7.Save the changes and reboot the device.
also found in here : http://forum.xda-developers.com/showthread.php?t=1194058
You get the trick right? With a little luck you can remap it to anything you want. You can write volume i guess... But volume has 2 options "+" and "-". So even if you manage to do it you will only be able to remap one of them. It's either "volume +" or "volume -" Since G is only one button.
Thanks a lot man!
The Volume i mean is just an ordinary app from the market called "volume toggle free". So an instruction about remapping the gkey to any app should work. How?
BoyBawang2 said:
Thanks a lot man!
The Volume i mean is just an ordinary app from the market called "volume toggle free". So an instruction about remapping the gkey to any app should work. How?
Click to expand...
Click to collapse
Sorry for the confusion. I just saw the volume part. But no need to get excited, i just wanted to help. I'm sure someome knows it and will post it. Good day, man...
do you how to change "g" key to wake up the screen. I'm using marvel 4

anyone interested or know how to change task manager hardkey to menu key

Miss having the menu key..example go to xda app and cannot pull up other options because of this ridficulous hardkey when alternatives exist for task switching. This will need remapping..have seen it done for camera and power but wondered if there is any interest in this. I do I not have a solution but am asking. Thanks.
All you have to do is long press that button and becomes menu
EVOme said:
All you have to do is long press that button and becomes menu
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=56214304&postcount=14
remapped it in case anyone is interested
think long press goes to S finder
Good work, but long press is menu, I use it all the time.
--drl
I used xposed additions module to remap it. Also mapped the volume keys, home and power buttons to change music, play/pause and activate torch respectively while I was at it.

Categories

Resources