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: Developing Keyman

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 *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts

Developing Keyman

Keyman 17.0 is now available in beta

We are excited to announce that Keyman 17.0 is officially in beta. You can download Keyman 17.0 beta on Keyman downloads website. You are welcome to send us any feedback for Keyman 17.0 on Keyman Read more…

Developing Keyman

The Keyman Intern Project

Several members of the Keyman team work out of the National Polytechnic Institute of Cambodia (NPIC), វិទ្យាស្ថានជាតិពហុបច្ចេកទេសកម្ពុជា, in Phnom Penh, the capital of Cambodia. One of the things the Keyman team tries to do is Read more…

Developing Keyman

Keyman 16.0 now available!

We are pleased to announce that we have now released Keyman 16.0! You can download Keyman 16.0 on the Keyman downloads website. In version 16.0, we have a few new features, but our focus has Read more…