[Q] QWERTZ -> QWERTY on a Desire Z

Search This thread

bonstio

Senior Member
Jan 10, 2011
187
39
I recently obtain a Desire Z and immediately rooted and installed various ROMS. All is working great.

The problem is the hardware keyboard is a qwertz one (I bought the phone in Switzerland) and not a qwerty one. I want to the switch the keymap around such that z prints y and vice versa. I've set the keyboard setting to UK and US English but it has no effect on the h/w k/b.

I'm familiar with adb but don't know which files to hack on. Please can someone point me in the right direction?

Thanks!
 

bonstio

Senior Member
Jan 10, 2011
187
39
Thanks for the reply.

But I don't buy it. This can be changed somehow and someone knows how. I'll keep hacking and post back with any useful results.
 

xanth

Senior Member
Jan 28, 2005
136
6
UK
This is just a hunch, but you probably just need to modify /system/usr/keylayout/vision-keypad.kl and possibly /system/usr/keylayout/qwerty.kl (they're both plain text files, but with unix line endings)

On a UK QWERTY Desire Z:

Key 21 is Y
Key 44 is Z

If your files have them round the other way, it should just be a simply case of swapping them and rebooting (nandroid first though!)
 
Last edited:

bonstio

Senior Member
Jan 10, 2011
187
39
Great. I tried those files and no good so I went for the heavy handed approach after mounting system as rw and su'ing:

cd /system/usr/keylayout
sed -i s/Y/--/ *
sed -i s/Z/Y/ *
sed -i s/--/Z/ *

Job done! Thanks for your help :)
 
Last edited:

DRuMah

Member
Feb 13, 2008
8
0
For the almost-beginners:
Connect your phone in sync-mode, run cmd, navigate do adb directory (search forum for adb if you didn't get it) and type:
Code:
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/usr/keylayout
sed -i s/Y/--/ *
sed -i s/Z/Y/ *
sed -i s/--/Z/ *
Best regards to all :)
 

dohaa32

Member
Aug 23, 2008
39
0
For the almost-beginners:
Connect your phone in sync-mode, run cmd, navigate do adb directory (search forum for adb if you didn't get it) and type:
Code:
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/usr/keylayout
sed -i s/Y/--/ *
sed -i s/Z/Y/ *
sed -i s/--/Z/ *
Best regards to all :)

shall be rooted to run these?
am getting access denied!!!!!11111
 

migueluli

Member
Dec 2, 2011
6
1
For the almost-beginners:
Connect your phone in sync-mode, run cmd, navigate do adb directory (search forum for adb if you didn't get it) and type:
Code:
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/usr/keylayout
sed -i s/Y/--/ *
sed -i s/Z/Y/ *
sed -i s/--/Z/ *
Best regards to all :)

Hi, I've tried this on my Desire Z and it indeed switched the 'y' and 'z' character keys on the hardware keyboard.

The downside is that is also changes the corresponding FN symbols (i.e. number six character '6' and underscore character '_').

Do you know wether it is possible to switch the letters but not the symbols?
 

bonstio

Senior Member
Jan 10, 2011
187
39
I don't know about the symbols. My guess is you have to live with it. I do. Yes, it's annoying but IMO about 10% as annoying as the original problem.

I would also add that on ICS, the above changes b0rked the keyboard (probably due to the sed script replacing stuff it ought not have). So I used this instead:

Code:
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/usr/keylayout
sed -i s/'key 44 '/'key XX '/g *
sed -i s/'key 21 '/'key 44 '/g *
sed -i s/'key XX '/'key 21 '/g *
adb reboot

If I have to do this one more time, I'm going to make an app.....
 

migueluli

Member
Dec 2, 2011
6
1
In the end I managed to fix the symbols by editing some hex file I can't recall right now. I can check it out later and post what I did if anyone is interested.

Couldn't come up with a simple command like yours though, and edited it by hand by downloading to the PC and uploading after modification. It can probably be done using regular expressions, but they are not my biggest strength ;)
 

bonstio

Senior Member
Jan 10, 2011
187
39
Good job :) I'm certainly interested. If you could post specific details that would be great!

Cheers.
 

migueluli

Member
Dec 2, 2011
6
1
Sorry for the delay, but I've had quite a busy week...

The file that I modified was /system/usr/keychars/vision-keypad-ger.kcm.bin My phone was bought from Germany, so if you have a different region phone the specific file you need to edit might be a different one.

I edited it on Windows with xvi32 hex editor (GHex on Ubuntu works fine as well), and the nice thing about it is that you can see the hexadeciman values on the left and their ASCII counterparts on the right. It was quite easy to find the sections 'yY__' and 'zZ66'. You only need to change those to 'yY66' and 'zZ__' and voilá.

If you already have your 'y' and 'z' keys swapped (but the symbols out of place), you should changed change the '6's and '_'s. If you have the letters on their original positions you should then change the letters instead, and the symbols will stay where they are.

Hope that helps.
 
  • Like
Reactions: bonstio

needubad

New member
Apr 15, 2012
1
0
little help

Sorry for the delay, but I've had quite a busy week...

The file that I modified was /system/usr/keychars/vision-keypad-ger.kcm.bin My phone was bought from Germany, so if you have a different region phone the specific file you need to edit might be a different one.

I edited it on Windows with xvi32 hex editor (GHex on Ubuntu works fine as well), and the nice thing about it is that you can see the hexadeciman values on the left and their ASCII counterparts on the right. It was quite easy to find the sections 'yY__' and 'zZ66'. You only need to change those to 'yY66' and 'zZ__' and voilá.

If you already have your 'y' and 'z' keys swapped (but the symbols out of place), you should changed change the '6's and '_'s. If you have the letters on their original positions you should then change the letters instead, and the symbols will stay where they are.

Hope that helps.

hi. how you manage to change permission of file vision-keypad-ger.kcm.bin ?
I tried with adb, it's not working. :(
 

migueluli

Member
Dec 2, 2011
6
1
hi. how you manage to change permission of file vision-keypad-ger.kcm.bin ?
I tried with adb, it's not working. :(

You need to mount the /system partition as rw to be able to modify that file. You can do that with

Code:
 mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system

while logged as root in the adb shell.

If you already did that and are still unable to modify the file then I'm afraid I cannot be of much help :confused:
 

HoradricCZ

New member
Aug 14, 2012
1
0
I'd like to do an oposite thing: QWERTY --> QWERTZ
for us, noobs, could someone please simillar commands for this operation?
thanks in advance
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Sorry for the delay, but I've had quite a busy week...

    The file that I modified was /system/usr/keychars/vision-keypad-ger.kcm.bin My phone was bought from Germany, so if you have a different region phone the specific file you need to edit might be a different one.

    I edited it on Windows with xvi32 hex editor (GHex on Ubuntu works fine as well), and the nice thing about it is that you can see the hexadeciman values on the left and their ASCII counterparts on the right. It was quite easy to find the sections 'yY__' and 'zZ66'. You only need to change those to 'yY66' and 'zZ__' and voilá.

    If you already have your 'y' and 'z' keys swapped (but the symbols out of place), you should changed change the '6's and '_'s. If you have the letters on their original positions you should then change the letters instead, and the symbols will stay where they are.

    Hope that helps.