Post Reply

[Q] Changing Desire Z hardware keyboard to swedish (with )

10th April 2012, 09:58 AM   |  #1  
OP Member
Thanks Meter: 2
 
69 posts
Join Date:Joined: Apr 2012
As we can provide new key mappings with custom roms, should it not be possible to do something like this instead? I'm fairly certain the keyboard has the equivalent buttons, but they're mapped to other useless stuff like shortcuts.

Would it be possible to include a swedish keymap in a rom and have it work "automatically"? I.e. are keymaps nothing more than a mapping turning a key (presumably an identifier) into a character?
11th April 2012, 07:29 AM   |  #2  
ZilverZurfarn's Avatar
Senior Member
Flag Gteborg
Thanks Meter: 18
 
896 posts
Join Date:Joined: Feb 2009
More
Yes, it is. Take a look at Swedroid's forum.
The Following User Says Thank You to ZilverZurfarn For This Useful Post: [ View ]
11th April 2012, 07:44 AM   |  #3  
OP Member
Thanks Meter: 2
 
69 posts
Join Date:Joined: Apr 2012
Thumbs up
Excellent, thanks!
17th April 2012, 05:23 PM   |  #4  
OP Member
Thanks Meter: 2
 
69 posts
Join Date:Joined: Apr 2012
I found some stuff there, and I've gotten to the point where I can modify my keymap. I know this, because I've managed to unmap a key. However, I'm unable to map the keys to the actual output I desire. I need the codes for , and , respectively. According to that I found, they're FUNC_8, 7 and 5, but that simply doesn't work. I get nothing when I push the buttons when they are pointed to those mappings.

Any ideas?
17th April 2012, 05:32 PM   |  #5  
OP Member
Thanks Meter: 2
 
69 posts
Join Date:Joined: Apr 2012
Looking at vision-keymap-nor.kl, which contains the norweigian keymaps, the FUNC codes are the same. The question is, what do they point to?
17th April 2012, 06:27 PM   |  #6  
OP Member
Thanks Meter: 2
 
69 posts
Join Date:Joined: Apr 2012
So I looked at the files in /system/usr/keychars, and I found a human-readable file that looks like what I need. It looks like it's what defines the "aliases" being referenced in the keylayout file.

The only problem with that is that, when I uploaded my changed keychars file and rebooted, I reverted to some keymap with hardly anything but the basic keys in them. Only 4-5 keys produce anything while Fn is held...
17th April 2012, 08:32 PM   |  #7  
OP Member
Thanks Meter: 2
 
69 posts
Join Date:Joined: Apr 2012
I'm fairly certain I can edit the layout properly. I think, however, that it defaults back to Generic.kcm. I wonder why that is. Does anybody know how android selects which keymap to use?
18th April 2012, 05:29 PM   |  #8  
OP Member
Thanks Meter: 2
 
69 posts
Join Date:Joined: Apr 2012
Lightbulb I found the problem
I found the problem.

I had tried to use custom keycodes, A_RING, A_DOTS and O_RING in my vision-keypads-wwe.kcm, but it turns out that this is not allowed. You have to stick to ones that exist. I looked at vision-keypads-nor.kcm, and found that it used BUTTON_1, BUTTON_2 and BUTTON_3 for this. Once I switched from my custom keycodes to ones that exist, it immediately accepted the programming.

Result: I now have native mapped to the bottom row of my keyboard in ICS.
As this maps SYM to '', you can get SYM bu doing Fn+Shift+SYM

If you want the same, I've attached my .kl and .kcm files. To put use them, do the following:

Quote:

adb push vision-keypad-wwe.kl /sdcard/
adb push vision-keypad-wwe.kcm /sdcard/
adb shell
mount -o rw,remount -t ext3 /dev/block/mmcblk0p25 /system
cp /system/usr/keylayout/vision-keypad-wwe.kl /sdcard/vision-keypad-wwe.kl.orginal
cp /system/usr/keychars/vision-keypad-wwe.kcm /sdcard/vision-keypad-wwe.kcm.orginal
cp -f /sdcard/vision-keypad-wwe.kl /system/usr/keylayout/vision-keypad-wwe.kl
cp -f /sdcard/vision-keypad-wwe.kcm /system/usr/keychars/vision-keypad-wwe.kcm
mount -o ro,remount -t ext3 /dev/block/mmcblk0p25 /system
exit
adb reboot

If you need help, don't hesitate to ask.

Edit: Credit where credit is due. I had some help from this thread: http://www.swedroid.se/forum/showthr...entbord&page=2
Attached Files
File Type: zip vision-keypad-wwe-swedish-chars.zip - [Click for QR Code] (4.6 KB, 30 views)
Last edited by jevring; 18th April 2012 at 05:35 PM. Reason: Give credit to my sources

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes