Keyman has a long and colourful history of integration with Windows.  Keyman introduced the concept of language switching even before Windows supported multiple languages — way back in 1991.  Because of this long history, and the support we added over this time for Windows 3.1, 95/98/Me, NT4, through 2000, XP, Vista, 7 and now all the way to Windows 8 (let alone the Server varieties!), each operating system with their own nuances and complexities, we have arrived today at the point where there are many different ways in which you, as a user, can chose to integrate a Keyman keyboard with Windows.

The good news is that we do have a preferred model of integration, and it's pretty simple to use.  In this post, I'll take you through the integration steps that we suggest.  You should be reasonably familiar with using Keyman and Windows as I will assume some experience in these areas.

The importance of correct language association

Why is language association important?  Here are 3 reasons:

  • Windows
    uses the selected language to control some aspects of text display
    (rendering), such as text direction (left-to-right or right-to-left), or
    word breaking (e.g. in Thai).  When the wrong language is applied,
    applications such as Microsoft Word can make quite a mess of your text,
    displaying words in the wrong order, or not grouping letters together
    correctly, or even preventing some letters from being typed!

  • Applications that have dictionaries and
    grammar rules apply those rules to the text you type, but only for your
    selected language.  This can help avoid those red squigglies under every
    word you type in Word!

  • When you share your documents
    with other users, the languages your text is tagged with can help their
    computers to select appropriate fonts for display.

The preferred Keyman 8 model

To help this discussion, I am going to be using a (ficticious) Hebrew Keyman keyboard, which we'll call Hebrew_Keyman, created by an equally ficticious keyboard developer named Mike.  Clearly, with this keyboard, we will be wanting to work with the Hebrew language.  Our user, Beth, who is living in France (which is a real country), will be installing the keyboard with Keyman 8.  The same principles apply to any other language you would want to use.

So here goes!

  1. First, Mike, our keyboard developer, follows the recommended model of associating his keyboard with the Hebrew language.  He does this with the &language system store:

      store(&LANGUAGE) 'x040D'

    This mysterious number, 040D in hexadecimal, corresponds to the language code for Hebrew, in Israel, as assigned by Microsoft, many years ago.  Keyman Developer can help make the identification of an appropriate language selection much easier, using the Languages tab in the keyboard wizard.

  2. When Beth downloads the Hebrew_Keyman keyboard and installs it, Keyman automatically detects the language association that Mike selected, above.  Keyman will install the Hebrew language in Windows, along with her default base layout, and associate it with the Keyman
    keyboard.  We'll talk a bit more about default base layout soon.  This installation means that Hebrew appears as an item in the Windows language bar, and also, if available for proofing and editing within Microsoft Office and similar programs.

    Keyman will also monitor this language association, and if it is disrupted, e.g. by accidental changes to the configuration, it will offer to repair the language association.

  3. If Beth had wanted to select a different language association, or if Mike had not included a language code with his keyboard (for example, if he was making a keyboard appropriate for many languages), then Beth can create her own association in the Languages tab of Keyman Configuration.  She would first install the Windows language she wishes to associate, in Windows' Languages Control Panel, and then finding that language in the Languages tab in Keyman Configuration, would select the Hebrew_Keyman keyboard to link to it.

Now, if Beth selects the Hebrew_Keyman keyboard from the Keyman tray icon, or via hotkey, Keyman will switch the Windows language to Hebrew at the same time.  Conversely, if she (or an application) selects the Hebrew Windows language, Keyman will also switch on the Hebrew_Keyman keyboard.  Of course, if she selects another language, Keyman will then switch off the Hebrew_Keyman keyboard.

That's pretty much all there is to it!  Nearly…


Many Keyman keyboards adapt automatically to the user's
preferred base layout, for example moving Q and A around for Latin-based
layouts on English and French systems, respectively.  We call this feature mnemonic layouts.  This means a keyboard developer can create a single layout for Keyman that will work on nearly any Latin-based keyboard without modification — which is a huge bonus, because as a keyboard developer, the task of developing, distributing and supporting 50 different keyboards tailored to the various common layouts is onerous to say the least!

And this is where the concept of base keyboards comes in.  Beth, we learned earlier, lives in France.  This means that she has chosen to use an "AZERTY" layout — where the top alphabetic row of the keyboard has the key caps A,Z,E,R,T,Y,… as opposed to the common English US QWERTY layout.  So her base keyboard is French AZERTY.  Mike's base keyboard happens to be English US QWERTY, but that's all fine: Keyman will sort out the differences.

But what about Ivan from Russia, you say?  How does his Cyrillic base layout map?  Well, it doesn't, actually, map terribly well.  So we made a few compromises.  Keyman actually looks for only Latin-script base layouts.  If the user's default Windows layout is a Latin-script keyboard, Keyman will assume that that's what their hardware keyboard looks like.  Otherwise Keyman, will look for the other Windows keyboard layouts installed, and if it finds no Latin script keyboards, will assume that the best option is English US QWERTY.  This is because English US QWERTY is the de facto standard for the majority of keyboards with both a non-Latin script and a secondary, Latin, script printed on the key caps – including Indian languages, most South-East Asian languages and East Asian languages.

Phew!  Does that all make sense?  Basically at the end of the day, it means the majority of keyboard users don't have to worry about a thing — the keyboard will "just work," even on Windows.

A side note: there are some keyboards for which this semi-magical automatic remapping doesn't make much sense — for example, a Thai typewriter style keyboard.  For these keyboards, the keyboard developer has the ability to mark the keyboard as positional, which means that the keys stay where they are put, thank you very much, no matter what the base layout is.

What if I don't have an x040# code?

For a long time, Keyman users have had a problem: Microsoft had not assigned codes for even a small proportion of the world's languages.  In this situation, we would suggest that users or keyboard developers chose languages that were completely unrelated to the languages they were working with.  A common language choice for African and Asian languages was Icelandic.  There is actually crazy technical reason for this, quite unrelated to the geographic remoteness of Iceland…

With Windows 8, Microsoft now support the ISO639 standard for language codes, which covers the vast majority of the world's languages and provides for extensibility.  Keyman 9 will include full support for this.

Any questions?  Clear as mud?

0 thoughts on “Understanding Keyman 8 and Windows Languages”

Leave a Reply

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

Related Posts

Developing Keyman

Keyman is now free and open source

SIL International is very pleased to announce that Keyman is now completely free and open source! Today, 23 August 2017, we released free versions of the existing Keyman products on the Keyman website, and have Read more…

Using Keyman Desktop

Activation of Keyman Desktop for Network Administrators

This is a quick technical note on different ways to activate Keyman Desktop for system administrators. Activation using a command line tool The simplest way is using the command line for kmshell.exe (located in Program Files Read more…

Developing Keyboards

Introducing the Keyman Open Source Keyboard Repository

We have many hundreds of keyboard layouts online at 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…