[Q] Wake up device with camera focus button - Xperia Z1 Compact Q&A, Help & Troubleshooting

Hi
I previosuly had an Xperia S, and there was an easy mod to wake up the device using the camera button. I have been trying the same thing to work on my Z1 compact but so far I have only been able to break the button.
I did this:
With root exploring app, went to /system/usr/keylayout and opened file gpio-keys.kl
This has only four useful lines:
key 115 VOLUME_UP
key 114 VOLUME_DOWN
key 528 FOCUS
key 766 CAMERA
I modified to this:
key 528 FOCUS WAKE_DROPPED
Howevera after saving and rebooting, camera button becomes unresponsive (not even full press works). Any suggestions?
Thanks

If I remember correctly, there's an xposed module that let's you rebind hardware keys.
Sent from my D5503 using Tapatalk

Have solved my remapping problem below with the xposed module "XPOSED-EDGEPRO":
https://forum.xda-developers.com/xposed/modules/xposed-edgepro-v2-0-release-t3525566
easy going, works like a charm
---------------------------------------------------------------------------------------------------------------------------------------
The Power Button of my Z1 Compact is working very unreleiable since I dropped the device 2 weeks ago
So I wanted to remap the Power to the Camera Button. Therefore i have tried the Xposed Additions Module.
Unfortunately it seems that the Module isn't working on my phone. All remapping tryouts with the Xposed Additions module did not work.
So I wanted also to remap Buttons via "/system/usr/keylayout and opened file gpio-keys.kl"
Can anyone help me with information on how this file needs to be adjusted for switching these Buttons?
Thanks a lot in Advance!

Related

Remapping soft keys

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.

[HOW-TO] Remap trackpad actions

Hi all,
My hardware keys are becoming uresponsive, so i'd like to know if I can remap the trackpad actions to act as the hardware key buttons.
I've been searching the forums for some time but coudn't find an answer.
I've also tried to remap the keyboard layouts, editing the system/usr/keylayout/bravo-keypad.kl and system/usr/keylayout/qwerty.kl and adding the lines:
key 105 BACK
key 108 HOME
key 103 MENU
but no luck.
Do you know if this is possible?
hi
i know it's a bit late but i just found your thread today. i found a way to remap the actions of the trackpad to HOME, MENU, BACK and SEARCH, by moving your finger up, down, left and right. to use the mod you need a rooted device to update the kernel with a modified one. if you still interested i'am able to compile you one with this mod
jaspie

[TUT] Disable capacitive buttons stock Xperia S

1.Make sure you have on-screen buttons enabled i recommend: http://forum.xda-developers.com/showthread.php?t=1940842
2. Download a root file explorer. Root Browser Lite --> http://goo.gl/b9ISW This is what I will use.
3.Load up Root Browser and navigate to system>usr>keylayout. We will be looking for a file called "clearpad.kl".
4. Select it and hit "Open as..." then "Text file" then "RB Text Editor"
5. Now we see this:
key 139 MENU VIRTUAL
key 102 HOME VISUAL
key 158 BACK HOME
Click to expand...
Click to collapse
All you have to do is option out the keys you don't want to work with a #. So if you are like me and think the home button is fine, it will look like this.
#key 139 MENU VIRTUAL
#key 102 HOME VISUAL
key 158 BACK HOME
Click to expand...
Click to collapse
6. When you have the ones you want optioned out just tap the little disk icon in the top right. It will ask for root rights, grant it, saved.
7. Now just reboot and DONE!
tut copied from http://rootzwiki.com/topic/31065-tu...acitive-buttons-lights-and-use-on-screen-nav/ so i didn't have to rewrite it, but modified for xperia s....
peace out.
Thanks man,was looking for it
This is perfect for XZXperience 2!
Thanks for the tutorial man works like a charm.:thumbup:
Sent from my LT26i using xda premium
Can this work to remap the menu key to the app switcher key?
I find the appeal for the soft/screen buttons really inexplicable. I have an Xperia TX and, really, this is the only thing that puts me down in that phone - I really wish it had capacitive buttons, much like the acro S. The most annoying thing about software buttons is that it takes up valuable screen area, leaving me with a sub-HD area available for other stuff. The interference with screen size in some apps is extremely annoying.
I'm thinking of getting an acro S solely because of this. And you guys here trying to disable your capacitive buttons! Taste really is something funny, I guess.
DeathMetalDiamond, once you see how difficult to operate and unpredictable in behavior the capacitive keys on the Xperia S are; you'll wish you had on-screen buttons as well!
Same goes for Ion.. its simply a nightmare especially in the dark. I literally have to guess where the buttons are. If they are well built, they are an asset. If not, they just screw u up.
i just recently tried out the OSB and i found it appealing, albeit lessening the screen space but i'll live with the trade off..capacitive buttons on the Acro S is sometimes none sensitive as i find myself tapping the back button 2x or 3x before i get it right..thanks for this tutorial :good:
edit: i got systemui FC [im using @niaboc79 's tab-n-grid sysui] when trying to access options menu in CyberShot 5.7.2 mod..everything else is good

[Q] Manually Changing the Quicklaunch Key to Camera in CM11

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

Change hardware button to get 'back' in the left

Hello,
I want to change 'back' and 'menu' keys, so 'back' to be on the rigth side and 'menu' on the left. Like Samsung (I owned one). I prefer 'back' near my finger, it is more confortable.
I have been investigating. I have found a tool here in xda called buttonremapper, but after download and test, it does not work. Also it looks a bit abandoning, so it is possible it does not work for newer devices.
I have also test xposed framework + gravity box, but it has only the option to program 'long press' and 'double touch'. Under navigation bar there is an option to do what I want, but it only do it activating 'buttons in screen', so that is not a solution for me.
I suspect there is a way to do it modifying values in a /system/usr/keyloyout file, but dont know which and what modifications.
have somebody experience doing this for our device? is there a way to achieve this?
Thanks,
clonfsp said:
Hello,
I want to change 'back' and 'menu' keys, so 'back' to be on the rigth side and 'menu' on the left. Like Samsung (I owned one). I prefer 'back' near my finger, it is more confortable.
I have been investigating. I have found a tool here in xda called buttonremapper, but after download and test, it does not work. Also it looks a bit abandoning, so it is possible it does not work for newer devices.
I have also test xposed framework + gravity box, but it has only the option to program 'long press' and 'double touch'. Under navigation bar there is an option to do what I want, but it only do it activating 'buttons in screen', so that is not a solution for me.
I suspect there is a way to do it modifying values in a /system/usr/keyloyout file, but dont know which and what modifications.
have somebody experience doing this for our device? is there a way to achieve this?
Thanks,
Click to expand...
Click to collapse
I answer myself: it is possible modifyind the file /system/usr/keypad_8064.kl , changing the balues 'back' <-> 'menu'. It is even possible to assign buttons in another way, like right: home, center: menu and left: back.
Code:
key 114 VOLUME_DOWN
key 115 VOLUME_UP
key 116 POWER WAKE
key 139 MENU VIRTUAL
key 158 BACK VIRTUAL
key 172 HOME VIRTUAL
Just change keys 139 BACK and 158 Menu
You will find it in usr/keylayout/keypad_8064.kl

Categories

Resources