[Eee Pad Transformer Q&A, Help & Troubleshooting] fizban007:
As a Colemak user I was initially frustrated with the Transformer keyboard dock, as it comes with QWERTY and there is no obvious way to change the layout. After some googling and trial-and-error I was able to solve the problem. As it seems that there is no good guide on the transformer forum on how to change the keyboard layout, I figured that I might as well write my own, so that newcomers can accomplish the same thing more easily.

Disclaimer: The following are mostly the result of my own trial&error, so it might not be totally correct. Follow the guide at your own risk! Also this requires root access so be careful and back up anything that you might change.

The keyboard layout files for the ASUS transformer lie in these folders

/system/usr/keylayout
/system/usr/xt9/keylayout

The second folder is used when you are using one of the ASUS input methods (as suggested by ASUS to "keep consistency with the physical keyboard"), whereas the first folder contains keyboard layout for general situations. The file /system/usr/keylayout/asusec.kl is the main layout profile for the keyboard dock and it is in plain text format. Its original content looks like this

key 41 GRAVE WAKE UNLOCK
key 2 1 WAKE UNLOCK
key 3 2 WAKE UNLOCK
key 4 3 WAKE UNLOCK
key 5 4 WAKE UNLOCK
key 6 5 WAKE UNLOCK
key 7 6 WAKE UNLOCK
key 8 7 WAKE UNLOCK
key 9 8 WAKE UNLOCK
key 10 9 WAKE UNLOCK
key 11 0 WAKE UNLOCK
key 12 MINUS WAKE UNLOCK
key 13 EQUALS WAKE UNLOCK
key 14 DEL WAKE UNLOCK
key 15 TAB WAKE UNLOCK
key 16 Q WAKE UNLOCK
key 17 W WAKE UNLOCK
key 18 E WAKE UNLOCK
key 19 R WAKE UNLOCK
key 20 T WAKE UNLOCK
key 21 Y WAKE UNLOCK
key 22 U WAKE UNLOCK
key 23 I WAKE UNLOCK
key 24 O WAKE UNLOCK
key 25 P WAKE UNLOCK
key 26 LEFT_BRACKET WAKE UNLOCK
key 27 RIGHT_BRACKET WAKE UNLOCK
key 43 BACKSLASH WAKE UNLOCK
key 58 CAPS_LOCK WAKE UNLOCK
key 30 A WAKE UNLOCK
key 31 S WAKE UNLOCK
key 32 D WAKE UNLOCK
key 33 F WAKE UNLOCK
key 34 G WAKE UNLOCK
key 35 H WAKE UNLOCK
key 36 J WAKE UNLOCK
key 37 K WAKE UNLOCK
key 38 L WAKE UNLOCK
key 39 SEMICOLON WAKE UNLOCK
key 40 APOSTROPHE WAKE UNLOCK
key 28 ENTER WAKE UNLOCK
key 42 SHIFT_LEFT WAKE UNLOCK
key 44 Z WAKE UNLOCK
key 45 X WAKE UNLOCK
key 46 C WAKE UNLOCK
key 47 V WAKE UNLOCK
key 48 B WAKE UNLOCK
key 49 N WAKE UNLOCK
key 50 M WAKE UNLOCK
key 51 COMMA WAKE UNLOCK
key 52 PERIOD WAKE UNLOCK
key 53 SLASH WAKE UNLOCK
key 54 SHIFT_RIGHT WAKE UNLOCK
key 29 CTRL_LEFT WAKE UNLOCK
key 217 SEARCH WAKE UNLOCK
key 57 SPACE WAKE UNLOCK
key 100 ALT_RIGHT WAKE UNLOCK
key 97 CTRL_RIGHT WAKE UNLOCK
key 115 VOLUME_UP WAKE UNLOCK
key 142 SLEEP WAKE UNLOCK
key 105 DPAD_LEFT WAKE UNLOCK
key 103 DPAD_UP WAKE UNLOCK
key 108 DPAD_DOWN WAKE UNLOCK
key 106 DPAD_RIGHT WAKE UNLOCK
key 158 BACK WAKE UNLOCK
key 238 WIRELESS WAKE UNLOCK
key 237 BLUETOOTH WAKE UNLOCK
key 60 TOUCHPAD WAKE UNLOCK
key 224 BRIGHTNESS_DOWN WAKE UNLOCK
key 225 BRIGHTNESS_UP WAKE UNLOCK
key 61 BRIGHTNESS_AUTO WAKE UNLOCK
key 212 CAPTURE WAKE UNLOCK
key 150 EXPLORER WAKE UNLOCK
key 62 SETTINGS WAKE UNLOCK
key 165 MEDIA_PREVIOUS WAKE UNLOCK
key 164 MEDIA_PLAY_PAUSE WAKE UNLOCK
key 163 MEDIA_NEXT WAKE UNLOCK
key 114 VOLUME_DOWN WAKE UNLOCK
key 113 VOLUME_MUTE WAKE UNLOCK
key 172 HOME WAKE UNLOCK
key 139 MENU WAKE UNLOCK
key 104 PAGE_UP WAKE UNLOCK
key 109 PAGE_DOWN WAKE UNLOCK
key 107 MOVE_END WAKE UNLOCK
key 102 MOVE_HOME WAKE UNLOCK
key 86 EUROPE_2 WAKE UNLOCK

As it is just plain text, you can just open it with root explorer, navigate to the file, long press it and select "Open in text editor". Here is when root previlege comes in. You have to mount the filesystem as R/W (the button on the upper left corner in Root-Explorer) before modifying the content of this file, and this requires root.

Now it is straight forward. Just modify the file to reassign the keys. For example, change E to F in order to reassign the physical key "E" to mean "F" to the system. The complete keyboard layout for Colemak is as follows:

key 41 GRAVE WAKE UNLOCK
key 2 1 WAKE UNLOCK
key 3 2 WAKE UNLOCK
key 4 3 WAKE UNLOCK
key 5 4 WAKE UNLOCK
key 6 5 WAKE UNLOCK
key 7 6 WAKE UNLOCK
key 8 7 WAKE UNLOCK
key 9 8 WAKE UNLOCK
key 10 9 WAKE UNLOCK
key 11 0 WAKE UNLOCK
key 12 MINUS WAKE UNLOCK
key 13 EQUALS WAKE UNLOCK
key 14 DEL WAKE UNLOCK
key 15 TAB WAKE UNLOCK
key 16 Q WAKE UNLOCK
key 17 W WAKE UNLOCK
key 18 F WAKE UNLOCK
key 19 P WAKE UNLOCK
key 20 G WAKE UNLOCK
key 21 J WAKE UNLOCK
key 22 L WAKE UNLOCK
key 23 U WAKE UNLOCK
key 24 Y WAKE UNLOCK
key 25 SEMICOLON WAKE UNLOCK
key 26 LEFT_BRACKET WAKE UNLOCK
key 27 RIGHT_BRACKET WAKE UNLOCK
key 43 BACKSLASH WAKE UNLOCK
key 58 CAPS_LOCK WAKE UNLOCK
key 30 A WAKE UNLOCK
key 31 R WAKE UNLOCK
key 32 S WAKE UNLOCK
key 33 T WAKE UNLOCK
key 34 D WAKE UNLOCK
key 35 H WAKE UNLOCK
key 36 N WAKE UNLOCK
key 37 E WAKE UNLOCK
key 38 I WAKE UNLOCK
key 39 O WAKE UNLOCK
key 40 APOSTROPHE WAKE UNLOCK
key 28 ENTER WAKE UNLOCK
key 42 SHIFT_LEFT WAKE UNLOCK
key 44 Z WAKE UNLOCK
key 45 X WAKE UNLOCK
key 46 C WAKE UNLOCK
key 47 V WAKE UNLOCK
key 48 B WAKE UNLOCK
key 49 K WAKE UNLOCK
key 50 M WAKE UNLOCK
key 51 COMMA WAKE UNLOCK
key 52 PERIOD WAKE UNLOCK
key 53 SLASH WAKE UNLOCK
key 54 SHIFT_RIGHT WAKE UNLOCK
key 29 CTRL_LEFT WAKE UNLOCK
key 217 SEARCH WAKE UNLOCK
key 57 SPACE WAKE UNLOCK
key 100 ALT_RIGHT WAKE UNLOCK
key 97 CTRL_RIGHT WAKE UNLOCK
key 115 VOLUME_UP WAKE UNLOCK
key 142 SLEEP WAKE UNLOCK
key 105 DPAD_LEFT WAKE UNLOCK
key 103 DPAD_UP WAKE UNLOCK
key 108 DPAD_DOWN WAKE UNLOCK
key 106 DPAD_RIGHT WAKE UNLOCK
key 158 BACK WAKE UNLOCK
key 238 WIRELESS WAKE UNLOCK
key 237 BLUETOOTH WAKE UNLOCK
key 60 TOUCHPAD WAKE UNLOCK
key 224 BRIGHTNESS_DOWN WAKE UNLOCK
key 225 BRIGHTNESS_UP WAKE UNLOCK
key 61 BRIGHTNESS_AUTO WAKE UNLOCK
key 212 CAPTURE WAKE UNLOCK
key 150 EXPLORER WAKE UNLOCK
key 62 SETTINGS WAKE UNLOCK
key 165 MEDIA_PREVIOUS WAKE UNLOCK
key 164 MEDIA_PLAY_PAUSE WAKE UNLOCK
key 163 MEDIA_NEXT WAKE UNLOCK
key 114 VOLUME_DOWN WAKE UNLOCK
key 113 VOLUME_MUTE WAKE UNLOCK
key 172 HOME WAKE UNLOCK
key 139 MENU WAKE UNLOCK
key 104 PAGE_UP WAKE UNLOCK
key 109 PAGE_DOWN WAKE UNLOCK
key 107 MOVE_END WAKE UNLOCK
key 102 MOVE_HOME WAKE UNLOCK
key 86 EUROPE_2 WAKE UNLOCK

However I wasn't able to remap the Capslock button. It seems that it is hardware-mapped along with the LED. When you have done the modification, save the file and restart the tablet. Now you can enjoy the new keyboard layout, WHEN NOT USING THE ASUS INPUT METHODS.

So, in order to make the Asus input methods play nicely with you new layout, you also have to modify the .kl files in the /system/usr/xt9/keylayout directory. To most users the file of interest is qwerty-en_US.kl, but if you are like me and need to type in another language, remember to change the layout file of you language as well, e.g. qwerty-zh_TW.kl for Taiwanese people. The method is again the same as above. Note that this only reassigns keys on your physical keyboard, not those on the on-screen software keyboard.

About some terminal emulators

I use Better terminal emulator as my daily virtual terminal, and it has an annoying bug. If I start the app when using some input method other than the ASUS English keyboard, it doesn't change back for me, and sometimes there is no keyboard icon in the notification and even the key combination Ctrl+Shift doesn't work. If I just use Ctrl+Space then it will switch to an unknown input method and my modified keyboard layout is not detected. To fix this, simply switch to ASUS English keyboard before opening the terminal emulator (say, opening the google search and choose the input method).

About ESC and BACK

Now if you also use this tablet to SSH into your server to do some maintanence stuff, you will notice that there is one thing missing on the keyboard dock, which is the ESC key. In the place of the ESC, there is the BACK key which will take you out from the terminal you are using, which is quite frustrating especially if you use vi or vim on your server. To fix that, simply change the BACK key to ESCAPE in the asusec.kl file. Now if you still miss a back key which could come in handy when just using the tablet, I would suggest mapping the WIRELESS key to the right to BACK, as I can't really think of a situation where you really need to quickly toggle the Wifi on and off. Most (or all, since I didn't experiment with all the keys) of the shortcut keys can be thus shuffled around.

Remapping Function keys to F1~F12 (Partial Solution)

Sometimes it is desirable to have the usual function keys like F1~F12 handy. The above method can be applied to change the first row to these function keys. Say we can just change BLUETOOTH to F1 in the file asusec.kl. However at most times it is more useful to retain the original behavior of those keys, which is one of the reasons that the keyboard dock is so handy. I found a partial solution to the problem.

After changing, say BLUETOOTH to F1, in order to preserve the BLUETOOTH toggle functionality, we can modify the following file

/system/usr/keychars/asusec.kcm

Again it is a plain text file. The idea is to let the original BLUETOOTH key to act as F1, but Shift+F1 will let us toggle BLUETOOTH as we want. In order to accomplish this, add to the end of the file

key F1 {
shift: fallback BLUETOOTH
}

Ideally this will allow us to access the toggle functionality whenever we press Shift+F1. However this is labelled as a partial solution because this combo only works in an input field, like that of Google search. I'm still investigating how to make it work in general situations and will update any findings here.

OK, that's it. This is my first serious post after a year of silent surfing on the forum. Hopefully this will be useful to some people. If I posted on the wrong section or did anything inappropriate, please tell me immediately as I'm still relatively new to this forum.