[Q] How do I get a £ sign with CM7 on a UK DZ?

Search This thread

dicko99

Senior Member
May 1, 2008
181
5
Hi there,

Recently converted to CM7 after years of Sense ROMs and I'm loving it. But I have one question, how do I make FN-z on the physical keyboard produce a £ sign?

I've got the keyboard language set to English (United Kingdom) but that doesn't seem to make any difference.

Regards,
Richard
 

lineaira

Senior Member
Mar 28, 2010
64
18
Change the characterlayout in /system/usr/keychars

In all *.kcm files add these lines to the Z key:

Code:
	alt: '\u00A3'  
	shift+alt:'\u00A3'

To make it look like this:

Code:
key Z              {
	label:'Z'       
	base:'z'       
	shift, capslock:'Z'       
	alt: '\u00A3'  
	shift+alt:'\u00A3'  
}

Do so in all files, to make sure it's loaded whatever keyboard file you're using.
 
  • Like
Reactions: bombadier

Myrmidon83

Senior Member
Jun 19, 2011
115
11
Ah, I notice this is the case in MIUI roms as well.

Would this work there also? I see the kcm files are bin files, how exactly are we editing them, just open as text file I assume?
 
Last edited:

lineaira

Senior Member
Mar 28, 2010
64
18
It should work on any custom rom, unless the keymapping is done diffrent then usally. Just try it, and if it doesn't work or your phone won't start anymore (enters a bootloop) , just reflash your custom rom, without wiping. Then only homescreen settings and system settings will get lost. Personal and data settings will not be touched.
 

Myrmidon83

Senior Member
Jun 19, 2011
115
11
Just to confirm though, are you editing it as a txt file or what? I have no knowledge of editing bin files which the kcm files seem to be.

Eg: vision-keypad-ell.kcm.bin
 

lineaira

Senior Member
Mar 28, 2010
64
18
As textfile yes, but they should be just plain *.kcm files, not *.bin as I believe, let me check that, to be sure.

--Edit:

They are just *.kcm, not *.bin, but I'm not sure how that's done in other Roms..
If there are only *.bin files, then I don't know how to edit those.. I know that *.kcm can be edited as plain text file.
 
Last edited:

Myrmidon83

Senior Member
Jun 19, 2011
115
11
Cool, I'll look into it.

I notice you put '*.kcm'. My memory is failing me but doesn't this mean hidden files? In which case I didn't look for them. :p

EDIT: Nah just looked, they are all BIN files. Looks like MIUI does things differently.

Oh well.
 
Last edited:

lineaira

Senior Member
Mar 28, 2010
64
18
The star doesn't mean they're hidden, it is a joker sign. Just means all filenames that end with .kcm (wich is the extention). The .bin files are packed files, binary files. But I can't remember how to edit those as plain text... Try to do it with something like hexeditor on the pc.
 
Last edited:

dicko99

Senior Member
May 1, 2008
181
5
Change the characterlayout in /system/usr/keychars

In all *.kcm files add these lines to the Z key:

Code:
	alt: '\u00A3'  
	shift+alt:'\u00A3'

To make it look like this:

Code:
key Z              {
	label:'Z'       
	base:'z'       
	shift, capslock:'Z'       
	alt: '\u00A3'  
	shift+alt:'\u00A3'  
}

Do so in all files, to make sure it's loaded whatever keyboard file you're using.

All the files that I have in the folder you specified are *.kcm.bin. I guess I need to find the .kcm source files some where and compile them?

Regards,
Richard
 

lineaira

Senior Member
Mar 28, 2010
64
18
You can pull them from your phone with adb. Then edit them with a program like hexeditor.

I can't explain how, as I do not have any *.bin files on my phone or other rom.
If I can find one somewhere in a download or something (you are on CM7 if I'm right) I'll post instructions tomorrow about how to do it. If you'd like me to, that is.
 
Last edited:
You can pull them from your phone with adb. Then edit them with a program like hexeditor.

I can't explain how, as I do not have any *.bin files on my phone or other rom.
If I can find one somewhere in a download or something (you are on CM7 if I'm right) I'll post instructions tomorrow about how to do it. If you'd like me to, that is.
If you could I would be interested :)
 

lineaira

Senior Member
Mar 28, 2010
64
18
HOW TO: remap the £ back to FN+Z

Okay here we go.


Before we begin, I suppose that you all know how to set up an adb session with your phone..
And you need this program to be installed on your PC:
Free Hex Editor Neo
You should make a backup of your current working ROM with your favorite recovery, so if something goes wrong, you can just reflash the backup, instead of loosing all your data and settings.

Now start a cmd prompt on your pc (Windowskey+R, type "cmd" hit enter)
browse to your platform-tools directory (cd path-to-platformtools)
Make sure your phone is connected:
Code:
adb devices

And execute these lines:

Code:
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
exit

You can now read and write to the /system folder on your phone.

Next you need to pull the *.kcm.bin file you'd like to edit. (For the OP this is most likely the "vision-keypad.kcm.bin" or the "vision-keypad-wwe.kcm.bin", but if they aren't the ones used.. then try and edit the "qwerty.kcm.bin" or "generic.kcm.bin" files)

This is done by entering the following:

Code:
adb pull /system/usr/keychars/vision-keypad-wwe.kcm.bin /tmp/vision-keypad-wwe.kcm.bin

Or one of the many other files if this one isn't working.

Minimize the cmd screen for now and browse on your computer to the platform-tools folder (or the folder where you executed the adb from) there should be an new folder called "tmp", in that folder you'll find the file you just pulled from your phone.
Hit it with a right mouse-click and click "Edit with HDD Hex Editor Neo". (If that option is not available, start the Hex Editor and open the file from within the editor)

The first row and columns are blue, except for the first one on the far left-top side, this one is white.
Click it and type: "0000027c" and hit enter.
Now there are some hexadecimals selected in green. On the far right side of that row should be something like this: "6...Z.9.z.Z"
(If that isn't the case, find the line that does look like that and edit that line)

In the green field you've got, change the value to: "a3" (just type)
The cursor will automatically go to the next value, which is "00" leave that.
Press the arrow-key to the right once and edit that value to "a3" as well.

The field on the right side should now display something like: "6...Z.9.z.Z.£.£."

That's it, save the file and push it back to your phone by entering the following in the cmd window you minimized:

Code:
adb push /tmp/vision-keypad-wwe.kcm.bin /system/usr/keychars/vision-keypad-wwe.kcm.bin

Then restart the phone and it should be working!

----
I used the file in the .zip attached as my example file, to see how to do it.
 

Attachments

  • vision-keypad.kcm.zip
    564 bytes · Views: 8
Last edited:

lineaira

Senior Member
Mar 28, 2010
64
18
Where do you get the list of codes ? Need the Euro Symbol code ? __=€
Thanks
Edit google is my friend,tried 80 which shows in my file but just get a blank keypress?

The Euro € sign is set in the X key.

That line is: "4...X.x.X."

If you want it in the Z key, type "0000027c" in the left top box and hit enter, type "ac20ac20" That'll give you the euro sign. Then the field on the right looks like this: "6...Z.z.Z.- - "

If you want it in the X key, type "0000025c" in the left top box and hit enter, type "ac20ac20" That'll give you the euro sign. (string on the right looks like: "4...X.x.X.- - ")
 
  • Like
Reactions: bombadier

Myrmidon83

Senior Member
Jun 19, 2011
115
11
Thanks for that!

It'll be fun trying this on Linux. ;)

I'll let you know how I get on when I find the time.
 

lineaira

Senior Member
Mar 28, 2010
64
18
Thanks for that!

It'll be fun trying this on Linux. ;)

I'll let you know how I get on when I find the time.

For linux you can do the same as you need to do for windows. The only thing is that you have to find software which can edit binary files. A nice GUI based editor is ghex.

it's available in the universe repository.
Code:
$ sudo apt-get install ghex
 

dicko99

Senior Member
May 1, 2008
181
5
Lineaira,

Thanks for this info. It worked fine! I now have a GBP sign on Fn-Z.

Regards,
Richard
 

setspeed

Senior Member
May 4, 2009
1,026
145
Easier way. Download the attached file, unzip it and place the contained file on the root of your sdcard, then type in the following commands using Terminal Emulator:

su
mount -o rw,remount /system
busybox cp /sdcard/vision-keypad-wwe.kcm.bin /system/usr/keychars
reboot

Found this over at the Cyanogenmod forums ages ago :)
 

Attachments

  • vision-keypad-wwe.kcm.bin.zip
    591 bytes · Views: 17

lineaira

Senior Member
Mar 28, 2010
64
18
Easier way. Download the attached file, unzip it and place the contained file on the root of your sdcard, then type in the following commands using Terminal Emulator:

su
mount -o rw,remount /system
busybox cp /sdcard/vision-keypad-wwe.kcm.bin /system/usr/keychars
reboot

Found this over at the Cyanogenmod forums ages ago :)

It is easier, but not as much fun and satisfying as doing it yourself, I'd say;p
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    HOW TO: remap the £ back to FN+Z

    Okay here we go.


    Before we begin, I suppose that you all know how to set up an adb session with your phone..
    And you need this program to be installed on your PC:
    Free Hex Editor Neo
    You should make a backup of your current working ROM with your favorite recovery, so if something goes wrong, you can just reflash the backup, instead of loosing all your data and settings.

    Now start a cmd prompt on your pc (Windowskey+R, type "cmd" hit enter)
    browse to your platform-tools directory (cd path-to-platformtools)
    Make sure your phone is connected:
    Code:
    adb devices

    And execute these lines:

    Code:
    adb shell
    su
    mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
    exit

    You can now read and write to the /system folder on your phone.

    Next you need to pull the *.kcm.bin file you'd like to edit. (For the OP this is most likely the "vision-keypad.kcm.bin" or the "vision-keypad-wwe.kcm.bin", but if they aren't the ones used.. then try and edit the "qwerty.kcm.bin" or "generic.kcm.bin" files)

    This is done by entering the following:

    Code:
    adb pull /system/usr/keychars/vision-keypad-wwe.kcm.bin /tmp/vision-keypad-wwe.kcm.bin

    Or one of the many other files if this one isn't working.

    Minimize the cmd screen for now and browse on your computer to the platform-tools folder (or the folder where you executed the adb from) there should be an new folder called "tmp", in that folder you'll find the file you just pulled from your phone.
    Hit it with a right mouse-click and click "Edit with HDD Hex Editor Neo". (If that option is not available, start the Hex Editor and open the file from within the editor)

    The first row and columns are blue, except for the first one on the far left-top side, this one is white.
    Click it and type: "0000027c" and hit enter.
    Now there are some hexadecimals selected in green. On the far right side of that row should be something like this: "6...Z.9.z.Z"
    (If that isn't the case, find the line that does look like that and edit that line)

    In the green field you've got, change the value to: "a3" (just type)
    The cursor will automatically go to the next value, which is "00" leave that.
    Press the arrow-key to the right once and edit that value to "a3" as well.

    The field on the right side should now display something like: "6...Z.9.z.Z.£.£."

    That's it, save the file and push it back to your phone by entering the following in the cmd window you minimized:

    Code:
    adb push /tmp/vision-keypad-wwe.kcm.bin /system/usr/keychars/vision-keypad-wwe.kcm.bin

    Then restart the phone and it should be working!

    ----
    I used the file in the .zip attached as my example file, to see how to do it.
    1
    Change the characterlayout in /system/usr/keychars

    In all *.kcm files add these lines to the Z key:

    Code:
    	alt: '\u00A3'  
    	shift+alt:'\u00A3'

    To make it look like this:

    Code:
    key Z              {
    	label:'Z'       
    	base:'z'       
    	shift, capslock:'Z'       
    	alt: '\u00A3'  
    	shift+alt:'\u00A3'  
    }

    Do so in all files, to make sure it's loaded whatever keyboard file you're using.
    1
    Where do you get the list of codes ? Need the Euro Symbol code ? __=€
    Thanks
    Edit google is my friend,tried 80 which shows in my file but just get a blank keypress?

    The Euro € sign is set in the X key.

    That line is: "4...X.x.X."

    If you want it in the Z key, type "0000027c" in the left top box and hit enter, type "ac20ac20" That'll give you the euro sign. Then the field on the right looks like this: "6...Z.z.Z.- - "

    If you want it in the X key, type "0000025c" in the left top box and hit enter, type "ac20ac20" That'll give you the euro sign. (string on the right looks like: "4...X.x.X.- - ")