Remapping keys.. [camera] - Hero CDMA Q&A, Help & Troubleshooting

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.

Related

Is it possible to assing a HW button to X/OK

Sometimes it is hard to press/touch accurately the small X or Ok button in the upper right corner. Is it possible to assign a HW button to it?
would be good to have the back HW button work as the x button!
WiZARD7 said:
Sometimes it is hard to press/touch accurately the small X or Ok button in the upper right corner. Is it possible to assign a HW button to it?
Click to expand...
Click to collapse
The button with the arrow left on your diamond actually does exactly what you want.
The only program that comes close to assigning any Diamond hardware key to anything is ae buttons plus, so try that.
aydc said:
The only program that comes close to assigning any Diamond hardware key to anything is ae buttons plus, so try that.
Click to expand...
Click to collapse
Yup. I used to use AE Button Plus when I first got my Diamond and had the (backarrow) key mapped to the Close Application function (as in terminate not minimise). Used to work well for me but then I stopped- you don't really need more than the original function of backarrow (minimise), what with all the performance enhancements the custom ROMs bring about.
yeah...that's what the back button does...the one with the left pointing arrow! it's an OK-cum-Back button...
it works for minimising/closing programs too

[MOD] Remap search softkey to camera

I TAKE NO CREDIT FOR THIS LITTLE HACK, THIS WAS DONE FOLLOWING THE INSTRUCTIONS FROM THIS SITE.
ALL CREDIT GOES TO Decad3nce for making this as easy as 1,2,3.
---------------------------------------------------------------------------------------------------------------------------
THIS SHOULD WORK ON ANY 2.2 ROM. I DON'T KNOW ABOUT 2.1.​--------------------------------------------------------------------------------------------------------------------------------------------------------------
***INSTRUCTIONS***​
1) Download the file HERE
2) put the "incrediblec-keypad.kl" file you just downloaded into the TOOLS folder of your Android-SDK folder.
3) run this:
Code:
adb remount
adb push incrediblec-keypad.kl /system/usr/keylayout
4) Reboot your phone, and then long press the search key to check it out!
-------------------------------------------------------------------------------------------------------------------------------------
UPDATE​
Big Thanks to Touchpro247 over on at for putting together a .zip to flash via recovery!
"Just install via recovery.
or
Un-install via recovery."
no way! i requested this exact feature a while ago on android forums but seemed nobody was interested. so i gave up, haha. so stoked to see this, at work right now, but i am def gonna install this when i get home. thank you!
Awesome find! I like to use my voice search for the search button so I instead mapped camera to the long press menu button.
Is there a way to get this working with optical pad?
Didn't think the whole menu button thing to thoroughly. Going back to Search button.
Thanks a bunch for the support guys!
I'm not too sure about the optical trackpad sorry man!
Would people be able to use Root Explorer to copy the file into designated location? I renamed the original file, just to be safe and copied the new one...then rebooted and it disabled all the soft keys...so I am back to the original for now.
Here's an update.zip for it.
Just install via recovery.
or
Un-install via recovery.
Thanks for posting!
touchpro247 said:
Here's an update.zip for it just install via recovery.
Thanks for posting!
Click to expand...
Click to collapse
Awesome touchpro...
Reason, I did it that way was I wanted to keep the original for backup. I will try update.zip. Thanks!
Tats_06 aka olta777
touchpro247 said:
Here's an update.zip for it just install via recovery.
Thanks for posting!
Click to expand...
Click to collapse
Your welcome man, thanks for posting this, I tried and tried to do this and couldn't get it. I appreciate it. updating OP.
op, thanks for posting
When I edited the the incrediblec-keypad.kl file to use a long press of the Menu button, the short press of the Menu button stopped working. So, no more menu access.
What am I doing wrong? Thanks.
Code:
key 107 ENDCALL WAKE_DROPPED
key 116 POWER WAKE_DROPPED
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE
key 217 SEARCH WAKE_DROPPED
key 158 BACK WAKE_DROPPED
key 139 CAMERA WAKE_DROPPED
key 102 HOME WAKE_DROPPED
So, would replacing the key ID with the ID of the optical trackpad button work?
Good questions guys I wish I could be of some help but I don't know much about this stuff
WOW, this works perfectly! Thanks for posting...I always hated the search button anyway.
INTREPID-NY said:
When I edited the the incrediblec-keypad.kl file to use a long press of the Menu button, the short press of the Menu button stopped working. So, no more menu access.
What am I doing wrong? Thanks.
Code:
key 107 ENDCALL WAKE_DROPPED
key 116 POWER WAKE_DROPPED
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE
key 217 SEARCH WAKE_DROPPED
key 158 BACK WAKE_DROPPED
key 139 CAMERA WAKE_DROPPED
key 102 HOME WAKE_DROPPED
Click to expand...
Click to collapse
Curious, did you edit it in a "unix" editor? If you used something like notepad to change it and save it, it would be saved in the DOS format. I wonder if using something like Textpad to open and save it in UNIX text format would make it work...
I used ultraedit - it may have saved it in DOS format. I'll give it another try and make sure it saves as Unix.
Is there a way to make the the search function still work on a short press? When I short press my search button it does nothing but when I long press it brings up the camera...any fix would be great thanks!
AisforAustin said:
Is there a way to make the the search function still work on a short press? When I short press my search button it does nothing but when I long press it brings up the camera...any fix would be great thanks!
Click to expand...
Click to collapse
if you do that, it may wanna bring up the search menu while you are taking a picture with this button (when camera app is open).
Farenhe1t said:
WOW, this works perfectly! Thanks for posting...I always hated the search button anyway.
Click to expand...
Click to collapse
yes , I think so.
Can anyone point me in the right direction of a droid incredible keymap? It doesn't seem that pressing the optical track pad button is mapped to anything easily recognizable in the qwerty.kl file, so I'm not sure how to find the button's ID. I looked in the optical trackpad wake thread, but the only difference I could see between that file and the one on my phone is that key 232 was changed from WAKE to WAKE_DROPPED, which I imagine wouldn't change whether the key could wake from sleep or not. I tried using the zip in this thread modified to sub in key 232 (dpad center, seems like maybe thats opti trackpad press) but it did not launch the camera as expected.
As far as I'm concerned, the ideal button mapping would be pressing the opti track pad to launch the camera app, and swiping any direction on the opti track pad to take a picture from within the camera app. First step is to get that button to launch the app, which is preferable to rebinding search, since the opti button isn't used for anything anyways.
Any help would be greatly appreciated.
im currently trying to remap the short press on my milestone to act as the long press (so i can set it to open quick settings on short press) and then the long press can be set to the search. could anyone point me in the right direction? i know how to remap keys but im having trouble changing the short and long press for my search key.

Replace Long Press Home?

Is there any way to replace the Long Press on the Home Button?
As in, make it open Switcher, or some other multi-tasking app.
CyanogenMod has this, and I was wondering if it could be ported to another ROM somehow.
I think I might actually know this one. I can't find the exact thread cause for some reason search has been broken for days for me.
In the /system/usr/keylayout folder is a file called melfas-touchkey.kl
I think that's the file that controls the keypresses for those buttons. I'd have someone smarter then me come and verify that though.
miztaken1312 said:
I think I might actually know this one. I can't find the exact thread cause for some reason search has been broken for days for me.
In the /system/usr/keylayout folder is a file called melfas-touchkey.kl
I think that's the file that controls the keypresses for those buttons. I'd have someone smarter then me come and verify that though.
Click to expand...
Click to collapse
Inside, all it says is:
Code:
key 158 MENU WAKE_DROPPED
key 139 HOME WAKE_DROPPED
key 28 BACK WAKE_DROPPED
key 107 SEARCH WAKE_DROPPED

[Q] use the "button remapper" 2 use the "G" key as camera button???

[Q] use the "button remapper" 2 use the "G" key as camera button???
can we use the button remapper to reassign the "G" key (it is useless in CM7) to work as a dedicated camera button???...just an idea though....i tried it myself, but the app was not identifying the "G" key. can any1 of you try it and post whether they succeed in this?...if so, how??
Button Remapper doesn't get the G key (key 95) because it isn't mapped in CM7. So it can't be remapped.
Get Root Explorer, go to system/user/keylayout and open querty.kl in text editor (mount r/w in Root Explorer and long-press the file). Add KEY 95 CAMERA
I believe it is. Save and reboot.
Enviado desde mi LG-P970 usando Tapatalk
Yeah.. I did this and it worked (only to start the camera) but when you try to capture a picture, it doesn't.
Lleweraf said:
Yeah.. I did this and it worked (only to start the camera) but when you try to capture a picture, it doesn't.
Click to expand...
Click to collapse
Try this
key 95 CAMERA WAKE_DROPPED
It should launch the camera + take a picture. At least it did in NOVA. Hey in CM7 when you press to take a picture, it is taken with no preview for some seconds then. Just make sure in the little gallery button after pressing button
antonio1475 said:
Try this
key 95 CAMERA WAKE_DROPPED
It should launch the camera + take a picture. At least it did in NOVA. Hey in CM7 when you press to take a picture, it is taken with no preview for some seconds then. Just make sure in the little gallery button after pressing button
Click to expand...
Click to collapse
still, it only launches camera
but thanks anyway
i use it as the "power and wake" button
i don't have the original CM7 camera app on my cell. i deleted it as i found don't actually use it.
so, i added "key 95 POWER WAKE_DROPPED" as mentioned in the following comment and it worked!!! now i use it as my lock/wake key instead of the upper one as it more comfortable than the actual lock key
http://forum.xda-developers.com/showthread.php?t=1194058
If I edit this file system/user/keylayout/querty.kl to add the G buttons and then use the button remapper? This work? I can't test it right now...
I can only lock the device, I can't unlock it...

[MOD] Remapping The Nvidia Button

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

Categories

Resources