[MOD] Remap search softkey to camera - Droid Incredible Android Development

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.

Related

Where can I get a cab for the "end key long press" program?

I have searched the forums long and wide for it and I cannot find it. Is it simly cooked into roms as an oem package or is there an actual cab we can install for those that are using prebuilt roms?
look here
http://forum.xda-developers.com/showthread.php?t=356192
read the first post. I think you will have to create the Long_End.lnk and assigned it to EndKey.exe
this may also be of interest
http://forum.xda-developers.com/showthread.php?t=356322
i'm pretty sure you didn't try the advanced google search. Please use that next time. Searching endkey cab on there gave me a bunch of searches on this thread.
http://forum.xda-developers.com/showthread.php?t=344533
Here you go...
long press delay
is there a way to change the durations of long press?
I think it takes too long for along press end key and long press power keys to work.
I can't seem to find the registry entry where to change.
Any help is appreciated.
thanks
K
thomassster said:
i'm pretty sure you didn't try the advanced google search. Please use that next time. Searching endkey cab on there gave me a bunch of searches on this thread.
http://forum.xda-developers.com/showthread.php?t=344533
Click to expand...
Click to collapse
I actually think he wants "long press power key". That is the one that is cooked into numerous roms. If you search for long press end key, or HTC end key, you will find plenty of threads. Long press power key is a different story.
Edit: Ok I think I was wrong. Long press power key is by Schaps. He wants the long press end key mapped to the red end call button. If you install it normally, which is what you get 10000 threads on if you search, it installs it to the right soft key.
marm0lade said:
I actually think he wants "long press power key". That is the one that is cooked into numerous roms. If you search for long press end key, or HTC end key, you will find plenty of threads. Long press power key is a different story.
Click to expand...
Click to collapse
All you have to do for any of the long or short keys is change the .lnk shorcut name to Long_Power.lnk or Short_Power.lnk or Long_Send.lnk or Short_Send.lnk or Long_End.lnk or Short_End.lnk, etc. etc. etc.
If you rename or create a shortcut name as above & point it to the program you want to run & then place it in the \Windows directory it will work.
You don't need a cab, or any configuration tool.
I know something much better:
AE Button Plus http://ae.inc.ru/aebplus.php, you can give any button a long press function of even a double/triple click function.
You can use it for free.
I use the Internet buttons double click for toggling bluetooth, the Email buttons double click for toggling WiFi, the left softkeys press+hold for devicelock and the enter keys press+hold for AltTab.
You know you can do all of that without adding a few more mb's to your system & another startup app. AE Button works don't get me wrong, but it's not for me since I can accomplish everything it does already from the registry. (The keyboard driver contains all kinds of neat shortcuts you can use, you only have to disassemble it to see). It's great for a novice though.
There is another easy way to configure this. (No need to install HTC End Key)
Install Schaps Advanced Config.
Then go to Menu, Key Mapping and choose what you want for Long Press Send Key, End Key and Power Key.
johanromijn said:
There is another easy way to configure this. (No need to install HTC End Key)
Install Schaps Advanced Config.
Then go to Menu, Key Mapping and choose what you want for Long Press Send Key, End Key and Power Key.
Click to expand...
Click to collapse
I did this but everything except the first two (left and right softbuttons) are grayed out - I can't change what's there. What am I doing wrong?
Mike
same here..any solutions?
johanromijn said:
There is another easy way to configure this. (No need to install HTC End Key)
Install Schaps Advanced Config.
Then go to Menu, Key Mapping and choose what you want for Long Press Send Key, End Key and Power Key.
Click to expand...
Click to collapse
Wow - I've been using Advanced Config for ages (consider it essential) but had no idea it handled key mapping. Good to know.
I just tried it on my problem though and it's a no-go. My problem is that HTC End Key is cooked into the ROM I'm using and neither remapping through Advanced Config nor manually adding a shortcut (in this case ArkSwitch.lnk renamed as Long_End.lnk) works - the stupid HTC End Key programme just pops its ugly head up instead offering me a handful of useless options I can't change.
Any ideas? I'm using a 6.5.x ROM so HTC Task Manager doesn't work and ArkSwitch doesn't always open when clicking the title bar, due to the notification drop down, and I need quick access to a task manager.
Btw I use my phone's GPS for work a lot (in landscape mode) so Long_Send is already mapped to Rotate Screen.
Can anybody help?

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.

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

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

Categories

Resources