[T-Mobile Sidekick 4G] chaostic_2k1:
Quick and short of it:

The SK4G has the same exact physical Keyboard layout of the G1. But it sucks in comparison to the G1's layout because someone at Samsung dropped the ball. Shift + a number does not give you the normal expected symbol. There is a lack of a comma on the right hand side. Shift+Alt tends to not do anything on most keys. With this mod, I fixed 90% of the annoyances of the hardware keyboard (Just need to turn the [useless everywhere but the stock messaging app] smilie key into the voice key, and the voice key into an alt key and I'll be 100% good)

By hacking the corresponding kcm.bin file in the /system/usr/keychars/ directory, you can change the action of a key. This is not the same as changing the kl file in /system/usr/keylayout/ which allows you to change the behavior of a physical key. (A bit of semantics really.)

I modded the default kcm.bin (Binary Keyboard Character Map) file s3c-keypad.kcm.bin to match the G1 kcm closely, adjusting for what is printed on the SK4g keyboard, so w, e, and r are still smilies, and m is still /, while alt+shift+? is now ¿ as the g1 has. Only change to what is printed was fixing the multiplication sign symbol on alt+o to show an actual multiplication sign, instead of an x. Some unused alt+shift+key were used to improve usage, and for flair.

Main Changes:

shift+number provides its corresponding symbol, like it should.

alt+shift+O is the Umlat combining accent (press another character afterwards it it might combined, like ¨ + u is ü. Same result as longpressing U).

Alt+Q default by Samsung is a Space. Alt+Shift+Q is now Tab.

Alt+Shift+T is the "¬" not symbol. Sideways L. Useful for ¬_¬ sideway glances.

Alt+Shift+Y is the unicode STAR AND CRESCENT. SK4G can't display it, but it will show up correctly in OSes that understand it/have the right encoding (like the G1).

Shift+Period is a comma. Because the comma belongs on the right side of the keyboard dammit.

Alt+Period is a bullet symbol.

Alt+Shift+Period is a "`" Grave combining accent (same as Umlat. Grave + space is regular grave)

Alt+Shift+Enter is a CR return key, instead of the normal LF return key. Some apps recognize the difference (ConnectBot)

Alt+@ and Shift+@ is the ~ tilde. I did not add the combining accent version. An adult keyboard requires the ~.

Alt+Shift+@ is the Eighth Note. Because we all need some music in our lives. Displays properly on the SK4g.

Instructions:

If you want to use the character map I created, you will need root, adb, and be comfortable mucking about the phone's system files. You can install with RootExplorer or any other file manager instead, if you know how to do it:

adb push /path/to/unzipped/files/mods3c-keypad.kcm.bin /data/local/tmp/
adb shell
su
mount -o remount,rw /dev/block/stl9 /system
cp /data/local/tmp/mods3c-keypad.kcm.bin /system/usr/keychars/
cp /system/usr/keychars/s3c-keypad.kcm.bin /system/usr/keychars/s3c-keypad.bu
mv /system/usr/keychars/mods3c-keypad.kcm.bin /system/usr/keychars/s3c-keypad.kcm.bin
chmod 644 /system/usr/keychars/s3c-keypad.kcm.bin

You need to push the file to the tmp folder, then going in as superuser, remount the system partition.

Once remounted, you can copy the file to the correct folder.

Safety first, make a backup of the original file. A copy of the original is also provided in the zip folder.

Now you overwrite the original.

Once that's done, you want to correct the permissions to 644 like the original.

At this point, you can reboot. If you want to give it a try before rebooting, you can just load any app that isn't in memory, or kill an existing app, and load it back up, and type to see the difference. You must reboot if you want to see the changes everywhere. Any app in memory, including home and system, will not see the new file till you kill it/reboot.

What's in the zip:

Four files are provided in the zip.

1: "s3c-keypad.kcm.bin" This is the original kcm.bin from the stock KD1 firmware. Most likely, it has not been change in KG2.

2: "trout-keypad-v3.kcm" This is a plain text readable version of the G1 kcm. Look at this if you want to see the format android uses to build the kcm.bin file. Easy to read.

3: "mods3c-keypad.kcm" This is a modified kcm file, easy to read showing what my modded layout is, with notes.

4: "mods3c-keypad.kcm.bin" the actual kcm.bin file you can use to drastically improve your keyboard.

If You want to make your own:

Some Resources First:

ASOP Developers Guide to the Keyboard:

http://www.kandroid.org/online-pdk/guide/keymaps_keyboard_input.html

Describes how Android uses (some of) the keyboard files, and the file layouts.

Extending the keyboard mapping of an Android system

http://jahrome.free.fr/index.php/keyboard-mapping-android-htc-desire?lang=en

Found this after the fact, some xda members doing this on the g1 way back when:

http://xdaforums.com/showthread.php?t=468703

Someone had a python tool to turn kcm.bin to kcm files.

http://xdaforums.com/showthread.php?t=837002

Basically, you will be mucking around a hexeditor to change the kcm.bin file.

Make the hex editor show you 16 bytes per line, and you will see a nice pattern, as shown on the http://jahrome.free.fr/index.php/keyboard-mapping-android-htc-desire?lang=en.

Any non-normal (unicode) character should be put on the hex side, so 0x0300 would be typed in. Additionally, hex editors tend to show lsb first. So unicode 0x0300 would show up as "00 03". 0xEF01 will be seen as 01 EF.

If you look and compare the hex editor screen to the kcm file provided, you can easily modify the kcm.bin file to your liking.

Future:

I'm trying to find where the LongPress Keyboard character maps are. Like when you longpress ! lets you choose ¡, or long pressing shift+4 ($) gives you the option to insert a couple of currency marks, or longpressing a will let you choose from accented a characters (å,ä,â etc).

Additionally, also looking for the same on the Extended Feature keys, like SYM, and the smilies. The smilies are just macros that get typed when you press them, as using the regular smilie types ":" "-" and ")", and you can delete each one individually. Having a customizable macro key would be great.

But from my guess, one or both of those features are embedded in the keyboard device driver. I will muck around the filesystem to see what I can find.

Notes:

I am not responsible for anything ever anywhere. You break it, you pay it, not me.

Also, this is only for the hardware keyboard, not the virtual IMEs. Changing those would require apk code signing, and desamali and everything. headthefrickache.