Most Keyman Desktop keyboards can be compiled for KeymanWeb without modification. 
However, there are a few platform differences that it is important to be aware of, and a few
differences in the supported Keyman Keyboard Language features between Keyman Desktop
and KeymanWeb.  The table below details the differences.

Feature Keyman Desktop KeymanWeb Notes
Basic features
Mnemonic layouts Supported Limited support Mnemonic layouts are supported in KeymanWeb but only a subset of European keyboards are currently supported. See the notes under ‘Detect system keyboard layout’ for more information.
call statement Windows DLL Javascript function In Keyman Desktop, this calls into a Windows DLL as defined in the referenced store, whereas the KeymanWeb version calls a Javascript function which must be included with the &KMW_EmbedJS system store
notany statement Supported Compile Error This feature may be supported in a future version of KeymanWeb
return statement Supported Compile Error This feature may be supported in a future version of KeymanWeb
nul statement in context Supported Compile error In KeymanWeb, nul would correspond to the beginning of the text field or run of text, rather than an empty context cache. This will be supported in a future version of KeymanWeb
Deadkeys within stores Supported Compile error Deadkeys can be used in Keyman Desktop stores with the index() statement. In KeymanWeb, this produces a compiler error. This may be supported in a future version of KeymanWeb
index and context statements in context Supported Compile error These may be supported in a future version of KeymanWeb
&bitmap system store Supported Ignored
&hotkey system store Supported Ignored
&language system store Supported Ignored
&windowslanguages system store Supported Ignored
KeymanWeb-only features
&KMW_EmbedJS system store Ignored Supported
&KMW_RTL system store Ignored Supported To support right-to-left in a Keyman Desktop keyboard, associate it with a right-to-left locale using the &Language system store
&KMW_Help system store
&KMW_HelpFile system store
Ignored Supported Custom on-screen keyboard help for Keyman Desktop can be implemented with the usage.htm file
Virtual Keys and Modifiers Keys
CAPS, NCAPS modifier states Supported Ignored Ignoring caps lock state may lead to conflicting rules in KeymanWeb when using + [NCAPS K_*] and + [CAPS K_*], so these rules should be prefixed with $KeymanOnly:.
&capsononly, &capsalwaysoff, &shiftfreescaps system stores Supported Ignored KeymanWeb does not modify the action of the Caps Lock key
LALT, RALT, LCTRL, RCTRL modifier states Supported Ignored Rules with these modifier states will never be matched in KeymanWeb: most browsers do not distinguish between left and right ctrl/alt, so KeymanWeb never tries to support them.
Virtual character keys Supported Compile error This feature may be supported in a future version of KeymanWeb
Virtual keys in mnemonic layouts Supported Compile error This feature may be supported in a future version of KeymanWeb
Virtual key output Works, unsupported Compile error Virtual key output works in Keyman Desktop but is not supported by Tavultesoft and is not recommended — it is the wrong way to solve a problem, in the majority of situations. KeymanWeb
does not support virtual key output and there are no plans to support this in the future in KeymanWeb.
Detect system keyboard layout Supported Configurable KeymanWeb cannot reliably determine the system keyboard layout in use in the browser. The basic assumption is a US English keyboard layout, but this
can be overridden by an implementor to specify and alternative layout. If an implementor specifies the system keyboard layout correctly, both mnemonic and
positional layouts will translate correctly.
Legacy features
Codepage-based keyboards Supported Compile Error Non-Unicode keyboards are not supported in KeymanWeb
&OldCharPosMatching system store Legacy Ignored This is a legacy feature for older Keyman Desktop keyboards. Keyboards using this feature should be updated to use Keyman 6 character position matching
switch statement Not supported Compile Error The switch statement is deprecated and no longer works in Keyman Desktop.
fix and clearcontext statements Supported Compile Error Context is always read from the active element with a KeymanWeb keyboard so clearing the cached context is not a logical action. These statements are deprecated.
&layout system store Ignored Ignored This system store is deprecated
Compile targets
Lines with $KeymanOnly: prefix Supported Ignored
Lines with $KeymanWeb: prefix Ignored Supported
Lines with $Keyman: prefix Supported Supported For historical reasons, KeymanWeb keyboards also process $Keyman:-prefixed lines. The $KeymanOnly: prefix is intended to resolve this issue.
Lines with $weaver:, $kmfl: prefixes Ignored Ignored These compile targets are for Mac OS 9 and Linux

KeymanWeb Developer Reference Documentation

Categories: Uncategorized

0 thoughts on “Differences in KeymanWeb and Keyman Desktop keyboard source files”

Leave a Reply

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

Related Posts

Uncategorized

Welcome to blog.keyman.com

As part of the transition to SIL, we’ve moved all the content from blog.tavultesoft.com to this new site, hosted on WordPress.

Uncategorized

Should I upgrade to Keyman Desktop 9.0?

If you currently use Keyman Desktop 6, 7.1 or 8.0, you may have questions about whether you should upgrade to version 9.0 or not. This post outlines the various upgrade paths and provides information on Read more…

Uncategorized

Enable custom fonts in Opera Mini

Configure Opera Mini to make Amharic and other custom text visible.  1) In Opera Mini, visit opera:config by typing it into the URL bar: 2) Find "Use bitmap fonts for complex scripts", set it to Read more…