So I've just installed CM9 ICS on my Samsung Epic 4G. The problem is, I want to add WAKE to the Camera button, however it is not listed in the "cypress-touchkey.kl" keylayout file. I figured I would change it in the Generic.kl file, but that doesn't seem to work.
In 2.3, the camera button was in keylayout, but this is not the case for CM9. I tried added the Camera entry with 212 on the cypress.touchkey.kl but no luck. What should I do?
Thanks in advance for any and all help.
I believe I saw that option in the settings somewhere
phonehunter59 said:
I believe I saw that option in the settings somewhere
Click to expand...
Click to collapse
While I do appreciate the response, this in no way shape or form actually helps me. Let's say for instance that there is an option in Settings, saying "somewhere" doesn't really help. Second, I asked about the keylayout files. So even if there is a way to do this in the Settings page (which I don't think there is), I was still talking about keylayout files for a reason.
Sorry for sounding rude, but your response does not help me whatsoever. It's like saying that the answer is on the Internet... that's great and all and I'm sure it's on the Internet somewhere, but if I don't know where, then the answer is pretty pointless.
I apologize for my post and I was wrong anyway, there is no option. Sorry for taking your time
Sent from my SPH-D700 using Tapatalk
Solution
So after messing around with a few things, I finally found the solution which I will list below:
- To change Camera Button you need to edit s3c-keypad.kl
- To change Power Button, Vol+, Vol- you need to edit victory-keypad.kl
- To change soft keys (i.e. home button, menu, back, search) edit cypress-touchkey.kl
So to conclude, it is actually a combination of keylayout files. Please note that there are other listings for the buttons in various keylayout files such as Generic.kl, however do not edit these because they are not what the phone uses. I have tried almost all of the above keys and they have remapped successfully so long as you edit the key values in the .kl files listed above.
I hope this helps someone else who had the same problem.
steven.smith said:
So after messing around with a few things, I finally found the solution which I will list below:
- To change Camera Button you need to edit s3c-keypad.kl
- To change Power Button, Vol+, Vol- you need to edit victory-keypad.kl
- To change soft keys (i.e. home button, menu, back, search) edit cypress-touchkey.kl
So to conclude, it is actually a combination of keylayout files. Please note that there are other listings for the buttons in various keylayout files such as Generic.kl, however do not edit these because they are not what the phone uses. I have tried almost all of the above keys and they have remapped successfully so long as you edit the key values in the .kl files listed above.
I hope this helps someone else who had the same problem.
Click to expand...
Click to collapse
DO you or any one Know how to make the camera key launch a different camera app? i want it to start the MIUI camera but if i have both installed the cm9 camera starts with the camera hardware key.
Related
Hi, I was wondering if I could remap the trackpad button on my Droid Incredible to the home button. Kind of like how if you press the center button on the iPhone, it goes back to the home screen. Is this possible? and I do not want to flash another ROM. Thanks.
Uhm, this phone already has a "home" button.....
mmmark111 said:
Uhm, this phone already has a "home" button.....
Click to expand...
Click to collapse
can't we just answer the question? sometimes ppl. I would assume if he has a dinc he knows about the home shaped icon under the screen there, with that said I've never seen this question asked b4 but would assume no bcuz of already in place "home" button
Sent from my ADR6300 using XDA App
I know there is a button, but I want to use the track pad button for the same function.
I think this would be useful as well.
JC
Look at the Optical joy stick wake thread. It's in the keymap file somewhere. I don't know what all you can remap it too but I know they remapped it to wake the device (though inconstantly but thats a sleeping problem)
Just a thought, but would you not loose all of the intended functionality as a result of doing this? For instance, how would you take a picture or record a video?
I have ruby rom so there already is a record button or camera button on the screen itself so it's not a problem.
-steve
Redemption rom use to have a tweak that let you hold down the search button key and it would start the camera application. This was done by editing the incredible-keypad.kl file in /system/usr/keylayout and changing the line "key 217 SEARCH WAKE_DROPPED" to "key 217 CAMERA WAKE_DROPED" i figure you could add a line "key 232 HOME WAKE_DROPPED" and get the home to open when the trackpad was pressed, but that didn't worked.
I've been trying to remap my trackpad to camera since I rooted my phone and still can't get the working. I hope this thread will spread some light on how to properly remap the DPAD_CENTER button.
stevethekorean said:
I have ruby rom so there already is a record button or camera button on the screen itself so it's not a problem.
-steve
Click to expand...
Click to collapse
Those two aplications remove the need for the trackpad button, however its usefulness doesn't end.there. the.ability to.scroll through text to edit without endlessly, 'push and pray' u get it in the right spot I would.imagine would get lost as well. The trackpad also can seek in some flash players too.
Sent from my ADR6300 using XDA App
Okay. So this is not possible at all? Because i can edit text by zooming in on the website...
-steve
It doesn't seem to be possible... or if anyone has figured out how they don't want to share. Editing the kl files doesn't work like it does for other hardware buttons. Here's my thread asking the same thing:
[Q] Can't remap optical joystick?
would this be possible
if you were to look at the file text for the real home key maybe if you copy-pasted that txt into your trackpad txt file it would do the same function .......just a thought
So I'm looking at remaping the soft keys (specifically the search) on the front of the phone. There appears to only be one "SEARCH" in the /system/usr/keylayout/vision-keypad.kl - key 217 (see code below) - that if changed has the following 2 effects:
1. Alters the functions of both the soft key on the front of the phone and the search key on the hardware keyboard. When I remap one, they both change to match your modification.
2. When changed, long press functionality of the soft key is lost. It will only accept a short press.
"SEARCH" can be successfully changed to "MENU", "BACK", and "CALL" (possibly others I have not tried) then pushed to the phone in recovery and function perfectly. However, when I map it to be the "POWER", the soft key does nothing on press, while the hardware search key on the slide-out works fine.
Has anyone found a way around this?
We remap the track pad to wake because we dont like using the top mounted power button, but it only does a half-ass job because when you want to shut the screen back off, you still have to reach for the power button. I think the track pad wake mod needs its own 'bacon bits'
Code:
# column 0
key 185 USER3 WAKE_DROPPED
key 100 ALT_RIGHT WAKE_DROPPED
key 217 SEARCH WAKE_DROPPED
key 28 ENTER WAKE_DROPPED
key 38 L WAKE_DROPPED
key 14 DEL WAKE_DROPPED
key 54 SHIFT_RIGHT WAKE_DROPPED
I think you're out of luck with regard to an easy fix. I just did a quick experiment with evtest and it looks like the softkeys on the screen are just areas of the touchscreen that the window manager treats specially and generates synthetic key events in response to touches on, instead of being actual mappable keys.
teferi said:
I think you're out of luck with regard to an easy fix. I just did a quick experiment with evtest and it looks like the softkeys on the screen are just areas of the touchscreen that the window manager treats specially and generates synthetic key events in response to touches on, instead of being actual mappable keys.
Click to expand...
Click to collapse
Well the are mappable. I managed to make it be the menu button and the back button just fine. It just doesnt want to be the power button..
The same key can be used as a single quick press or a long press. It is considered two different keys though. So you would have to figure out what the long press equivalent of the search button would be and change that one.
The way this thread can stay in developmental, is show steps on how you are remapping the keys.
For others to gain knowledge or this thread is moving to Q&A
Mikey1022 said:
The way this thread can stay in developmental, is show steps on how you are remapping the keys.
For others to gain knowledge or this thread is moving to Q&A
Click to expand...
Click to collapse
Maybe I'm off here, but if I was making this post to show the steps, would that not fall under a "How To" or "Guide"? My goal here is development. Development –noun 1. the act or process of developing; growth; progress. Or in my case, I'm in the act/process of developing a remapped key file to make the search soft key into a power key, and to then share with the rest of the forum. My progress so far is that I've managed to map it to a menu key and a back key with no problems, and am reaching out to others for help as to why it is that when I change it to the power key, it doesn't accept my changes.
Its kinda a gray zone, in that if I were to successfully remap it to the power button and post the file here, it would, technically speaking, be less of a development thread than it is now - because it would be finished developing and instead, merely contain a file with instructions.
However, as requested, and for those who are interested:
The file you are looking for, is as mentioned in the OP, "vision-keypad.kl" and is located in /system/usr/keylayout. You can edit it with a text editor like Notepad++. The line that I am looking at, also refer to OP, is key 217.
I'm thinking now, after messing with it some more, that maybe because it is a soft key it cant be mapped to power, being that as soon as the screen shuts off it no longer functions... But then again there exists widgets that, upon press, turn off the screen and they function fine, so I see no reason this shouldn't. I'll keep you posted on what I find, and would appreciate any help in the mean time.
i'd love to be able to map a longpress menu and a longpress back action. Cyanogen 6.1 allows longpress back to be turned into force kill foreground process. So there is a way to capture longpress on those 4 keys, the question is, what does the system read that keypress as and how can it be mapped.
sundar2012 said:
i'd love to be able to map a longpress menu and a longpress back action. Cyanogen 6.1 allows longpress back to be turned into force kill foreground process. So there is a way to capture longpress on those 4 keys, the question is, what does the system read that keypress as and how can it be mapped.
Click to expand...
Click to collapse
So it is doable! There are some .bin files in the /system/usr/keychar folder that correspond to the .kl files in the ../keylayout folder, but i havent been able to read them. Maybe thats it.. Gonna figure that out when I land tomorrow and get my computer set up
I changed the Search function key to Camera and it only works on a long press and I get no result on a short press. So maybe the function you are trying to rename the Search key to has to be specific to either way i.e. short or long press but not both.
So it will either work as a long press key for some functions or a short press key for others.
Read the window manager source (from AOSP or CM), determine what scancodes it synthesizes in response to touches or long-touches on the softkeys, edit keylayout accordingly.
Doesn't ButtonRemapper from Android App Dev section work on G2? :S
hey guys, i dont know if you all figured this out or not, I just got the g2, and to remap the key to power button you have to change it to "ENDCALL" not "POWER", after, reboot and voila! your search button now acts like a power button!!!!! Hope this helps!!!!!
Need to Map Back button to one of the soft key
Rceently I bought HTC Desire Z (no warranty), and I am facing the problem with 4 bottom buttons of the touch screen (menu, back, home and search). So I am planning to do hardware map for one of the softkeys to BACK button.
Could you please provide me step-by-step installation of all the softwares and the procedure I need to do for updating "vision-keypad.kl" file. Appreciate your help.
My one more doubt is that what is the difference between "WAKE_DROPPED" & "WAKE". I have seen these keywords in ".kl" file in GITHUB.
Please give me reply ASAP. I am frustrated with the way the mobile is working. Just imagine how it will be if back button stop working and you are in the middle of some application. I restarted my mobile some dozens of times.
Hey all,
I disabled the lockscreen on my arc because I found that with my case I don't have any issues with pocket dials and etc.
However now to turn on my screen I prefer to press the home button (rather then the unlock button on top). But whenever I press this button I find 9 times out of 10 the screen turns on, has lag for 1-5 seconds, then the recent apps drawer opens up. It does this even if I just tap the home button when its off. It seems when the phone is sleeping it thinks my quick press of the home button is a long press (causing the drawer to open up)
Is there any way to disable the recent apps from popping up? Or possible change the button that opens it? I am using Apex launcher and I don't see this as an option in there, I would like to stick with the same launcher if I can avoid changing.
Thanks everyone.
Edit: Sorry mods, meant to post this in Q & A
Anyone have any ideas? I am not finding much by searching.
You can use a mod to use volume buttons for wake
Via Mobile
U could check how to change hardware button map
sdk16420 said:
You can use a mod to use volume buttons for wake
Click to expand...
Click to collapse
That does work actually, but I would really prefer to use the home button.
deniel said:
U could check how to change hardware button map
Click to expand...
Click to collapse
This sounds pretty good, any idea how I would go about that?
Thanks again guys
Jay_42 said:
This sounds pretty good, any idea how I would go about that?
Thanks again guys
Click to expand...
Click to collapse
im not sure try to look at /SYSTEM/USR/KEYLAYOUT/pm8058-keypad.kl (dont know if the name is that also for u) but this will change all option for a specif key. look other file around there in tht folder. i never did im sorry
There is also the Generic.kl file with all buttons and their function, the 102 is the home if im not wrong and the 139 the menu. Try to look if u find something like a line where it say that the 102 open the recent app and give it to someone. i dont have idea if this work xD
deniel said:
im not sure try to look at /SYSTEM/USR/KEYLAYOUT/pm8058-keypad.kl (dont know if the name is that also for u) but this will change all option for a specif key. look other file around there in tht folder. i never did im sorry
There is also the Generic.kl file with all buttons and their function, the 102 is the home if im not wrong and the 139 the menu. Try to look if u find something like a line where it say that the 102 open the recent app and give it to someone. i dont have idea if this work xD
Click to expand...
Click to collapse
Hey there, sorry it took me a bit to get back to you.
So I went and tried this to no avail. Searched almost every file/folder (keyword search) for home, hold, and recent. It came up with nothing that looked any different then the other stuff. I am sort of thinking I am out of luck here.
Unless there is a way to edit my CPU settings to make it boot faster from sleep (thus preventing it from lagging/thinking I am holding the button?)
Alright, im on Stock Deodexed Rooted LJ7. I know that adding
qemu.hw.mainkeys=0
to the build.prop forces the navigation bar to show up, but can someone help me figure put which files to edit(presumably in /system/usr/keylayout) to disable the Menu and Back keys, and have the Home button launch the camera on a long press, and take a picture on short press? I know it's possible, I just don't know what to edit specifically.
Edit: went ahead and tried this. Instructions were for CM10, but I tried them anyways.
Changing the physical button is a matter of editing .kl files in usr/keylayout. For those, edit sec_touchkey.kl, sec_keys.kl and Generic.kl.
In sec_touchkey just change MENU and BACK to either VIRTUAL or (undefined)
In sec_keys and Generic change Button 172 from HOME to CAMERA.
Click to expand...
Click to collapse
Doing so does disable the menu and back keys but does not seem to change the home to camera, but instead the home button does nothing. Doesn't wake the screen, go home, take pictures, anything. Any advice? Gonna try again, fresh.
Edit 2:
Same result. Any suggestions?
Posted by Mr. Z's Galaxy S3.
I'm looking too but I did find this that might help with just disabling back and menu
http://forum.xda-developers.com/showthread.php?t=1982000
or try this
http://www.ehow.com/how_12031565_change-key-mappings-android.html
FrameCityJackal said:
I'm looking too but I did find this that might help with just disabling back and menu
http://forum.xda-developers.com/showthread.php?t=1982000
or try this
http://www.ehow.com/how_12031565_change-key-mappings-android.html
Click to expand...
Click to collapse
As for the first link, I've stumbled across that already and made his modifications. Worked great. Now I just need to get the home button to act as a camera button
Posted by Mr. Z's Galaxy S3.
I'm still looking I'll notify you when I find out. I swore someone wrote a tutorial on how to do it.
FrameCityJackal said:
I'm still looking I'll notify you when I find out. I swore someone wrote a tutorial on how to do it.
Click to expand...
Click to collapse
I know they did for CM10, but that didn't work on Touchwiz.
I tried replacing any and every reference to "HOME" I could find to "CAMERA" in the .kl files, but nothing seemed to work. Then again at the end of that day I had managed to bork my .kl files and none of my hardware buttons worked lol(power button for 8seconds still rebooted it, so I got to recovery and fixed it )
Posted by Mr. Z's Galaxy S3.
Try this out then go thank them lol
Kailee said:
Yes, in the gpio-keys.kl file, use CAMERA for key 172, like this:
Code:
key 172 CAMERA
Do note that you will have to hold the home button for a few seconds for the camera to start.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=34271673#post34271673
FrameCityJackal said:
Try this out then go thank them lol
http://forum.xda-developers.com/showthread.php?p=34271673#post34271673
Click to expand...
Click to collapse
We don't have that line in that file. Home is listed as 102, and I tried editing it, but that didn't work.
Posted by Mr. Z's Galaxy S3.
I'm on Madmack's 11/26/13, CM11 build and I'm trying to remap the extra quick launch button we have above the volume rocker on CM11 - basically I want it as my camera button.
I've been able to do this on other phones by manual editing the proper keyboard layout file.
The hardware keyboard layout file for the LGOP on CM11 appears to be: /system/user/gk-keypad-8064.kl
The quick launch button is Key 250 and by default its set to ASSIST (which launches the Search function oddly enough).
Normally just changing ASSIST to CAMERA and rebooting is sufficient to launch the CAMERA functions - doesn't work with my LGOP on CM11. However, once changing Key 250 to CAMERA, it does take pictures if you manually launch the camera app.
Switching it to Key 250 CAMERA WAKE oddly enough makes the quicklaunch button function exactly the same as when you press down on the screen for 2+ seconds and the home screens shrink to the center and Wallpapers/Widgets/Settings pop up.
I can tell you that changing Key 250 to POWER, VOLUME_UP, VOLUME_DOWN, HOME all work... just can't get the CAMERA function to work.
Any thoughts or ideas? Any help would be appreciated.
I have no idea but this is would be great. I hope someone can chime in to help you out.
Sent from my LG-E980 using xda app-developers app
hey, decompressed an old nandroid of the stock rom...
i'm pretty sure i had the quicklaunch button set to the default "press to launch camera/press again to snap a pic" action, and my gk-keypad-8064.kl had key 250 set to QUICK_CLIP
Can we set it to a particular app? particularly to display recent apps?
Isn't there a "buttons" section in the phone settings? I used that to switch search function to camera and tested, it works great. Only downside is its not a 2-step shutter button lol.
Hi have you tryed changing it to camera wake_dropped? ive remapped another LG phone and that was the code i used. ill try it now aswell
BraveDemon said:
I'm on Madmack's 11/26/13, CM11 build and I'm trying to remap the extra quick launch button we have above the volume rocker on CM11 - basically I want it as my camera button.
I've been able to do this on other phones by manual editing the proper keyboard layout file.
The hardware keyboard layout file for the LGOP on CM11 appears to be: /system/user/gk-keypad-8064.kl
The quick launch button is Key 250 and by default its set to ASSIST (which launches the Search function oddly enough).
Normally just changing ASSIST to CAMERA and rebooting is sufficient to launch the CAMERA functions - doesn't work with my LGOP on CM11. However, once changing Key 250 to CAMERA, it does take pictures if you manually launch the camera app.
Switching it to Key 250 CAMERA WAKE oddly enough makes the quicklaunch button function exactly the same as when you press down on the screen for 2+ seconds and the home screens shrink to the center and Wallpapers/Widgets/Settings pop up.
I can tell you that changing Key 250 to POWER, VOLUME_UP, VOLUME_DOWN, HOME all work... just can't get the CAMERA function to work.
Any thoughts or ideas? Any help would be appreciated.
Click to expand...
Click to collapse
A similar question
In looking through the forums, this thread seemed to be the closest to users having a similar situation to myself. I have an LGOP running the latest nightly of CM11 and I would also like to map the quick search button to a different function. While there are buttons options to set it to launch the camera app, it launches the default camera app and I would like it to launch the latest version of Google's camera app. Does anyone know how to do this?
Gravity box I think can pull it off
2SHAYNEZ
WEll I was searching for something similar, to remap our Quick button and assign anything to it! and I have found an xposed module which can do the job here you go: https://play.google.com/store/apps/details?id=com.spazedog.xposed.additionsgb