Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Other versions
Version 18.0Version 17.0 (current version)Version 16.0Version 15.0Version 14.0Version 13.0Version 12.0Version 11.0Version 10.0Version 2.0

On this page

Automatic Linking

This page shows how to include a local keyboard from an arbitrary location in your website's file structure.

In this example, we use only the LaoKey keyboard.

Code Walkthrough

<head>
  <!-- Start of Code -->
  <script src="js/keymanweb.js" type="text/javascript"></script>
  <script>
    window.addEventListener('load', function () {
        kmw.init();

        kmw.addKeyboards({
            id:'laokeys',
            name:'Lao (Phonetic)',
            language:{
                id:'lao',
                name:'Lao'
            },
            filename:'./js/laokeys.js'
        });
    });
  </script>
  <!-- End of Code -->
</head>

As you can see above, the second line in the code snippet above references the LaoKey keyboard loader JavaScript file. This is a small stub file, typically less than 200 bytes, that defines the name and actual location of the real keyboard file (in this case, laokeys.js). When a page may reference many keyboards, this saves downloading potentially hundreds of kilobytes of unused Javascript keyboards - the keyboard is downloaded when it is first selected by the user.

API References

On initialization: tavultesoft.keymanweb.init().

On including keyboards: tavultesoft.keymanweb.addKeyboards().


On to Manual Control Example