Apple Wireless keyboard driver for Android - Android Software/Hacking General [Developers Only]

I use an Apple Wireless keyboard with my android phone and it works well but not perfectly. Many keys aren't mapped properly.
On this thread I hope some skilled people will come along and help generate a keymap bin file for this great keyboard so more android users can benefit from it.
Checking the logs when the phone connects to the keyboard show:
W/KeyCharacterMap(13414): Can't open keycharmap file
W/KeyCharacterMap(13414): Error loading keycharmap file '/system/usr/keychars/Apple_Wireless_Keyboard.kcm.bin'. hw.keyboards.196612.devname='Apple Wireless Keyboard'
W/KeyCharacterMap(13414): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
Click to expand...
Click to collapse
So it appears we just need to generate an Apple Wireless Keyboard kcm file and this page should help: http://www.kandroid.org/android_pdk/keymaps_keyboard_input.html#androidKeymapIntro
I am going to have a go but am probably not technically skilled enough for this.

i got the same problem, but no solution...

I use the apple wireless keyboard, the norwegian version, and of course the layout for default bluetooth keyboard is english and doesn't match the hardware keys for my norwegian keyboard. My question is about the file pointed to here:
"Using default keymap: /system/usr/keychars/qwerty.kcm.bin"
Is this in any way related to the on-screen keyboard? If not, if it will be working as a default with the apple keyboard, then maybe it is possible to just manually edit the file? I don't know anything about this, so sorry if this is a stupid question My phone is not rooted, so I don't even have access to "/system/usr/keychars/qwerty.kcm.bin"..
I would very much appreciate if anyone could check this on their phone, maybe paste the contents of the file here? If one could easily change the mapping of the bluetooth keyboard in this file, this could work for me.
In my case, I'm satisfied with the keyboard, works well, but the default layout is in english and that means I can't use the norwegian hardwarebuttons "ÆØÅ".

Have been trying a bit on my own, with the fear of "bricking" my device,
I am a total noob with android so please don't laugh if my ideas are stupid
Please help!
The file /system/usr/keychars/qwerty.kcm.bin seems impossible to edit.
However, I found the file /system/usr/keylayout/qwerty.kl
The following is the contents of the file:
key 399 GRAVE
key 2 1
key 3 2
key 4 3
key 5 4
key 6 5
key 7 6
key 8 7
key 9 8
key 10 9
key 11 0
key 1 BACK WAKE_DROPPED
key 158 BACK WAKE_DROPPED
key 230 SOFT_RIGHT WAKE
key 60 SOFT_RIGHT WAKE
key 107 ENDCALL WAKE_DROPPED
key 62 ENDCALL WAKE_DROPPED
key 229 MENU WAKE_DROPPED
key 139 MENU WAKE_DROPPED
key 59 MENU WAKE_DROPPED
key 127 SEARCH WAKE_DROPPED
key 217 SEARCH WAKE_DROPPED
key 228 POUND
key 227 STAR
key 231 CALL WAKE_DROPPED
key 61 CALL WAKE_DROPPED
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
key 115 VOLUME_UP
key 114 VOLUME_DOWN
key 116 POWER WAKE
key 212 CAMERA
key 16 Q
key 17 W
key 18 E
key 19 R
key 20 T
key 21 Y
key 22 U
key 23 I
key 24 O
key 25 P
key 26 LEFT_BRACKET
key 27 RIGHT_BRACKET
key 43 BACKSLASH
key 30 A
key 31 S
key 32 D
key 33 F
key 34 G
key 35 H
key 36 J
key 37 K
key 38 L
key 39 SEMICOLON
key 40 APOSTROPHE
key 14 DEL
key 44 Z
key 45 X
key 46 C
key 47 V
key 48 B
key 49 N
key 50 M
key 51 COMMA
key 52 PERIOD
key 53 SLASH
key 28 ENTER
key 56 ALT_LEFT
key 100 ALT_RIGHT
key 42 SHIFT_LEFT
key 54 SHIFT_RIGHT
key 15 TAB
key 57 SPACE
key 150 EXPLORER
key 155 ENVELOPE
key 12 MINUS
key 13 EQUALS
key 215 AT
Click to expand...
Click to collapse
If I use a text-editor to edit this file, and save it in the same charset as the original, it should work, right?
When I press the hardwarebuttons -ÆØÅ- , I get ';[
so accordingly I am thinking of changing the following:
key 26 LEFT_BRACKET --> Å
key 39 SEMICOLON --> Ø
key 40 APOSTROPHE --> Æ
I fear that I will "brick" my phone if this doesn't work. Does anyone have an opinion?
If this is indeed a stupid idea, I hope somebody can tell me before I destroy my phone

I went ahead and tried this, after consulting an experienced friend who thought this wouldn't do any harm. It turned out this had no effect at all. Phone is ok, still nothing changed at all.

Found out how to edit the .kcm.bin-file and now I made it work for me,
and maybe others with norwegian apple keyboard
http://forum.xda-developers.com/showthread.php?p=11886341#post11886341

I have absolutely no skills in this, but was able to remap some simple buttons with the app Keytest.apk (simply google) and some alterations in the qwerty.kl and others,
i broke a couple of times the file i guess resulting the keyboard stop working but a simple backup put everything back in working order.
Ill try to play some with this in the next couple of days.
will let you know! and post my results!

Yes! If your keyboard is in english and that is also your prefered language, then it seems that all you have to do is alter the .kl-file used by the keyboard in order to get the symbols in proper places according to the scancodes given by "KeyTest.apk"
The phone will probably not be "bricked" in any case. If you make a mistake when editing the .kl-file, you can just use a backup to get it working again (at least if you have a working touch-screen).
Still, some combinations might not work that easily. Then you'll have to alter the .kcm.bin-file in a hex-editor, in my case for "æøå" and others, like for instance to get "7" and "/" on the norwegian keyboard to be on the same button, so that it gives "/" when typing "7" and holding shift (while english keyboards have "7" and "&" with shift if I'm not mistaken..)
i.e. the .kcm.bin-file contains a binary formated layout of the characters and the symbols to show accordingly when pressing normal, with shift, alt or fn, while the .kl-file only decides what scancodes from the keyboard referes to what characters in the .kcm.bin-file.
So editing the .kcm.bin-file, you could make all kinds of fun, for instance make shift+a print "£" in stead of "A". This file decides what symbols will show up on your screen when pressing a function-key like shift, alt, fn etc with a normal key. In this file you cannot alter the places on the keyboard, only existing combinations of characters.
The .kl-file will only let you change the places on the keyboard and not the existing keychars.
So in the .kl-file you cannot put in any foreign letters like german "ü" or french "ç",
but you can change the .kcm.bin-file to make alt+c print "ç" and shift+alt+c print "Ç".
Then just leave the "C" where it belongs in the .kl-file.
The biggest caveats with this solution is that there is no fast way to switch between two languages, for instance some times I write in cyrillic and some times in latin letters. For this I would have to manually change between two .kcm.bin-files, one in latin and one in cyrillic. (I am already planning how to make one in cyrillic)
Sorry for my bad english, don't write much in english hope my writing is understandable

If you cannot use the adb logcat to find out which file to edit, then just try to edit one letter in one .kl file for instance change the "K" to be "P", and see if it makes it print "P". If it doesn't then change it back, and do the same with the next .kl-file until you find the one you have to edit.
I would assume one has to disconnect the keyboard and maybe turn off bluetooth for every try, since the keyboard layout is probably loaded into memory as soon as it is connected, so a change wouldn't have any effect when it is connected.

Biffy said:
On this thread I hope some skilled people will come along and help generate a keymap bin file for this great keyboard so more android users can benefit from it.
Click to expand...
Click to collapse
I'm not so skilled, but I managed to do this with a norwegian keyboard.
I could try the same for english keyboard if I had at least a good picture of the
keyboard with the scancodes for every key, and also the original .kcm.bin / .kl files to alter. And also what combinations to alter. It is not so difficult.

I have created a qwerty.kl file to use the apple wireless keyboard with connectbot in landscape mode. It works great with cyanogenmod on my HTC DHD but should work with other phones / roms.
modifications :
- change arrows directions to match landscape mode (phone bottom on the right)
- map the left "ctrl" key of the keyboard to DPAD_CENTER so that it can be used as ctrl in connectbot as well as escape key (two presses).
modifications I would like to have
- have the escape key work correctly
- have the "tab" key work correctly in connectbot
To install, replace on your phone:
- unzip the file to your computer
- enable USB debugging
- remount partition in read write
Code:
adb remount
- backup the original file somewhere
Code:
adb pull /system/usr/keylayout/qwerty.kl $SAVE_PATH
- copy the new file to the phone
Code:
adb push $NEW_QWERTY.KL_LOCATION /system/usr/keylayout/
- reboot your phone (to remount the system partition read-only)
If you can improve, don't hesitate to publish

Related

[INFO/WIP] List of ASUS apps/libs/etc that can be removed 'safely?'

PROCEED AT YOUR OWN RISK.
THIS IS WHAT I PERSONALLY DELETE. Tested on my eeePad, no keyboard dock, running Prime 1.3 US version. You can customize the list based on your needs. See the 2nd list for ASUS keyboard information thanks to seshmaru. Also keep in mind you can rename the files from .apk to .old or something else if you want to test. Or keep a copy of the ROM you are modifying handy, and just repush the apk or lib back to where you deleted it from.
Here is the list:
Code:
All listed apks can be found in /system/app
[B][U]APK:[/U][/B]
AsusSetupWizard.apk ** OPTIONAL ** Setups your eeePad from a clean install (wifi/accounts/etc)
AsusReader.apk -- Reader stuff
AWS.apk - Asus Web Storage
DLNA.apk - Local network sharing thingy, never worked for me
Layar.apk - lame
MEar.apk - [URL="http://www.appbrain.com/app/mear-my-ear-wears-music/com.ecareme.mear"]music app[/URL] (not the google one)
MyCloud.apk -- ASUS stuff
MyGazine.apk -- ASUS stuff
MyWater.apk -- ASUS stuff
PCSyncLauncher.apk -- Annoying sync thingy when you attach USB cable (optional)
PixWe.apk -- Asus Cloud Storage Picture App
PolarisOffice.apk -- use google docs, or keep this (optional, keep related libs below)
PRAndroid.apk -- 'PressReader' for Newspapers/Magazines
StrAsus.apk -- it says asus, deleted. Something about "SplashTop"
Vibe.apk -- something stupid, music related.
Weather.apk -- asus weather stuff, optional
[I]-- Provided by seshmaru --[/I]
Phone.apk - we can't make calls on this thing anyways.
HTMLviewer.apk - broken anyways.
PicoTts.apk - text to speech for android. (Causes Text-to-Speech FC in Settings)
TtsService.apk - Also text to speech. (Causes Text-to-Speech FC in Settings)
[B][U]LIBS:[/U][/B]
/system/lib/libereader.so -- I believe this is AsusReader related.
/system/lib/libpolarisoffice.so -- huge office lib, deleeeeeeeeete (keep if you keep PolarisOffice.apk)
/system/lib/libpolarisoffice_Clipboard.so -- more office.. (keep if you keep PolarisOffice.apk)
[I]-- provided by seshmaru --[/I]
system/lib/libttspico.so (Causes Text-to-Speech FC in Settings)
system/lib/libvideoeditor_jni.so
Keyboard & Dock information thanks to seshmaru's post:
Code:
Here's a list for the keyboard files.
Needed for software keyboard:
[COLOR="Blue"]XT9IME.apk
/system/lib/libjni_xt9input.so
/system/lib/libjni_xt9kcm.so
/system/usr/xt9[/COLOR]
Needed for dock keyboard:
[COLOR="Blue"]Keyboard.apk
/system/usr/keylayout/asusec.kl
/system/usr/keychars/asusec.kcm[/COLOR]
You can remove all of the dock keyboard stuff and have the asus software keyboard still work and vice versa.
You can delete these while the system is running, but expect odd behavior and force closes. Rebooting should fix, you might have to force a power off, or use 'adb reboot'.
Ringtones: We have a full set of ringtones included. We should be able to delete all of these and save more space, but not sure if anyone has a use for them. These are RINGTONES and not NOTIFICATION sounds. These can be found here: /system/media/audio/ringtones -- it's only 2MB so probably not worth it.
This should be considered a work in progress. My list has not been tested while using the ASUS dock. It also has not been tested on builds, such as the WW (worldwide?) one. Consider this US builds only.
Your "Mod" breaks the dock, breaks key mapping, breaks autocorrect and basically breaks everything nice about the transformer, just so you know.
definition of minimalist is simplifying form without losing function. What you did isn't minimalist, it's "lets tear everything out of the system to the point where it hardly functions".
Agreed.
ROM devs, please do not do this by default in your ROMs.
seshmaru said:
Your "Mod" breaks the dock, breaks key mapping, breaks autocorrect and basically breaks everything nice about the transformer, just so you know.
definition of minimalist is simplifying form without losing function. What you did isn't minimalist, it's "lets tear everything out of the system to the point where it hardly functions".
Click to expand...
Click to collapse
Thanks for the heads up. I'll see what I can do, but without a dock, I can't test to see what is needed. Most likely the ASUS keyboard stuff is needed to make the dock work. I made those red color in my post.
I didn't tear everything out. I tore out the obvious stuff that I didn't need. Made a list, and shared it. Since I don't have a dock (nor do I want one), I removed all the ASUS keyboard stuff as well since I like the stock keyboard better.
Also not 100% sure on this, but I think you need Asus PC Sync for adb to work. PixWe is the built in screenshot function I believe. So the screenshot option in settings will break.
seshmaru said:
Also not 100% sure on this, but I think you need Asus PC Sync for adb to work. PixWe is the built in screenshot function I believe. So the screenshot option in settings will break.
Click to expand...
Click to collapse
I have adb working on mine still, and I'll test the screenshot function now. There is an .apk called screenshot.apk that I didn't remove, and I saw the toggle option in settings to turn it on.
I'll test after dinner and see.
For ADB to work, I had to manually turn on USB debugging in Settings / Applications / Development
sirmx said:
edit/note: I'm a minimalist by nature
PixWe.apk -- dunno, but sounds lame
Click to expand...
Click to collapse
i love your thinking, i do the same thing... sounds boring and i know it doesnt brick it delete it!
Also you don't need /system/usr/keylayout/asusec.kl to use the Asus software keyboard (XT9IME.APK), asusec.kl is the keymapping file for the dock. Otherway around as well, you can remove XT9IME.APK and still have the dock work, it's just the software keyboard.
EDIT:
Here's a list for the keyboard files.
Needed for software keyboard:
XT9IME.apk
/system/lib/libjni_xt9input.so
/system/lib/libjni_xt9kcm.so
/system/usr/xt9
Needed for dock keyboard:
Keyboard.apk
/system/usr/keylayout/asusec.kl
/system/usr/keychars/asusec.kcm
You can remove all of the dock keyboard stuff and have the asus software keyboard still work and vice versa.
seshmaru said:
Also you don't need /system/usr/keylayout/asusec.kl to use the Asus software keyboard (XT9IME.APK), asusec.kl is the keymapping file for the dock. Otherway around as well, you can remove XT9IME.APK and still have the dock work, it's just the software keyboard.
EDIT:
Here's a list for the keyboard files.
Needed for software keyboard:
XT9IME.apk
/system/lib/libjni_xt9input.so
/system/lib/libjni_xt9kcm.so
/system/usr/xt9
Needed for dock keyboard:
Keyboard.apk
/system/usr/keylayout/asusec.kl
/system/usr/keychars/asusec.kcm
You can remove all of the dock keyboard stuff and have the asus software keyboard still work and vice versa.
Click to expand...
Click to collapse
Sweet! Thanks for testing I'll add to OP
edit: adb still working
Code:
adb shell
# uname -a
uname -a
Linux localhost 2.6.36.4-netformer-1.0-ga063d5f #1 SMP PREEMPT Sat May 21 19:45:
10 CDT 2011 armv7l GNU/Linux
# date
date
Sun May 22 17:14:32 EDT 2011
#
Some more apk's you can delete:
Phone.apk - we can't make calls on this thing anyways.
HTMLviewer.apk - broken anyways.
PicoTts.apk - text to speech for android.
TtsService.apk - Also text to speech.
removable libs:
system/lib/libttspico.so
Also interesting find: we have the libs for the video editor apk but not the apk itself:
system/lib/libvideoeditor_jni.so
You can remove this since we don't have the video editor on our devices.
Also anybody know what Finsky.apk is?
EDIT: system/lib/ also holds some android SDK installer files for some reason.
for some ungodly reason every single dock button unlocks the keyboard, so why did they put a lock button on the dock?
asusec.kl content:
Code:
key 41 GRAVE WAKE UNLOCK
key 2 1 WAKE UNLOCK
key 3 2 WAKE UNLOCK
key 4 3 WAKE UNLOCK
key 5 4 WAKE UNLOCK
key 6 5 WAKE UNLOCK
key 7 6 WAKE UNLOCK
key 8 7 WAKE UNLOCK
key 9 8 WAKE UNLOCK
key 10 9 WAKE UNLOCK
key 11 0 WAKE UNLOCK
key 12 MINUS WAKE UNLOCK
key 13 EQUALS WAKE UNLOCK
key 14 DEL WAKE UNLOCK
key 15 TAB WAKE UNLOCK
key 16 Q WAKE UNLOCK
key 17 W WAKE UNLOCK
key 18 E WAKE UNLOCK
key 19 R WAKE UNLOCK
key 20 T WAKE UNLOCK
key 21 Y WAKE UNLOCK
key 22 U WAKE UNLOCK
key 23 I WAKE UNLOCK
key 24 O WAKE UNLOCK
key 25 P WAKE UNLOCK
key 26 LEFT_BRACKET WAKE UNLOCK
key 27 RIGHT_BRACKET WAKE UNLOCK
key 43 BACKSLASH WAKE UNLOCK
key 58 CAPS_LOCK WAKE UNLOCK
key 30 A WAKE UNLOCK
key 31 S WAKE UNLOCK
key 32 D WAKE UNLOCK
key 33 F WAKE UNLOCK
key 34 G WAKE UNLOCK
key 35 H WAKE UNLOCK
key 36 J WAKE UNLOCK
key 37 K WAKE UNLOCK
key 38 L WAKE UNLOCK
key 39 SEMICOLON WAKE UNLOCK
key 40 APOSTROPHE WAKE UNLOCK
key 28 ENTER WAKE UNLOCK
key 42 SHIFT_LEFT WAKE UNLOCK
key 44 Z WAKE UNLOCK
key 45 X WAKE UNLOCK
key 46 C WAKE UNLOCK
key 47 V WAKE UNLOCK
key 48 B WAKE UNLOCK
key 49 N WAKE UNLOCK
key 50 M WAKE UNLOCK
key 51 COMMA WAKE UNLOCK
key 52 PERIOD WAKE UNLOCK
key 53 SLASH WAKE UNLOCK
key 54 SHIFT_RIGHT WAKE UNLOCK
key 29 CTRL_LEFT WAKE UNLOCK
key 217 SEARCH WAKE UNLOCK
key 57 SPACE WAKE UNLOCK
key 100 ALT_RIGHT WAKE UNLOCK
key 97 CTRL_RIGHT WAKE UNLOCK
key 115 VOLUME_UP WAKE UNLOCK
key 142 SLEEP WAKE UNLOCK
key 105 DPAD_LEFT WAKE UNLOCK
key 103 DPAD_UP WAKE UNLOCK
key 108 DPAD_DOWN WAKE UNLOCK
key 106 DPAD_RIGHT WAKE UNLOCK
key 158 BACK WAKE UNLOCK
key 238 WIRELESS WAKE UNLOCK
key 237 BLUETOOTH WAKE UNLOCK
key 60 TOUCHPAD WAKE UNLOCK
key 224 BRIGHTNESS_DOWN WAKE UNLOCK
key 225 BRIGHTNESS_UP WAKE UNLOCK
key 61 BRIGHTNESS_AUTO WAKE UNLOCK
key 212 CAPTURE WAKE UNLOCK
key 150 EXPLORER WAKE UNLOCK
key 62 SETTINGS WAKE UNLOCK
key 165 MEDIA_PREVIOUS WAKE UNLOCK
key 164 MEDIA_PLAY_PAUSE WAKE UNLOCK
key 163 MEDIA_NEXT WAKE UNLOCK
key 114 VOLUME_DOWN WAKE UNLOCK
key 113 VOLUME_MUTE WAKE UNLOCK
key 172 HOME WAKE UNLOCK
key 139 MENU WAKE UNLOCK
key 104 PAGE_UP WAKE UNLOCK
key 109 PAGE_DOWN WAKE UNLOCK
key 107 MOVE_END WAKE UNLOCK
key 102 MOVE_HOME WAKE UNLOCK
key 86 EUROPE_2 WAKE UNLOCK
EDIT: Another funny thing, a line in build.prop tells us it doesn't have sd card support?
Code:
ro.build.characteristics=tablet,nosdcard
EDIT 2:
For any of you audiophiles, all the speaker settings and equalizer settings can be found in the system/data/srs_processing.cfg file. You can edit it with notepad and push it back to your device.
seshmaru said:
For any of you audiophiles, all the speaker settings and equalizer settings can be found in the system/data/srs_processing.cfg file. You can edit it with notepad and push it back to your device.
Click to expand...
Click to collapse
I'm pretty sure audiophiles don't listen to music on their tablets ;P
Finsky.apk, according to random google searches, has to do with the Market as well. I didn't even want to touch that after I read this.
I wonder if the nosdcard deal is because our /sdcard isn't really an sdcard?
I'll modify the OP with the info you have provided. Seems like you are having fun?
sirmx said:
Finsky.apk, according to random google searches, has to do with the Market as well. I didn't even want to touch that after I read this.
I wonder if the nosdcard deal is because our /sdcard isn't really an sdcard?
I'll modify the OP with the info you have provided. Seems like you are having fun?
Click to expand...
Click to collapse
I enjoy digging through system files I used to do mods for the HTC hero but I don't have the time anymore.
I'm pretty sure audiophiles don't listen to music on their tablets ;P
Click to expand...
Click to collapse
If they have a portable DAC why not?
EDIT: Framework-res shows signs of the upcoming phone interface,
this is the redesigned slider for the unlock screen on phones:
default graphic
pressed graphic
It doesn't seem to be in use yet as the xml files point to the classic glass style slider button.
seshmaru said:
I enjoy digging through system files I used to do mods for the HTC hero but I don't have the time anymore.
Click to expand...
Click to collapse
Yes, I had a HTC Hero CDMA model, and loved trying to get the Sense ROM as small as possible, then use the Custom MTD mod to have as much room for /data as possible. I'm more a a 'oh what happens if I delete this' then 'I know what this does' kind of guy. Trial and error lol, can't really break anything.
Anyway, I'm done poking around today. Managed to get the Prime 1.3 zip down to just at 150MB unsigned (removed ringtones, broke dock support since I don't have one, and removed all but 1 notification and alarm).
EDIT: Okay, we can't get rid of the TTS stuff without a FC in Settings / Language & Input / Text-to-speech Settings -- I had to repush all the TTS files to get it to work. This is still optional, at least.
Pretty sure libjUPnPCP.so has something to do with the DLNA application.. Why else would you need to detect a upnp device?
Thanks, I wanted to rip splashtop out of this thing already. Causes some of my apps for FC.
List of what i have removed so far:
AsusReader.apk LatinImeGoogle.apk PolarisOffice.apk
AsusSetupWizard.apk LatinImeTutorial.apk PRAndroid.apk
AWS.apk Launcher2.apk Screenshot.apk
Browser.apk Layar.apk SoundRecorder.apk
CifsManager.apk LiveWallpapersPicker.apk StrAsus.apk
DLNA.apk MEar.apk Street.apk
DMClient.rename MyCloud.apk Talk.apk
Email.apk MyGazine.apk TelephonyProvider.apk
EmailWidget.apk MyWater.apk Vibe.apk
FileManager.apk PCSyncLauncher.apk VoiceSearch.apk
GoogleQuickSearchBox.apk Phone.apk Weather.apk
HTMLViewer.apk PixWe.apk XT9IME.apk
Just exactly do you remove them? I am trying to rename StrAsus.apk in root explorer and it keeps saying I can't. So could you tell me the commands I need to use in ADB, I am not used to it.
adb remount
adb shell
rm /pathoffiles

Moving the menu button back where it belongs

Let's face it, the menu belongs on your left thumb. We all know it.
It's not a hard fix.
First, you need to root your phone. Next, get Root Explorer from the market. (Other file managers and text editors can be used, but Root Explorer makes it easy.)
Navigate to /SYSTEM/USR/KEYLAYOUT/s3c-keypad.kl
(If you aren't using Root Explorer, make a backup copy of the original file before you edit!)
Open s3c-keypad.kl and make sure you are set to read and write the file.
It will look like this:
#
# NAGSM_SEL_FRAMEWORK
# abhilash.b - Keymaping and added custom labels - SYMBOL , MULTITASKER, SMILEY
#
key 16 1
key 17 2
key 25 3
key 33 4
key 41 5
key 49 6
key 2 7
key 10 8
key 18 9
key 67 0
key 68 Q
key 65 W
key 3 E
key 11 R
key 19 T
key 27 Y
key 35 U
key 43 I
key 51 O
key 59 P
key 20 A
key 28 S
key 36 D
key 44 F
key 52 G
key 60 H
key 5 J
key 13 K
key 21 L
key 4 DEL
key 45 SEARCH
key 53 Z
key 61 X
key 6 C
key 14 V
key 22 B
key 30 N
key 38 M
key 54 SMILEY
key 29 ENTER
key 15 SHIFT_LEFT
key 23 ALT_LEFT
key 56 AT
key 48 COMMA
key 63 SPACE
key 64 PERIOD
key 32 QUESTION
key 40 VOICE_INPUT
key 46 SHIFT_RIGHT
key 7 MULTITASKER
key 34 BACK WAKE_DROPPED
key 66 MENU WAKE_DROPPED
key 8 HOME WAKE
key 42 VOLUME_UP WAKE_DROPPED
key 58 VOLUME_DOWN WAKE_DROPPED
key 26 POWER WAKE
key 50 DPAD_CENTER WAKE_DROPPED
key 39 FOCUS
key 31 CAMERA
# Need to be interchanged later - abhilash.b
...Now, switch the HOME WAKE to the key 66 line and put the MENU WAKE_DROPPED on the key 8 line.
When you save it, Root Explorer cleverly makes a backup of the original for you.
Now, reboot and enjoy. The menu is back where it belongs (top left) and the home button has moved to the cancel key position--upper right.
It's easy fix and it makes the device feel more like home.
Sent from my SGH-T839 using XDA App
man kind of wish i had run into this earlier. Coming from the G1 I kept hitting the wrong buttons for a long time. Now i've already gotten used else i'd jump right on this
LesserAnimal said:
man kind of wish i had run into this earlier. Coming from the G1 I kept hitting the wrong buttons for a long time. Now i've already gotten used else i'd jump right on this
Click to expand...
Click to collapse
Lol same thing for me, im used to it now
hahaha omg i totally didn't even think about this. I might have to do this for the question mark too...
Would this allow us to change the trackball click function into a search button? Because that woukd solve the biggest flaw on this phone.
And if so, would trackball scrolling still work for text selection? I like that, just don't really use the trackball click. I'm guessing the trackball button would be the one labeled "center" right?
Falkner09 said:
Would this allow us to change the trackball click function into a search button? Because that woukd solve the biggest flaw on this phone.
And if so, would trackball scrolling still work for text selection? I like that, just don't really use the trackball click. I'm guessing the trackball button would be the one labeled "center" right?
Click to expand...
Click to collapse
if you can get that to work i'd remap my trackball to search as well. good idea .. never woulda though of that
ayoteddy said:
if you can get that to work i'd remap my trackball to search as well. good idea .. never woulda though of that
Click to expand...
Click to collapse
So did anyone try it?
Remapped long after getting "used" to the new menu location, now I get to re-train myself. Whoops. Ah well. It is where it should be now!
ayoteddy said:
if you can get that to work i'd remap my trackball to search as well. good idea .. never woulda though of that
Click to expand...
Click to collapse
Well my trackpad is officially now a search key all u do is replace line 50 with SEARCH (all upper case) and reboot so thank u guys for the information appreciate it
Edit: trackpad still scrolls too
Sent from my SGH-T839 using xda premium
Gplayjay said:
Well my trackpad is officially now a search key all u do is replace line 50 with SEARCH (all upper case) and reboot so thank u guys for the information appreciate it
Edit: trackpad still scrolls too
Sent from my SGH-T839 using xda premium
Click to expand...
Click to collapse
WOO! Thanks now it feels like my phone is fulfilled!
You can put your search button on the "multitasker" button. The key still works as a jump key when the phone is open.
You will lose access to your recent apps, but you can take care of that with a new launcher or a "prehome" app.
Just replace MULTITASKER with SEARCH.
Sent from my SGH-T839 using XDA App
I tried doing this without root explorer (don't want to pay) and I ant find any app that will open the file. I edit it and then I reboot my phone, nothing changes.
Sent from my SGH-T839 using XDA App
the search button works when changed to the trackpad thanks everyone
would this work on forcing the enter key to send a message instead of just creating a line break?
theU1991 said:
would this work on forcing the enter key to send a message instead of just creating a line break?
Click to expand...
Click to collapse
Sadly, it will not.
TTYTYTYTYTYTYTY sooo much ive been looking for this
pretty sick, gonna look at changing the smiley face key to be another ALT key. thanks!
---------- Post added at 06:43 PM ---------- Previous post was at 06:31 PM ----------
mksin11 said:
I tried doing this without root explorer (don't want to pay) and I ant find any app that will open the file. I edit it and then I reboot my phone, nothing changes.
Sent from my SGH-T839 using XDA App
Click to expand...
Click to collapse
root browser lite by JRUMMY16, free from market. got it just now to do this. worked perfectly. automatically makes a backup of the file for you when you save your edits. app seems solid overall.
---------- Post added at 06:46 PM ---------- Previous post was at 06:43 PM ----------
alright, i changed the SMILEY key to ALT_RIGHT and it TOTALLY WORKS AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH
This is perfect!
My Sidekick 4g took a bath this summer in a creek...the joy damage was the Back button stopped functioning.
I used this post to switch the Jump button to Back, since I never used the Jump button...and my phone works great now. Thanks!
very helpful, even though i'll probably screw this up. Is it possible to change jump key into launching a pre home app, like URL="https://playDOTgoogleDOTcom/store/apps/details?id=mohammad.adib.sidebar.lite"this one? (too new, cant post links)
fuzzie said:
This is perfect!
My Sidekick 4g took a bath this summer in a creek...the joy damage was the Back button stopped functioning.
I used this post to switch the Jump button to Back, since I never used the Jump button...and my phone works great now. Thanks!
Click to expand...
Click to collapse
How can I do that is the Jump key the one that says Multitasker?

[Q] [ubuntu] How to map search key to alt?

I'm happily running Ubuntu on my TF-101 now. Thanks to lilstevie and everyone else who helped make that possible!
However I'd like to make the search key on the dock act as an alt key. I know how to remap modifier keys using xmadmap, but xev doesn't seem to report any X events when pressing the search key so I can't get its code . The home key next to it is reported as "keycode 180 (keysym 0x1008ff18, XF86HomePage)", but absolutely nothing for the search key.
When you press the search key a "search for files" window pops up, so the key press is being recognised somewhere in the system, but I guess whatever that is then suppresses the normal X KeyPress event.
Anyone have any ideas about how to fix this? I guess in the meantime I'll try using the home key instead.
Ah, just figured it out. First disable the system-wide usage of the search key:
Go to System -> Preferences -> Keyboard Shortcuts
Scroll down to the Desktop section and click on "Search"
Press backspace to disable any shortcut for that function
Then xev reports the keypress as "keycode 225 (keysym 0x1008ff1b, XF86Search)" so the following command will make it act as an Alt key:
xmodmap -e "add mod1 = XF86Search"​
Hope someone finds this as useful as I do - it's nice having the keys in the right place!

Disable Capacitive Buttons (functions)

This is to show you how to disable the capacitive buttons so they will no do anything other then light up if you so please.
Generally this would be used with the onscreen NAV keys like that in the Galaxy Nexus.
Code:
I am not responsible if this causes your phone to
make first contact and bring forth a race of beings that kills us all.
I am also not responsible if this damages your phone in any way, at all.
I have done this on my SGSII LTE (Skyrocket) i727R and suffered NO issues.
I am using this on the AOKP Milestone 6 ROM.
I suspect that this would work with other ROMS and even other phones with no issues.
STEPS:
NANDROID/OTHER BACKUP!!
Using Root Explorer (or other file explorer) go to /system/usr/keylayout
MAKE A BACKUP OF "melfas_touchkey.kl"
Edit "melfas_touchkey.kl"
Add a # in front of each line, there should only be four.
Save the file and reboot your phone.
Code:
Original:
Key 158 BACK Virtual
Key 139 MENU Virtual
Key 172 HOME Virtual
Key 217 SEARCH Virtual
Code:
Altered:
#Key 158 BACK Virtual
#Key 139 MENU Virtual
#Key 172 HOME Virtual
#Key 217 SEARCH Virtual
Adding a # in front of the line disables that line of code and the function.
Now if you want the lights gone too, the only way I know of so far is to try an app that inst 100% compatible called "Keep the lights on".
The app will add a widget that you can disable the lights with.
For me, they just turn on again when coming out of standby.
[Edit]So this is also posted in RootzWiki, found it after posting.
http://rootzwiki.com/topic/31065-tu...acitive-buttons-lights-and-use-on-screen-nav/
Personally I don't see a reason to disable them but maybe you could alter this to change the function of certain keys?
ceasee said:
This is to show you how to disable the capacitive buttons so they will no do anything other then light up if you so please.
Generally this would be used with the onscreen NAV keys like that in the Galaxy Nexus.
Code:
I am not responsible if this causes your phone to
make first contact and bring forth a race of beings that kills us all.
I am also not responsible if this damages your phone in any way, at all.
I have done this on my SGSII LTE (Skyrocket) i727R and suffered NO issues.
I am using this on the AOKP Milestone 6 ROM.
I suspect that this would work with other ROMS and even other phones with no issues.
STEPS:
NANDROID/OTHER BACKUP!!
Using Root Explorer (or other file explorer) go to /system/usr/keylayout
MAKE A BACKUP OF "melfas_touchkey.kl"
Edit "melfas_touchkey.kl"
Add a # in front of each line, there should only be four.
Save the file and reboot your phone.
Code:
Original:
Key 158 BACK Virtual
Key 139 MENU Virtual
Key 172 HOME Virtual
Key 217 SEARCH Virtual
Code:
Altered:
#Key 158 BACK Virtual
#Key 139 MENU Virtual
#Key 172 HOME Virtual
#Key 217 SEARCH Virtual
Adding a # in front of the line disables that line of code and the function.
Now if you want the lights gone too, the only way I know of so far is to try an app that inst 100% compatible called "Keep the lights on".
The app will add a widget that you can disable the lights with.
For me, they just turn on again when coming out of standby.
[Edit]So this is also posted in RootzWiki, found it after posting.
http://rootzwiki.com/topic/31065-tu...acitive-buttons-lights-and-use-on-screen-nav/
Click to expand...
Click to collapse
Hey man i seen your method and i tried it but, it didn't work for me and i checked the file after a reboot and the buttons still work even thought I am trying to disable it.
I figured this out a couple months ago when I was only using virtual buttons. XD
CoogiMane1996 said:
Hey man i seen your method and i tried it but, it didn't work for me and i checked the file after a reboot and the buttons still work even thought I am trying to disable it.
Click to expand...
Click to collapse
Did you save the file? And as the right name?
Sent from my SAMSUNG-SGH-I727 using xda app-developers app

[Q] Keyboard questions - How to type | (pipe) and > (greaterthan)? What is SYM?

This is probably really dumb, and I already found an easier way to do all this (adb shell), but still curious...
I was trying to do something in terminal and wanted to pipe it somewhere... but no | key on the keyboard that I could find.... so I though I'd redirect to a file instead to open later, but no > key either. Is there a way to enter those characters without closing the real keyboard and using the on screen keyboard?
And while I'm at it, what is the SYM key for? And what is that thing that symbol that looks kinda like a microphone, or a hard boiled egg in an egg holder, on the tab key?
enigma9o7 said:
This is probably really dumb, and I already found an easier way to do all this (adb shell), but still curious...
I was trying to do something in terminal and wanted to pipe it somewhere... but no | key on the keyboard that I could find.... so I though I'd redirect to a file instead to open later, but no > key either. Is there a way to enter those characters without closing the real keyboard and using the on screen keyboard?
And while I'm at it, what is the SYM key for? And what is that thing that symbol that looks kinda like a microphone, or a hard boiled egg in an egg holder, on the tab key?
Click to expand...
Click to collapse
I'll assume you're using CM or a CM derivative ROM...
If you choose one of the Asanti layouts for keypad_8960 (Settings>Language & input>Physical keyboard>keypad_8960), you can type:
| by SYM + '
< by SYM + ,
> by SYM + .
and there's more...
Asanti layouts use SYM as an ALT key so you can enter an alternate character mapped to a key.
The microphone pictogram on TAB key means voice input that can be activated by SHIFT+TAB, but this key combo is supported only on stock Motorola ROM.
kabaldan said:
I'll assume you're using CM or a CM derivative ROM...
If you choose one of the Asanti layouts for keypad_8960 (Settings>Language & input>Physical keyboard>keypad_8960), you can type:
| by SYM + '
< by SYM + ,
> by SYM + .
and there's more...
Asanti layouts use SYM as an ALT key so you can enter an alternate character mapped to a key.
The microphone pictogram on TAB key means voice input that can be activated by SHIFT+TAB, but this key combo is supported only on stock Motorola ROM.
Click to expand...
Click to collapse
THANKS! Your assumption (about CM) was correct, and that works perfect. I'd already tried SYM+other keys, but nothing happened, that asanti layout did the trick. Thanks again.
I made the plunge to the CM12 nightlies, ended up doing a complete wipe first.
If I use the default "English (US) / Android keyboard" then certain keys don't match up... for example I couldn't get a colon by using shift-period...
All the "Asanti xxx / Photon Q keypad" don't seem to be for English, although it seems the one I'm trying now (Germany QWERTY v1) seems to be fine so far, but haven't fully tested...
I can't find the asanti keyboards, however.... is there something different reccommended for lollipop?

Categories

Resources