does anyone know what keys to disable in the generic.kl to get the back, home and recents keys to be disabled?
#254 is recents
#158 is back
-PiLoT- said:
does anyone know what keys to disable in the generic.kl to get the back, home and recents keys to be disabled?
Click to expand...
Click to collapse
254 APP_SWITCH
158 BACK
102 HOME
You neglected to tell us what ROM you are using, so it's not possible to give specific advice as to which .kl file(s) to edit. Keys may be defined in multiple .kl files and ASOP and TW for instance use different paths to resolve key assignments. Perhaps peruse all of the keylayout files starting with /system/usr/keylayout/gpio-keys.kl
.
fffft said:
254 APP_SWITCH
158 BACK
102 HOME
You neglected to tell us what ROM you are using, so it's not possible to give specific advice as to which .kl file(s) to edit. Keys may be defined in multiple .kl files and ASOP and TW for instance use different paths to resolve key assignments. Perhaps peruse all of the keylayout files starting with /system/usr/keylayout/gpio-keys.kl
.
Click to expand...
Click to collapse
ah brilliant. im using stock. couldnt find info anywhere. dug up 158 and 254 by tinkering. 102 is mov_ home though
well apparently i found out its not 102. but its 172 in /system/usr/keylayout/gpio-keys.kl
158 and 254 in generic.kl
Related
I am trying to edit my motorola milestone 2 physical keyboard a little. What I wan't to achieve is to make the up, down and left dpad buttons become å, ä and ö. I rooted my phone and with root explorer I managed to edit the umts_milestone2-keypad.kl and qwerty.kl files from:
Code:
...
key 232 DPAD_CENTER WAKE_DROPPED
key 108 DPAD_DOWN WAKE_DROPPED
key 103 DPAD_UP WAKE_DROPPED
key 102 HOME WAKE
key 105 DPAD_LEFT WAKE_DROPPED
key 106 DPAD_RIGHT WAKE_DROPPED
...
to something along with:
Code:
...
key 232 DPAD_CENTER WAKE_DROPPED
key 108 DPAD_DOWN WAKE_DROPPED
key 103 DPAD_UP WAKE_DROPPED
key 102 HOME WAKE
key 105 Z WAKE_DROPPED
key 106 X WAKE_DROPPED
...
to be able to see if I am editing the files I want to edit, but when I reboot my phone up, down, left and right still does the same thing. Am I doing it wrong or am I editing the wrong files?
Thanks!
Edit: This might fit better in android development :S.
Anyone found a solution for this?! I've been trying to search everywhere how to reconfigure the physical qwerty for ä ö and å. Long press is not an option for me.
qemil said:
Anyone found a solution for this?! I've been trying to search everywhere how to reconfigure the physical qwerty for ä ö and å. Long press is not an option for me.
Click to expand...
Click to collapse
A while back I was trying to edit the keyboard with no luck. On the Droid 2 if you long press certain buttons you can bring up a box with those letter variants. I assume that's what you meant by longpress is no option, though.
I don't know if there is a language setting or something you can edit within the settings for the keyboard on the Milestone maybe?
The language settings won't do it.
Probably only way is through rooting and somehow editing the keyboard mappings. Haven't found a single instruction how to do this though.
This is a major issue for me since I'd like to go for a hardware qwerty device to achieve greater typing speeds but this long-press-and-select-from-screen method is too slow and kinda kills the benefit of having a physical keyboard.
Did you edit all of the files? I don't have my droid 2 yet, but I've done this on my nook color and am looking at my droid x. Did you edit qwerty.kl, cdma_droid2-keypad.kl, and maybe sholes-keypad.kl, too? The buttons weren't remapped on my nook until I'd edited all of the files the same way. Hope this helps.
Could somebody please try out what RMHisCOOL suggests? I'll buy this phone as soon as I get confirmation that the hardware keyboard can be remapped.
qemil said:
Could somebody please try out what RMHisCOOL suggests? I'll buy this phone as soon as I get confirmation that the hardware keyboard can be remapped.
Click to expand...
Click to collapse
If nobody else does, I definitely will when I get my D2. Sent today from VA to MD so I should have it in my hands by Friday for sure, I would imagine.
RMHisCOOL said:
If nobody else does, I definitely will when I get my D2. Sent today from VA to MD so I should have it in my hands by Friday for sure, I would imagine.
Click to expand...
Click to collapse
Thank you so much! I'll be checking this thread daily.
I know this is the wrong section, this belongs in Flipout Development more than likely, but apparently, i don't have a sufficient post count to post it there. If a moderator would be so kind? ^_^
The application, ButtonRemapper, detailed at http://forum.xda-developers.com/showthread.php?t=850464 , only lets you bind certain functions to your keys.
I moved from a WM-based Samsung Epix to the Flipout, and sorely missed my dedicated comma key. I would get rid of the nigh-used SYM key for the comma key any day, and ButtonRemapper didn't do the trick.
So, i used Root Explorer to check out the keyboard profiles at /system/usr/keylayout/, and edited them in it's text editor. Of course, you can always pull the files with the SDK, but this is quicker and cleaner.
To bind the comma to the SYM key (key 162), i just changed one line from:
Code:
key 162 SYM WAKE_DROPPED
to
Code:
key 162 COMMA WAKE_DROPPED
for all the .kl files there that contained key 162. One reboot later, and bam. Figured i'd post this here for all those who care. I know i'm not the only one that punctuates my sentences properly, and appreciates a handy comma key.
Hi folks,
I'm trying to remap the hardware buttons of my rooted Xperia Pro with stock ICS 4.0.4, but there are some quirks that trouble me.
Basically, I want to
1.) remap the language button on the QWERTZ hardware keyboard.
2.) Prevent the camera button from unlocking the phone - just press power to show the lock screen, then hold camera button, the press home key and you'll see how easy it is for the phone to unlock in your pocket.
So far, I parsed through the keyboard layout files in /system/usr
I remapped key 368 in pm8058-keypad.kl to CTRL_LEFT, which did not seem to make any difference! Language button still invokes language dialog
I also modified quertz.xml and qwerty-en.xml by replacing META_LANGUAGE with META_CTRL_LEFT - did not make any difference.
Of course, I rebooted the phone inbetween...
Regarding 2), I have no clue. Butting WAKE_DROPPED behind CAMERA and FOCUS in pm8058-keypad.kl does not help.
I could use some help with key remapping as well. If I find some info i'll send it your way.
No progress for me so far... anyone?
kyanox said:
I could use some help with key remapping as well. If I find some info i'll send it your way.
Click to expand...
Click to collapse
I want to re-map the 0 (Zero) key and the OK button orientation on the PIN Lock feature. Any info what files I need to change?
I GOT IT!!! partially at least....
Reading through http://source.android.com/tech/input/key-character-map-files.html and http://source.android.com/tech/input/key-layout-files.html once again, I finally found something that pointed me into the right direction!
I order to make my change to the Language button work (remapping key 368 to CTRL_LEFT), there are two possible ways:
1.) Set hardware keyboard to FULL keyboard type by replacing "type ALPHA" with "type FULL" in /system/usr/keychars/pm8058-keypad.kcm
This will make the hardware keyboard work without any additional GUI, so pressing shift will allow you to select text and copy&paste via ctrl+a,c,v,x now works (This still depends on the app you are using. Some do ignore this, some will still work with menu+a,c,v,x instead)
But beware:, in order to enter numbers or upper case letters, you now have to keep the modifier key pressed.
Printable characters can be edited via /system/usr/keychars/pm8058-keypad.kcm, non-printables like modifier keys can be edited via /system/usr/keylayout/pm8058-keypad.kl
Android keycode names can be found here: http://source.android.com/tech/input/keyboard-devices.html
Until now, I was unable to create a solution for entering special characters like ä,ö,ü
I tried to via sym or meta keyword in .kcm file while mapping the Sym key to SYMBOL or META_LEFT via the .kl file, but it didn't work...
2.) The .xml files in /system/usr/keyboard-config/layouts are used only with the keyboard configured as "type ALPHA". In order to identify the correct .xml file, you have to parse through the files in /system/usr/keyboard-config/languages and look for the script keyword, which in conjunction with the declarations in /system/usr/keyboard-config/keyprint.xml will tell you to the layout xml file for your device localisation.
Now, in order to remap printable characters, you have to edit the correct layout xml file and for non-printable characters, you have to edit the scancodes.xml file in /system/usr/keyboard-config.
Unfortunately, shift-selecting text will not work with "type ALPHA" mode and it seems that editing scancodes.xml is not sufficient to remap language button to CTRL_LEFT, but the .kl file has to be changed, too.
Hi,
I'm recently trying to change the hardware key layout to get something closer to a vanilla experience ie :
- BACK on the hardware menu key
- HOME on the hardware home key
- APP_SWITCH on the hardware back key
Mapping the hardware menu key to the BACK functionality worked fine, and of course the hardware home key works already as I want.
But I can't manage to have the APP_SWITCH working on the back key (or on any other key in fact).
What I did to get to this result is editing sec_touchkey.kl (In /system/usr/keylayout) like this :
key 139 BACK
key 158 APP_SWITCH
key 102 HOME
key 217 SEARCH
Does any one has any idea why APP_SWITCH doesn't work ?
And if you have any workaround to get to the same result it would be fine for me too
Thanks !
PS : I'm on PAC man ROM on a I9505
Hi nookies,
I have a problem. The bottom right hard key (158) of my rooted NTG will not perform any action I tell it to in TWL4030_Keyboard.kl or Nook Touch Mod Manager. It will only perform the Back action. All my other keys work fabulously, but this one started acting up on me.
Can someone please help me?
EDIT - I fixed it! I was just looking in TWL4030_Keyboard.kl to see if I misspelled something, when something caught my eye. Way up near the top of the file, I saw this:
Code:
key 158 BACK WAKE_DROPPED
This was completely separate from the 4 entries at the bottom. So, happily, I replaced the above with RIGHT_PREVPAGE, rebooted, and viola, it worked.
So now, I ask this: why the heck would there randomly be 2 different key codes for the same key? And can I get rid of the extra one?