[Keyman for Android] How to generate javascript and emulate


I have more questions regarding the Keyman for Android

I’m currently on this tutorial: https://help.keyman.com/DEVELOPER/engine/android/10.0/guides/in-app/ And I’m on step 4. But when my touch layout is ready and I compiled it, the javascript was not made. On the folder there’s only .keyman-touch-layout file generated. How can I generate the javascript for the Android?

And after that, on step 6, after I run the KMSample1 app in the virtual device, there’s no Keyman keyboard installed in the virtual device. How can I arrive at the example in the picture with the Tamil keyboard shown?


Set targets in .KMN file as per https://help.keyman.com/developer/language/reference/targets to make compiled keyboard Javascript file using Keyman Developer compiler.
The Keyman Developer keyboard editor have a GUI to set keyboard targets. Refer: https://help.keyman.com/developer/10.0/context/keyboard-editor .


Thanks. I followed your instruction.

But now it has a lot of warnings: “warning 209A: The rule will never be matched because its key code is never fired.” pops up 45 times (some duplicates), whereas previously (when I only intended for Windows) it didn’t. The rules in question all look OK, and when I compiled the kmn file for WIndows only they were working fine. Please advice how to debug this warnings.


Make sure your project file (kpj) has a buildpath of $PROJECTPATH\build. Then all the compiled files will be in your build folder.

If that’s not the issue, are you getting errors when you compile?


Yes, I have the buildpath correctly


Ok, you have now added in the Web and that doesn’t support nul, notany or if in conjunction with a context statement. I don’t know if you can think of another way to write the output you want without those statements? It may take more rules.


For now I have commented out the ‘nul + any(isNumbers)’ and ‘notany(isNumbers)’ rules to remove the errors

jawa.kmn: Error: line 244  error 4054: Statement nul is not currently supported in CODE_CONTEXT match
jawa.kmn: Error: line 245  error 4054: Statement notany is not currently supported in CODE_CONTEXT match

But the other warnings still persist.


I found the solution from https://stackoverflow.com/questions/51060330/keyman-developer-10-wont-match-rules-in-odia-script

It turns out I cannot have special unicode character in the stores. So now it is compiling.

I’m still stuck on the step 6 though.


@bennylin Try with characters in present rules.

+ "f" > U+0070 U+0068

+ "f" > U+0070 "h"

(both are same)


You can have special Unicode characters in stores. But you need to distinguish stores that contain characters from stores that contain keys.


Good work on finding that solution. Just remember that the key part of the rule is matching a key on the keyboard – and the keys on the keyboard don’t have Unicode values :). It can be helpful to use virtual key identifiers for keys to help keep the distinction, e.g. + [K_A] > ... instead of + 'a' > ....

What trouble are you having with step 6? Can you elaborate?


This part on step 6.


Apologies for the late reply; I have been travelling and just now catching up with my email backlog.

If I understand your issue correctly, you are expecting to see the Tamil keyboard available as a system keyboard on the device.

KMSample1 shows an in-app keyboard only, so you would expect to see the keyboard only in the KMSample1 application. You need to work from KMSample2 for a system-wide keyboard.