Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Keychar
Old
(Last edited by Keychar; 12th December 2009 at 10:03 AM.) Reason: Left an incorrect cd command in there for some reason.
#1  
Junior Member - OP
Thanks Meter 0
Posts: 13
Join Date: Apr 2009
Lightbulb Changing to a non-english keyboard layout [cupcake support]

I WILL NOT TAKE ANY RESPONSABILITY FOR WHAT HAPPENS TO YOUR PHONE. THIS IS AT YOUR OWN RISK. THIS IS ONLY TRIED ON VERSION 1.1, 1.5 AND 1.6 ON THE DEVELOPER PHONE.

I was fed up with having to hold a and o for my swedish chars, so couple of hours ago I decided to create a swedish layout, and here's how you can do it too. You need an unlocked android phone, such as the Dev1. I will also assume that you have and know how to use the SDK. Connect your phone to your computer and run:
Code:
adb shell
In the shell run getprop and find hw.keyboards.0.devname. This for me is trout-keypad-v3. If it's the same for you, do the following, otherwise change accordingly.
Code:
adb pull /system/usr/keychars/trout-keypad-v3.kcm.bin Desktop/
You now have a copy of the keychar-binary on your desktop, make sure to backup it. Open it in a binary editor, and you will find a file coded with an intro followed by lots of data coded as below (not documented, therefore not guarantied, but I feel pretty certain it's right, dots are 0x00):
..char.numberchar.smallchar.bigchar.smallspecial.b igspecial.(keycode+1).
For example, my A looked like:
..A.2.a.A.a.A.?.
What I want it to look like is:
..A.2.a.A.å.Å.?.
If your hex-editor allows that then congrats to you, mine didn't. What I had to do was to use a ascii-table (http://www.ascii-code.com/) and use teh hex code.
00 00 41 00 32 00 61 00 41 00 61 00 41 00 1E 00
...should therefore be...
00 00 41 00 32 00 61 00 41 00 E5 00 C5 00 1E 00

I now have å and Å on my a-button. The next button for me, Z, could be done using the exact same tactic. The fun part came with X. Notice the coding:
00 00 58 00 39 00 78 00 58 00 78 00 00 EF 35 00
The problem here is EF, which is there to make sure that there is not a ... in the middle of the char-code. What we do here is therefore to change the EF to 00 when we change the 00 before it. The result would therefore be:
00 00 58 00 39 00 78 00 58 00 F6 00 D6 00 35 00

Now let's save the file. We can send it to the device with the following code. THIS WILL REPLACE YOUR CURRENT LAYOUT.
Code:
adb root
adb remount
adb push trout-keypad-v3.kcm.bin /system/usr/keychars/
For security reasons I would recommend you to always reboot your phone after running adb remount, since this will leave your /system more vulnerable then usual.

Now we can restart the phone, and hopefully it will have a new working layout. If the layout is totally different from yours (for example alt+a is #) that means the encoding of the new file is wrong, and another layout is used. If this happens I recommend you start from the beginning, it doesn't take much time, and small errors can be avoided. You can do as above to reset your old layout:
Code:
adb root
adb remount
adb push trout-keypad-v3.kcm.bin.backup /system/usr/keychars/trout-keypad-v3.kcm.bin
My working swedish layout is attached. alt+a => å, alt+z => ä, alt+x => ö.
Hope you will appreciate this as much as I do.

Thanks to Joushou for all the help in #android.
Attached Files
File Type: txt trout-keypad-v3.kcm.bin.txt - [Click for QR Code] (896 Bytes, 424 views)
 
i9zero
Old
#2  
Member
Thanks Meter 0
Posts: 71
Join Date: Mar 2009
Thank you! this is fantastic. I just have to figure out how this would work with asian fonts
 
imfloflo
Old
(Last edited by imfloflo; 19th April 2013 at 07:19 AM.)
#3  
imfloflo's Avatar
Senior Moderator
Thanks Meter 707
Posts: 2,823
Join Date: Apr 2007
Location: Clermont-Ferrand, France

 
DONATE TO ME
Thanks maybe everybody can put the different layout in this thread.
In France we have azerty layout.
Nexus 4 (CM10.1) - Nexus 7 (CM10.1) - Galaxy Nexus (CM10.1) - HP Touchpad (CM9) - Nexus One (CM7.2) - HTC HD2 (CM9)
XDA-developers Senior Moderator - Twitter.com ImFloFlo

 
Dimath
Old
#4  
Dimath's Avatar
Member
Thanks Meter 0
Posts: 74
Join Date: Nov 2008
Location: Los Angeles
Great thanks!
Would be interesting to be able to SWITCH layouts.
 
theorion
Old
#5  
Member
Thanks Meter 0
Posts: 83
Join Date: Mar 2006
I salute you sir for this easy guide!! Though using notepad ++ i didnt even use hex view! but just chose to see through the null null crap on the screen!! Total matrixe experience! But i definetly vote to get this a sticky for easy goofing with keyboard layouts!
 
Acidnator
Old
#6  
Junior Member
Thanks Meter 0
Posts: 23
Join Date: Oct 2007
Works great on Haykuro 1.5, changed a to ä and z to ö. Writing finnish on a mobile phone has never been so easy

Tack ska du ha!
 
emms007
Old
#7  
Senior Member
Thanks Meter 0
Posts: 120
Join Date: Mar 2008
Now that would be fun to do the same but by modifying the on-screen keyboard
 
maxisma
Old
#8  
maxisma's Avatar
Senior Member
Thanks Meter 43
Posts: 1,204
Join Date: May 2009
Location: Dorsten, Germany
Just modified the keypad for qwertz to work with haykuro 6hr1.
Download is in the attachment!
Attached Files
File Type: zip trout-keypad-v3.kcm.zip - [Click for QR Code] (595 Bytes, 375 views)
Acer Liquid Metal
LG Optimus 2x
Reading advice: http://forum.xda-developers.com/showthread.php?t=667298
Follow me on Twitter: www.twitter.com/maxisma
Donate to MoDaCos Cancer Research fund
 
karthikkann
Old
#9  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: May 2009
Default Text version of QWERTZ kcm

Hello-
Does any one have the text version of qwertz.kcm.bin?
Thanks.
 
Hamdan919
Old
#10  
Junior Member
Thanks Meter 0
Posts: 11
Join Date: May 2009
Location: Austin, TX
Hey,

If I've changed that layout will that effect the virtual keyboard layout in 1.5.
If it's not, how can I change the layout for the virtual keyboard.

regards

 
Post Reply+
Tags
keymap
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Preventing App Piracy: Join the Discussion

The topic of piracy is always a touchy subject, but I feel that the grass roots style of Android … more

Jolla Sailfish OS Flagship Device Makes First Appearance

Given the amount of coverage that Android receives around here, you could almost be … more

XDA University: Porting ClockworkMod Recovery to New Devices

Having a good recovery makes the process of modifying, tweaking, maintaining, … more

One Stop Guide Shop for the Newbie and Dev

It’s been well established that XDA-Developers isthedestination for resources relating to … more