[Asus Transformer TF700] alienedd:
Edit Aug, 16: I have found out that the XT9 subsystem is used for specifically our docking stations. If you go to Settings -> Languages & Input -> ASUS Keyboard -> About, you'll see the big stupid XT9 icons. Therefore, our keyboards have to be using the XT9 database files and the only way to procure different languages seems to be via ASUS (that's what Nuance's site said anyway). The manipulation of the keyboard dock layout mentioned below seems to be our only way until 1) we procure these additional language files from a different source (might require tweaking), 2) someone with an XT9 license makes the files for us, 3) we find an editor that we can use to create / edit the XT9 files, or 4) we find out how to rework the keyboard framework to use different altogether.

Because of the way our system uses the XT9 subsystem, the JB keyboard update itself won't help us. Officially, it all depends on what ASUS gives us to enable additional langs/layouts for our keyboard docks.

---- Original

All right. Here is what I have collected thus far regarding the way that Androids handle keyboard layouts. I put it here in development as I'm sure only the people in this area would really have an interest/use for it. As I still have yet to satiate my own curiosity and preference for a different keyboard layout, I do hope that somehow someone can figure out how to get us proper alternative keyboard layouts.

----

Our keyboard layouts are spread into 2 separate data form categories: the buttons and the characters. The buttons are the real buttons (physical keyboard or virtual) that have a specific numerical identifier. The characters are the glyphs and their various states that can occur when using character modifier buttons (shift, control, alt, etc) when the associated key number button is pressed.

All of these values are found in "/system/usr" with those found in the "keychars" directory being for the glyphs and the "keylayout" for the arrangement of button number with associate character represented. Both types of files (".kcm" for characters and ".kl" for layours) are really just text documents and seeing the association between the two is easy during comparison:

Example: 'A'

in the "Generic.kcm", it is defined as

key A {
label: 'A'
base: 'a'
shift, capslock: 'A'
ctrl, alt, meta: none
}

while in the "Generic.kl", it is defined as

key 30 A

Therefore, Key 30 is Mapped to Key 'A' that can have the states 'a' or 'A'.

Unfortunately, these two files that constitute a layout are combined in the XT9 subsystem and not totally used "as is". There is a configuration text file for the XT9 database that can be found at "/system/usr/xt9/config/databases.conf" and in there you can see mappings of languages to database files (also note that all are derived from QWERTY format). You'll notice that the databases are of type ".kdb", ".ldb", or ".dat". A quick search on the 'Net will tell you that the ".kdb" is a keepass file and ".ldb" is a Microsoft Access file. These are wrong! I suspect they are both the same file type but I do not know of what type they are so I cannot view nor edit them. I have tried the "suggested" programs and I tried SQLite since that format is used for our "registry". I'm thinking that they might be T9 database files but I haven't found an editor to even verify that hypothesis.

The organization used to create our layouts is highly flexible and therefore really complex. There's some type of combination of format + language that is calculated in order to determine the correct layout to use. No wonder ASUS (and practically everybody else) has limited keyboard layouts. Additionally, this scheme also controls the majority of our hardware keyboard buttons as well.

For the physical keyboard dock, we have direct ways of manipulating the hotkeys or brute-forcing the layout within our grasp. The hotkeys are somehow contained in our "/system/app/keyboard.apk" and for the basic layout, all we really need to do is modify the "asusdec.kl" to shoehorn our preferences into the system.

An example to test if you want a DVORAK keyboard layout is to copy & paste this into the asusdec.kl and restart (back up the file first!) and it should now be in DVORAK format (though it will not be selectable from the menu). Same thing for the "Generic.kl" - edit the chars associated with the key numbers and the buttons will change values. I do not recommend this method as it is hacky/evil/dirty/bad and all sorts of other negative adjectives. However, until a better way is found, it may be our only real way of modding the keyboard the way we want.

I humbly ask if there are any of our beloved geniuses with further knowledge on how this system to please post additional information here in hopes that maybe we may create better keyboard options for our devices.

Thanks for reading

PS: Found out that Jelly Bean will have additional keyboard layouts. From this thread, "Android 4.1 includes 27 international keymaps for keyboards, including Dvorak." That's a good thing.