Related
I have noticed that some newer ROMS are allowing the phone to be woken and unlocked with any button, and I for one don't like this.
Instead of pestering ROM developers to change this, I would just like to edit it myself?
I like the MoDaCo froyo way of doing it, all buttons will wake the screen, but you still need to swipe the screen to unlock.
I have looked at the file and there is WAKE and WAKE_DROPPED commands, what is the difference between them?
Also, I notice that there is more than one entry for each button (For example key 229 MENU WAKE_DROPPED, key 59 MENU WAKE_DROPPED, key 139 MENU WAKE_DROPPED), would I need to edit all of these?
Thanks for any help.
Regards
Stewart
Does no one know how I can do this?
StuMcBill said:
Does no one know how I can do this?
Click to expand...
Click to collapse
I don't know, but maybe this thread will know
http://forum.xda-developers.com/showthread.php?t=683902
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.
I take no credit for this Mod. I found this posted in the i9300 section here http://forum.xda-developers.com/showthread.php?t=1767954&page=2. All credit goes to andrewilley.
What this does is map the volume up and down controls on the headset to next and previous track instead. I suggest that you only use this if you are using the wired headphones and want that functionality. Because this will change it for bluetooth devices also. So if you have a headset that already has buttons for both volume and tracks this isn't for you.
Here is andrews post from that thread.
Code:
I've managed to get the second and third headset buttons acting as next/previous track functions - without needing any extra software (although of course you can add extra facilities using Headset Button Controller later if you wish). The side volume rocker still works for volume control.
Christoph Kober pointed me to some documentation on the Android key mapping files (http://source.android.com/tech/input...out-files.html) which helped me in the right direction. I first tried to edit the small file which looked like it handled the headset, but that did not change anything. Then I tried editing the master key mapper file, and that did the job. I assumed that this would also remap the on-device volume buttons too, but fortunately there is another mapping file which overrides the generic one to handle the four hardware buttons - so they get re-mapped back to volume again. Perfect!
You'll need root access and a text editor for this. Don't mess with this lightly, you are editing system files!!!
1) Navigate to folder /system/usr/keylayout/
2) Backup the current Generic.kl file (you were going to do that anyway, right? If you weren't, probably best not go any further...)
3) Edit the file Generic.kl using a text editor
3) Comment out the lines for keys 114 and 115 (just put a # at the start of those two lines) thus:
# key 114 VOLUME_DOWN WAKE
# key 115 VOLUME_UP WAKE
4) Find the lines for keys 163 and 165, which look like this:
key 163 MEDIA_NEXT WAKE
key 165 MEDIA_PREVIOUS WAKE
5) change the numbers from '163' to '115', and from '165' to '114', thus:
key 115 MEDIA_NEXT WAKE
key 114 MEDIA_PREVIOUS WAKE
6) Save and reboot
Andre
Here are recovery zips if you want to flash. You can also use these to flash back and forth if need be. Files were taken from LG1.
Download: http://d-h.st/asK
MD5: aa8334da5d76d8e0a0dd26eafac269c6
Uninstaller Download (reverts back to stock): http://d-h.st/2DC
MD5: c2bd8ccbe81c230ef97997267b600d0c
crawrj said:
I take no credit for this Mod. I found this posted in the i9300 section here http://forum.xda-developers.com/showthread.php?t=1767954&page=2. All credit goes to andrewilley.
What this does is map the volume up and down controls on the headset to next and previous track instead. I suggest that you only use this if you are using the wired headphones and want that functionality. Because this will change it for bluetooth devices also. So if you have a headset that already has buttons for both volume and tracks this isn't for you.
Here is andrews post from that thread.
Code:
I've managed to get the second and third headset buttons acting as next/previous track functions - without needing any extra software (although of course you can add extra facilities using Headset Button Controller later if you wish). The side volume rocker still works for volume control.
Christoph Kober pointed me to some documentation on the Android key mapping files (http://source.android.com/tech/input...out-files.html) which helped me in the right direction. I first tried to edit the small file which looked like it handled the headset, but that did not change anything. Then I tried editing the master key mapper file, and that did the job. I assumed that this would also remap the on-device volume buttons too, but fortunately there is another mapping file which overrides the generic one to handle the four hardware buttons - so they get re-mapped back to volume again. Perfect!
You'll need root access and a text editor for this. Don't mess with this lightly, you are editing system files!!!
1) Navigate to folder /system/usr/keylayout/
2) Backup the current Generic.kl file (you were going to do that anyway, right? If you weren't, probably best not go any further...)
3) Edit the file Generic.kl using a text editor
3) Comment out the lines for keys 114 and 115 (just put a # at the start of those two lines) thus:
# key 114 VOLUME_DOWN WAKE
# key 115 VOLUME_UP WAKE
4) Find the lines for keys 163 and 165, which look like this:
key 163 MEDIA_NEXT WAKE
key 165 MEDIA_PREVIOUS WAKE
5) change the numbers from '163' to '115', and from '165' to '114', thus:
key 115 MEDIA_NEXT WAKE
key 114 MEDIA_PREVIOUS WAKE
6) Save and reboot
Andre
Here are recovery zips if you want to flash. You can also use these to flash back and forth if need be. Files were taken from LG1.
Download: http://d-h.st/asK
MD5: aa8334da5d76d8e0a0dd26eafac269c6
Uninstaller Download (reverts back to stock): http://d-h.st/2DC
MD5: c2bd8ccbe81c230ef97997267b600d0c
Click to expand...
Click to collapse
Works like a charm
Sent from my SAMSUNG-SGH-I747 using xda premium
How can this be used on the actual phone volume buttons instead of the headset? It does work good tho.
KryPTiCk0d3 said:
How can this be used on the actual phone volume buttons instead of the headset? It does work good tho.
Click to expand...
Click to collapse
You would have to find to volume rocker buttons and change them but then you couldn't change the volume with them.
Sent from my SAMSUNG-SGH-I747 using xda premium
Would that be in the same generic.kl? or in a different spot? I use that an awful lot, more than volume adjust... so I could live with it for now until a custom rom comes out with it included, not sure of any yet.
KryPTiCk0d3 said:
Would that be in the same generic.kl? or in a different spot? I use that an awful lot, more than volume adjust... so I could live with it for now until a custom rom comes out with it included, not sure of any yet.
Click to expand...
Click to collapse
I haven't dug into it yet so not sure. I would expect it to be though. When I get some time I will check it out.
Sent from my SPH-D710 using xda premium
I wanna set that when I hold the headset button that it launches S Voice :good:
XblackdemonX said:
I wanna set that when I hold the headset button that it launches S Voice :good:
Click to expand...
Click to collapse
Doesn't it already do that? Thought I read that on the stock headphones?
Edit: Guess not I just tried it. But I discovered that if you double tap play button it will skip to next track.
Sent from my SPH-D710 using xda premium
crawrj said:
Doesn't it already do that? Thought I read that on the stock headphones?
Edit: Guess not I just tried it. But I discovered that if you double tap play button it will skip to next track.
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
lol i know that double-click skips track...
that doesn't help me lol
is there any way to make it like the g2 where it doesn't change tracks unless you hold it? and if you just click it it still increases or decreases the volume
I have been unable to get this to work on JB AOKP. Installing the flashable or direct edit results in losing all controls from the headphones. If anybody has been able to get this running on AOKP i would love to know how.
Maybe in this generic.kl file we can set those headsets with "iphone made" buttons to work with android?
I have one with 3 buttons, and all of them gives me google now when pressed. (JB)
ih8mydroid said:
I have been unable to get this to work on JB AOKP. Installing the flashable or direct edit results in losing all controls from the headphones. If anybody has been able to get this running on AOKP i would love to know how.
Click to expand...
Click to collapse
I would like to get this working, anyone else have any ideas?
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
Hi all,
have been using this custom keypad layout for a while and now finally get around to post it...
Keyboard Allocation Modifications (touch keys unchanged):
MENU key mapped to TAB
HOME key mapped to CTRL_LEFT
SEARCH key mapped to CTRL_RIGHT
OK key (DPAD_CENTER) mapped to FORWARD_DEL (normal delete - instead of delicate (touch-)cursor-positioning, then backspace)
shift+alt+E: Euro sign (€)
shift+alt+K: < instead of (
shift+alt+L: > instead of )
shift+alt+,: ~ instead of =
shift+alt+.: ^ instead of \
shift+alt+?: | instead of / (pipe linux commands without switching to soft keyboard for that one stupid symbol!)
MIC key (+ shift/alt): mapped to [ {
www./.com key (+ shift/alt): mapped to ] }
DE layout: Z <=> Y
DE layout: [äöüß] mapped on shift+alt+[aous]
This allows proper usage of terminal, debian, tmux..
Little known fact: some useful common keyboard combinations become available when your device provides TAB & CTRL keys:
- ALT+TAB: application switcher
- CTRL + A [in text fields]: select all
- CTRL + C/X/V [in text fields]: copy/cut/paste
- CTRL + Z: unfortunately, no undo (what the fail?)
- TAB [in terminal]: shell tab completion!
- CTRL + C [in terminal]: interrupt running process
- CTRL + D [in terminal, empty command line]: exit shell
Improvement suggestions or questions, bring 'em on.
The files have to replace /system/usr/keychars/STMPE_keypad.kcm and /system/usr/keylayout/STMPE_keypad.kl respectively to be active.. Installable ZIP files in third post. :good:
nice, but you should make installable zip, like this , just change zip file.
recovery installable ZIP
ok here it comes
very great job! many thanks will test that soon
Hey Admin!!! ^^ Sorry My English Not Good
Can you Mod Volume Up = Wake Phone, Or Search = On/Off Phone?
I wana turn off Search key on the phone, too
ahem this is a great feature but I may have made an error in flashing because it'd be nice to compare the original setup! I was sold with ~ and <> etc but I kinda miss the search key believe it or not (for SMS etc it had become a habit)..
my suggestions after 20 mins.. if "Menu" key was L-Ctrl instead of tab, (flip them), you could slide your thumb from menu to A to "select all" in one motion (I even found it possible with home as L-Ctrl but not easy). Also, you could hit Alt-Tab w the same one thumbstroke!! Then, you really don't need R-Ctrl because XCV have enough space to hit with your right thumb while left thumb on Menu (now L-Ctrl). Then I can have my search key back and not lose any function
If you can share the original I can set it up this way! Oh, and also "OK" for delete is OK.. but could it be L-Ctrl + Bksp, or Shift+Bksp? OH WAIT that IS the default!! Shift+BKSP = delete!! Lucky guess
Thanks tho this is awesome!!
zWiLLX said:
I kinda miss the search key believe it or not (for SMS etc it had become a habit)..
Click to expand...
Click to collapse
You are aware that there is one beneath the display on the right? & these capacitive buttons continue to work with expanded keyboard.
zWiLLX said:
my suggestions after 20 mins.. if "Menu" key was L-Ctrl instead of tab, (flip them), you could slide your thumb from menu to A to "select all" in one motion (I even found it possible with home as L-Ctrl but not easy). Also, you could hit Alt-Tab w the same one thumbstroke!!
Click to expand...
Click to collapse
I might actually try swapping these.. although I already used this layout for months. But good point about CTRL+A (my tmux key) and ALT+TAB :good:
So just swap the numbers of both keys in the STMPE_keypad.kl:
Code:
key 102 CTRL_LEFT WAKE
key 139 TAB WAKE
zWiLLX said:
If you can share the original I can set it up this way! Oh, and also "OK" for delete is OK.. but could it be L-Ctrl + Bksp, or Shift+Bksp? OH WAIT that IS the default!! Shift+BKSP = delete!! Lucky guess
Click to expand...
Click to collapse
well the Shift+BKSP trick doesn't work everywhere and definitely not within the terminal.
You can find the default files here:
https://github.com/buborh/android_device_samsung_i927/raw/cm-11.0/usr/keylayout/STMPE_keypad.kl
https://github.com/buborh/android_device_samsung_i927/raw/cm-11.0/usr/keychars/STMPE_keypad.kcm
did the swaps and modded the KB a bit and it's friggin fantastic!! Great tips Used the one-thumb ctrl+a today as well as the one-thumb alt-tab just by coincidence and they work great!! w 4.4.4 the phone is crazy fast(er) as well as less battery and with this mod it's friggin fantastic!! Glad I didn't commit to longer contract and went w ole cheapo glide again!! Thanks EMP!!