For those of you with a web programming bent, the following may be of interest.  We now have 2 APIs available for accessing the Keyman Desktop and KeymanWeb keyboard catalogues.  Both APIs are RESTful and return UTF-8 JSON format data only in their initial incarnation.

Updated 25 Jun 2012: Please note the minor changes to the format returned from the V1.0 API below.

KeymanWeb Keyboards

This would provide links to web-based keyboards that allow you to type the language directly into a field in the browser without any need to install any software, hosted on our site www.keymanweb.com.  The KeymanWeb API is documented at http://help.keymanweb.com/dev/webapi.php.  The only other piece you need for this puzzle is the link to the live KeymanWeb keyboard, which can be generated using the language id and the keyboard id as follows:
    http://www.keymanweb.com/go/language/keyboard/notepad

So example, to link to the Egyptian Hieroglyphic keyboard, you would link to
    http://www.keymanweb.com/go/egy/hieroglyphic/notepad

Keyman Desktop Keyboards

This API is similar to the KeymanWeb API.  Basically, you can access the full list of keyboards, grouped by language, by calling the following URI:
    http://www.tavultesoft.com/api/1.0/languages

Updated 25 Jun 2012: The API has had a minor update: keyboard values are now normalised to reduce the size of the response.  This minor change was made because the API was still fresh and we wanted to fix this before it became ingrained; don't worry, we won't be fiddling with the structure in breaking ways like this in the future!  We also added the description member to keyboard data (this, however, is a non-breaking change).

The response for the query for all language information will be similar to the following:

{
"languages":[
  {
   "name":"Lao",
   "id":"lao",
   "country":"LA",
   "uri":"http://keymankeyboards.com/?q=l:iso:lao",
   "keyboards":[443,472,442,431,315,304]
  },
  …
],
"keyboards":[
      {
         "name":"Lao 2008",
         "id":443,
         "uri":"http://keymankeyboards.com/443",
         "version":"1.0.2",
         "lastModified":"2009-06-22 17:12:38.083",
         "description":"a keyboard description …"
      },
      {
         "name":"Lao Basic",
         "id":472,
         "uri":"http://keymankeyboards.com/472",
         "version":"1.0",
         "lastModified":"2009-05-15 16:18:56.430",
         "description":"a keyboard description …"
      },
      {
         "name":"Lao Script for Windows",
         "id":442,
         "uri":"http://keymankeyboards.com/442",
         "version":"",
         "lastModified":"2008-08-29 15:45:12.597",
         "description":"a keyboard description …"
      },
      {
         "name":"Lao Unicode on Thai Keyboard layout",
         "id":431,
         "uri":"http://keymankeyboards.com/431",
         "version":"1.1",
         "lastModified":"2008-03-24 21:17:19.230",
         "description":"a keyboard description …"
      },
      {
         "name":"Enhanced Lao (non-Unicode)",
         "id":315,
         "uri":"http://keymankeyboards.com/315",
         "version":"1.1",
         "lastModified":"2012-02-07 10:43:41.633",
         "description":"a keyboard description …"
      },
      {
         "name":"Simple Lao (non-Unicode)",
         "id":304,
         "uri":"http://keymankeyboards.com/304",
         "version":"1.0",
         "lastModified":"2009-05-15 16:53:21.010",
         "description":"a keyboard description …"
      },
      …
 ]}

Updated 25 Jun 2012: You can retrieve a single language record by appending the language code, e.g. http://www.tavultesoft.com/api/1.0/languages/lao.  When a single language is queried in this way, the return value folds the keyboards array in as per the example below for Lao.

{
   "name":"Lao",
   "id":"lao",
   "country":"LA",
   "uri":"http://keymankeyboards.com/?q=l:iso:lao",
   "keyboards":[
      {
         "name":"Lao 2008",
         "id":443,
         "uri":"http://keymankeyboards.com/443",
         "version":"1.0.2",
         "lastModified":"2009-06-22 17:12:38.083"
      },
      {
         "name":"Lao Basic",
         "id":472,
         "uri":"http://keymankeyboards.com/472",
         "version":"1.0",
         "lastModified":"2009-05-15 16:18:56.430"
      },
      {
         "name":"Lao Script for Windows",
         "id":442,
         "uri":"http://keymankeyboards.com/442",
         "version":"",
         "lastModified":"2008-08-29 15:45:12.597"
      },
      {
         "name":"Lao Unicode on Thai Keyboard layout",
         "id":431,
         "uri":"http://keymankeyboards.com/431",
         "version":"1.1",
         "lastModified":"2008-03-24 21:17:19.230"
      },
      {
         "name":"Enhanced Lao (non-Unicode)",
         "id":315,
         "uri":"http://keymankeyboards.com/315",
         "version":"1.1",
         "lastModified":"2012-02-07 10:43:41.633"
      },
      {
         "name":"Simple Lao (non-Unicode)",
         "id":304,
         "uri":"http://keymankeyboards.com/304",
         "version":"1.0",
         "lastModified":"2009-05-15 16:53:21.010"
      }
   ]
}


0 thoughts on “Programmatic access to Tavultesoft’s keyboard catalogue”

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Developing Keyboards

Introducing the Keyman Open Source Keyboard Repository

We have many hundreds of keyboard layouts online at keyman.com that cover well over a thousand  languages. These keyboard layouts work on Windows, the web, iPhones, iPads and Android phones and tablets. However, most of Read more…

Android

Using Keyman Engine for Android to create a system keyboard

In part 1 of this series, we looked at the steps involved in creating a basic Android app which included a Keyman in-app keyboard. In this post, we’ll work with the second sample included in Read more…

Developing Keyboards

Using Keyman Engine for Android to create a custom keyboard app

Note: You must have a license for Keyman Engine for Android in order to access the resources documented in this blog. (Purchase a license) Keyman Engine for Android allows you to use any Keyman touch Read more…