Installing Keyman Mobile Apps through web server

Hello. This might sound stupid but since I am not a programmer, I will ask anyway.
I am working with creating keyboard for mobile apps. I put my .json and .js files on the web server.
When I ran my URL, it asked me if I wanted to download the custom keyboard. When I said yes, a screen pop-up saying “downloading”. But after the downloading screen disappeared, none is happening. The keyboard is not installed. I tried to recheck everything but could not find any problem. It works fine if I installed it directly using my machine as the server.
Could you please advise? I can attach the files, unfortunately I cannot find any option to do it here. Thank you.

More info.
When I tried it on Android phone, it didn’t provide any message.
When I tried it on iPhone, I received the following message: Keyboard Download Error, Failed to fetch JSON file.
Thank you.

Here is my json file:

“options” : {
“device” : “any”,
“keyboardBaseUri” : “”,
“fontBaseUri” : “
“keyboard” : {
“id” : “burkina_azerty_clavier”,
“name” : “Burkina AZERTY Clavier”,
“filename” : “burkina_azerty_clavier-1.0.js”,
“version” : “1.0”,
“lastModified” : “2017-06-19T11:41:09.734Z”,
“languages” : [
“id” : “bfb”,
“name” : “Burkina Faso”

And here is the URL I used:

- Install Burkina AZERTY Clavier

I’ve investigated this, and had to dig a bit.

It looks like your host is doing some nasty things. If you try and retrieve the file (e.g. using curl or wget command line app), you will instead be presented with a web page that includes a snippet of javascript that redirects to the file. It seems to do this after setting a cookie. This is not something we can support: we require the .json file to be served from the host unmodified. This may be something you can configure on the web host?

(Note: this page below is what the server is returning, instead of the .JSON file):

<html><body><script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("8cc302d2464b5bfb799cbf8de5ca103f");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/"; location.href="";</script><noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript></body></html>````

Hi. I’m having a similar problem – when attempting to download a keyboard I created to my Android phone, I get a “keyboard download failed” message. A server I had tried previously had automatically changed the keyman://localhost/open?url= line into javascript (0) , maybe as some sort of security measure when dealing with a .json file. Fortunately the server I’m currently using isn’t corrupting the file, but the Android device tries and fails to download. I uninstalled and reinstalled Keyman on it tonight, so that’s up to date.

Any suggestions would be appreciated! Thanks,

Hi @Craig

Instead of trying to install your keyboard via JSON file, you may find it simpler to use the Keyman 10.0 beta products (Keyman Developer 10 and Keyman for Android 10.0. Both are available at:

  1. From Keyman Developer, create a keyboard package and include your touch layout keyboard in the package. Here’s a tutorial on creating a keyboard package.

  2. Once you’ve created a keyboard package (single .kmp file), you have several options installing it on your Android phone. (See

    • Host the .kmp file on a website and download on your phone
    • Copy the .kmp file to an SD card, browse on the phone and install.

Opening the .kmp file on the Android phone should trigger Keyman to install the keyboard.

Thanks @darcy_wong

I’ll give this a try and report back how it goes!

Hi @darcy_wong,

I’ve installed Developer 10 beta, but I get error messages when opening my project that did not occur using version 9.

  1. When trying to see the Touch Layout, Design instead of Code tab, I get this message:
Expected '}'

The string after kmn varies from one attempt to another. I’ve copied the code to a text editor and all the curly braces have unique matches (as do all the [ ] for that matter). The only possible mismatch would be for the { and } keys themselves, but that code was in the template. There’s nothing odd about line 429, as far as I can tell.

  1. If I hit ok on that message, another appears:
'KVKL' is undefined

If I click ok on this message, it goes away, though I can then only access the Code tab

  1. If I try to see the Layout, Design tab, another new error pops up:
    The Design tab is disabled because the keyboard file is too complex to represent and modify visually. You must make any further changes to the keyboard directly in the Code tab.
    I haven’t made any changes to the layout, and version 9 had no issues with the Layout, Design tab

  2. If I try to compile anyway, it succeeds without an error message. However, if I then test the result, some of the keys no longer work properly, as they did in 9. Specifically, long press on shifted keys will show the appropriate popups, but the popup characters cannot be selected. They are not greyed out, but selecting them has no effect

I’m not sure where to go from here…

Hmm, that will be difficult to troubleshoot over a forum. I’ve send you a PM about emailing me your keyboard source files

Thanks to @darcy_wong, everything is working fine now. To help future search results, here are the solutions, in addition to switching to version 10 of both Keyman Developer and Keyman for Android:

  1. the Expected '}' error was due to a missing trailing comma between an instance of “layer” and following “sk” (for longpress)

  2. the 'KVKL' is undefined error disappeared with the preceding fix

  3. longpress on shifted keys displaying but not typing was fixed by adding [SHIFT ...] in the layout for those longpresses

  4. an extraneous space appearing after characters with both a combining ogonek 0328 and combining acute 0301 also existed in the Layout, and was deleted


1 Like