FORUMS
Remove All Ads from XDA

Changing to a non-english keyboard layout [cupcake support]

47 posts
Thanks Meter: 100
 
By Keychar, Member on 15th April 2009, 05:40 PM
Post Reply Email Thread
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, 470 views)
 
 
15th April 2009, 06:53 PM |#2  
Member
Thanks Meter: 0
 
More
Thank you! this is fantastic. I just have to figure out how this would work with asian fonts
15th April 2009, 06:54 PM |#3  
imfloflo's Avatar
Retired Moderator
Flag Clermont-Ferrand, France
Thanks Meter: 819
 
Donate to Me
More
Thanks maybe everybody can put the different layout in this thread.
In France we have azerty layout.
15th April 2009, 07:28 PM |#4  
Dimath's Avatar
Member
Flag Los Angeles
Thanks Meter: 1
 
More
Great thanks!
Would be interesting to be able to SWITCH layouts.
24th April 2009, 10:54 PM |#5  
Member
Thanks Meter: 0
 
More
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!
30th April 2009, 10:11 PM |#6  
Junior Member
Thanks Meter: 0
 
More
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!
30th April 2009, 10:30 PM |#7  
Senior Member
Thanks Meter: 5
 
More
Now that would be fun to do the same but by modifying the on-screen keyboard
26th May 2009, 05:15 PM |#8  
maxisma's Avatar
Senior Member
Flag Dorsten, Germany
Thanks Meter: 43
 
More
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, 396 views)
27th May 2009, 11:01 PM |#9  
Junior Member
Thanks Meter: 0
 
More
Text version of QWERTZ kcm
Hello-
Does any one have the text version of qwertz.kcm.bin?
Thanks.
2nd June 2009, 12:43 AM |#10  
Junior Member
Austin, TX
Thanks Meter: 0
 
More
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
2nd June 2009, 12:55 AM |#11  
OP Member
Thanks Meter: 100
 
More
Nice to see that this is appreciated.

Quote:
Originally Posted by Hamdan919

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

No, it will not. To change the virtual layout you have to program a new layout, or wait for someone else to do it. There are alternative virtual keyboards to download from the market. Make sure that the virtual keyboard does not have internet privileges though, since the virtual keyboard can listen to every single key you push, even on the hardware keyboard. This means that the virtual keyboard can modify the hardware keyboard though, but I haven't seen that except for a bug in a layout.
Post Reply Subscribe to Thread

Tags
keymap

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes