KeymanWeb Source Code and Development
KeymanWeb 17.0 is an Open Source input method system for the web, supporting both desktops and touch devices. Keyboard layouts for use with KeymanWeb can be created with the free download Keyman Developer (Windows).
Add KeymanWeb to a Website
KeymanWeb can be added to your website with just a few lines of code. The following example sources both the core engine and two keyboard layouts from the Keyman Cloud CDN; the code can be hosted on your own servers just as easily.
<script src='https://s.keyman.com/kmw/engine/17.0.332/keymanweb.js'></script>
<script src='https://s.keyman.com/kmw/engine/17.0.332/kmwuitoggle.js'></script>
<script>
(function() {
keyman.init({attachType:'auto'});
keyman.addKeyboards('@en'); // Loads default English keyboard from Keyman Cloud (CDN)
keyman.addKeyboards('@th'); // Loads default Thai keyboard from Keyman Cloud (CDN)
})();
</script>
Live Examples
KeymanWeb has multiple user interface designs to fit into any site. The Basic Example above uses the Toggle User Interface for desktop browsers. Mobile browsers all integrate the language selection into the on screen keyboard.
- Learn more about using KeymanWeb in the KeymanWeb documentation
Add custom keyboard to a Website
The following code snippet shows how you can include a custom keyboard on your website. The keyboard .js file can be created with Keyman Developer.
<script>
keyman.addKeyboards({
name: 'Tai Nua',
id: 'tainua',
filename: './tainua.js',
version: '1.0',
language: [{
name: 'Tai Nua',
id: 'tdd',
region: 'as'
}]
});
</script>
Use the Keyman Cloud CDN
The Keyman Cloud CDN is appropriate for smaller sites.
Endpoint: |
- Keyman Cloud CDN Keyboard Catalogue
- How to: retrieve the latest version of KeymanWeb from Keyman Cloud CDN
- Using older versions of KeymanWeb
Get the code + Contribute
There are additional samples in the code repository. We prefer git pull requests for code submissions.
- KeymanWeb on GitHub
- Download KeymanWeb releases (alpha, beta and stable)
License
KeymanWeb is distributed under the MIT license.