[Howto] Change the dock keyboard layout

Search This thread

fizban007

Member
Jan 29, 2009
8
25
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
Code:
/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
Code:
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:
Code:
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
Code:
/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
Code:
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.
 
Last edited by a moderator:

SplasPood

Member
Nov 1, 2008
25
0
Thanks!

For your first post it was a great one. Specifically remapping the Back key to escape is something I've wanted to do since the moment the dock arrived. Thanks again.
 

gwai_jai

Member
May 20, 2009
11
0
is there any way to map the F1-F12 keys onto the keyboard effectively replacing the Function keys(wireless, bluetooth, etc) as i really need it for work
 

axe2

Senior Member
Dec 15, 2009
104
6
Tucson, AZ
What problem did you encounter remapping the caps-lock key? I remap caps-lock to left-control, and it works great. I also remap back to escape and left-control to back. I don't use caps-lock, so I do not have that mapped to any key at the moment.

I've been doing this for a while, and the most anoying thing is that it gets reset when a new ROM is installed. Keep a backup somewhere of the modified file so you don't have to re-edit it again...

Sent from my Transformer TF101 using Tapatalk
 

rilot

Senior Member
Sep 10, 2005
379
44
Thanks for this post. Very useful.

Is there a way to get a DELETE key rather than a BACKSPACE key? This would be most useful.
 

fizban007

Member
Jan 29, 2009
8
25
is there any way to map the F1-F12 keys onto the keyboard effectively replacing the Function keys(wireless, bluetooth, etc) as i really need it for work

Remapping the function keys(wireless, etc.) is not a problem. You can just use the aforementioned method and change, say, BLUETOOTH to F1. However it is more desirable to retain the functionality of those keys as in the android environment. I've currently experimenting, and found a partial solution, which I included in the original post. Hope it helps you.
 

rilot

Senior Member
Sep 10, 2005
379
44
It does in some things but doesn't in my terminal emulator. The soft keyboard Thumb Keyboard works fine though. Hmm.
 

fizban007

Member
Jan 29, 2009
8
25
It does in some things but doesn't in my terminal emulator. The soft keyboard Thumb Keyboard works fine though. Hmm.
Oh if you are using Bash in your terminal emulator then Ctrl+D will act as delete forward. No need for a dedicated delete key. Which terminal emulator are you using?
 

gwai_jai

Member
May 20, 2009
11
0
Remapping the function keys(wireless, etc.) is not a problem. You can just use the aforementioned method and change, say, BLUETOOTH to F1. However it is more desirable to retain the functionality of those keys as in the android environment. I've currently experimenting, and found a partial solution, which I included in the original post. Hope it helps you.

Thanks!! this is great!....but please tell us if you found a complete solution as well! :)
 

CelticWebSolutions

Senior Member
May 25, 2011
855
2,012
Im a UK user with the gb layout. I use thumb keyboard for onscreen as i find it easier to use. Problem is when you dock the keyboard you get a warning on screen and when you us ethe keyboard the " and @ are swapped around. Where can I change these? I can't seem to see them at all.

It woudl also be great if it was possible to disable teh keyboard compatibility warning.
 

a042349

Senior Member
Feb 9, 2006
220
14
Great find - I love XDA for these kind of tweaks (and full nlown ROMs of course.

I never used the search function, nut use the back function all the time so I swapped them. Now my "back" button is down where my hands ususally are and my search key is off in no man's land.

Gousee the only down sides is if any tricky hacker or legitimate key combos some along I'll have to push MY right ones not theirs.
'
Cheers to the OP for this coool, quick hack.

-JS
 

jerrymouse12

Senior Member
Jul 30, 2010
76
11
Aswome find. I was finally able to change annoying QWERTZ on czech keyboard to QWERTY :) Thanks!
 

Backwardsblade

Senior Member
Nov 27, 2009
304
34
Philadelphia, PA
I apologize if this has been addressed previously, is there an option to quickly access the task/program switcher from keyboard? I often use the TF in class and I can rely on the keyboard for most everything else but I have to use the screen for that function. Anyone find any workarounds with the keyboard?
 

MasterfullDON

Senior Member
Jun 15, 2011
126
8
has anyone tried different layouts with different apps, I.E Email launch on one of the buttons as oppose to the stock programmed?

Then the second question I have is can you program the keyboard's shift functions? so change the @ on the 2 with ," ??
 

CelticWebSolutions

Senior Member
May 25, 2011
855
2,012
has anyone tried different layouts with different apps, I.E Email launch on one of the buttons as oppose to the stock programmed?

Then the second question I have is can you program the keyboard's shift functions? so change the @ on the 2 with ," ??

I already asked about changing places of @ and " but got no answers :( it would be really useful if i culd becaus ei use a different on screen keyboar and it messes up some of teh Shift + keys
 

goorpy

Member
Jun 17, 2009
48
1
Toronto
I apologize if this has been addressed previously, is there an option to quickly access the task/program switcher from keyboard? I often use the TF in class and I can rely on the keyboard for most everything else but I have to use the screen for that function. Anyone find any workarounds with the keyboard?

I came to ask the exact same question. I find that the one function the dock keyboard is really missing for my needs. Yet it has a key for screenshot...

Is there a keyword for task switcher that we can use in this mapping file?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 24
    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
    Code:
    /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
    Code:
    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:
    Code:
    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
    Code:
    /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
    Code:
    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.
    4
    Easy solution for fixing UK layout

    So I see that some of you have been trying to fix the issues with the @ and ", etc getting swapped around when set to the default android keyboard. One option to fix this is to edit the asusec.kcm file in /system/usr/keychars. This will do the job, but there are quite a few keys that need editing to get everything where it should be.

    A much, much easier solution is to simply do the following:
    1. copy the qwerty-en_GB.kcm file from /system/usr/xt9/keychars,
    2. paste it into /system/usr/keychars
    3. rename asusec.kcm to asusec.kcm.bak
    4. rename the qwerty-en_GB.kcm that you just pasted to asusec.kcm
    5. Remove the transformer from the dock
    6. Shut down
    7. Power back on
    8. Replace the tablet in the dock

    You should now find that all keys are correctly mapped to the UK layout :)

    I assume this will work for any language, but it is only UK English that I have tested.

    ---------- Post added at 09:36 PM ---------- Previous post was at 09:31 PM ----------

    A few people were asking if it is possible to map the app switcher to a key. Whilst not an exact solution, I did notice that using Alt+Tab will switch between apps, just as it does on a windows PC.

    I should state that I am not using the stock ROM, so it is possible that this is an extra function of my custom ROM, but I doubt it. I have also re-mapped my Alt key to ALT_LEFT (by default it is ALT_RIGHT. This may or may not make a difference. Somebody with a stock ROM will have to test.

    Hope this helps somebody
    3
    Great function key layout + dual Qwerty/Dvorak layout

    Hey everyone,
    After lots of fiddling I've got a great keyboard layout I wanted to share.
    1. First thing is I hacked browser button to go to my preferred browser using instructions on this post: http://xdaforums.com/showthread.php?t=1497624
    2. Second I modified asusdec.kl and asusdec.kcm to achieve following keyboard layout.
    (red buttons are active when CAPSLOCK is on, red buttons with an arrow next to them are CAPSLOCK on + Shift key pressed)
    (search icon in green is: ALT+SPACE)
    (Letters in Blue correspond to Dvorak layout and are active when SCRL_LCK button is on)


    Attached are the .kl and .kcm files zipped. You can use the instructions on first page of this post to install them.
    2
    Hi guys, i made an application for doing that more faster : http://xdaforums.com/showthread.php?t=1607148
    2
    Awesome post bytheway. This is a great tool right here.

    One thing that i just noticed about the docks keyboard. Some of the keys (mainly the forward slash and backslash) are different sizes than the other keys. This will cause problems with other layouts, such as Dvorak (forward slash is replaced by Z and left bracket is replaced by forward slash).

    No way around it, unless you wanna make custom keys or just make your own version of the layout. I'm making mine into Dvorak, but leaving the forward slash where its at and replacing left bracket with z. it's going to take some getting used to, but how often does one use Z anyway?

    Anyway, just thought i would point that out to you guys. Again, thanks for the info on switching the layouts!

    EDIT: Here is my version of the dvorak layout for the TF101 dock

    The forward slash and the Z keys are the only ones out of place, due to the different sizes of the keys.

    Code:
    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    LEFT_BRACKET            WAKE UNLOCK
    key 13    RIGHT_BRACKET           WAKE UNLOCK
    key 14    DEL                     WAKE UNLOCK
    key 15    TAB                     WAKE UNLOCK
    key 16    APOSTROPHE              WAKE UNLOCK
    key 17    COMMA                   WAKE UNLOCK
    key 18    PERIOD                  WAKE UNLOCK
    key 19    P                       WAKE UNLOCK
    key 20    Y                       WAKE UNLOCK
    key 21    F                       WAKE UNLOCK
    key 22    G                       WAKE UNLOCK
    key 23    C                       WAKE UNLOCK
    key 24    R                       WAKE UNLOCK
    key 25    L                       WAKE UNLOCK
    key 26    Z                       WAKE UNLOCK
    key 27    EQUALS                  WAKE UNLOCK
    key 43    BACKSLASH               WAKE UNLOCK
    key 58    CAPS_LOCK               WAKE UNLOCK
    key 30    A                       WAKE UNLOCK
    key 31    O                       WAKE UNLOCK
    key 32    E                       WAKE UNLOCK
    key 33    U                       WAKE UNLOCK
    key 34    I                       WAKE UNLOCK
    key 35    D                       WAKE UNLOCK
    key 36    H                       WAKE UNLOCK
    key 37    T                       WAKE UNLOCK
    key 38    N                       WAKE UNLOCK
    key 39    S                       WAKE UNLOCK
    key 40    MINUS                   WAKE UNLOCK
    key 28    ENTER                   WAKE UNLOCK
    key 42    SHIFT_LEFT              WAKE UNLOCK
    key 44    SEMICOLON               WAKE UNLOCK
    key 45    Q                       WAKE UNLOCK
    key 46    J                       WAKE UNLOCK
    key 47    K                       WAKE UNLOCK
    key 48    X                       WAKE UNLOCK
    key 49    B                       WAKE UNLOCK
    key 50    M                       WAKE UNLOCK
    key 51    W                       WAKE UNLOCK
    key 52    V                       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