Microsoft Keyboard Layout Creator

Microsoft Keyboard Layout Creator (MSKLC)

The Microsoft Keyboard Layout Creator enables the creation of keyboard layouts for Windows NT4.0, Windows 2000 and Windows XP 32-bit systems. The tool will allow you to:

  • Create new keyboard layouts from scratch
  • Base a new layout on an existing one
  • Modify an existing layout ".KLC" file and build a new layout from it
  • Test the new layout without having to build and install it
  • Compile the new layout into a Windows Installer package for deployment and installation to your machine or someone else's.

For more information on how to use Microsoft Keyboard Layout Creator, see the Getting Started section.


About

About Microsoft Keyboard Layout Creator

Microsoft Keyboard Layout Creator Version 1.4

Copyright © 2002-2007 Microsoft Corporation. All rights reserved.


Limitations on Various Platforms

There are various limitations on the Microsoft Keyboard Layout Creator. These limitations are enumerated here.

Windows 95, 98, Me

  • Microsoft Keyboard Layout Creator is not supported.
  • Created keyboards cannot be installed.

Windows NT 3.1, 3.5, 3.51

  • Microsoft Keyboard Layout Creator is not supported.
  • Created keyboards cannot be installed.

Windows NT 4.0

  • Microsoft Keyboard Layout Creator is not supported.
  • You can install keyboard layouts for languages other than those supported by the operating system. However, each keyboard layout must be associated with one of the locales supported by the operating system.
  • Complex script support (for e.g., Arabic and Hebrew) will only be available in most applications on complex-script enabled versions of Windows NT 4.0.

Windows 2000

  • The list of existing keyboards (i.e. those installed as part of the operating system) is smaller than the list of keyboards installed by Windows XP/Windows Server 2003.
  • You can install keyboard layouts for languages other than those supported by the operating system. However, each keyboard layout must be associated with one of the locales supported by the operating system.
  • Rendering support is limited to the version of Uniscribe that is installed.

Windows XP

  • The control panel applet that supports the installation of keyboards is limited to locales that the system supports. You will still be able to install keyboard layouts that support other languages, but you will have to list them under languages that the system supports.
  • You can install keyboard layouts for languages other than those supported by the operating system. However, each keyboard layout must be associated with one of the locales supported by the operating system.
  • Rendering support is limited to the version of Uniscribe that is installed.

Windows Server 2003

  • You can install keyboard layouts for languages other than those supported by the operating system. However, each keyboard layout must be associated with one of the locales supported by the operating system.
  • Rendering support is limited to the version of Uniscribe that is installed.

Windows Vista

  • You can install keyboard layouts for languages based on custom locales that have been installed on the authoring Vista system. The install that MSKLC creates will still support the locale name even if it is not one of the locales supported by the operating system.
  • Rendering support is limited to the version of Uniscribe that is installed.


Glossary

  • 101 key keyboard layout - Keyboards in the US and some other locations have 101 keys on them. The scan codes for this layout are slightly different than the 102 key keyboard layout, and a key is missing.

  • 102 key keyboard layout - Keyboards in Europe and some other locations have 102 keys on them. The scan codes for this layout are slightly different than the 101 key keyboard layout, and an extra key is present next to the left shift key.

  • Alt - The shift state invoked when an ALT key is pressed simultaneously with another key. You cannot assign code points to such a keystroke combination.

  • ALT - The key on the keyboard located on either side of the space bar.

  • AltGr - The Alt key on the right side of the keyboard (to the right of the space bar). The term "AltGr" comes from "Alt Graphic". The behavior of the AltGr key is always identical to pressing the Control + Alt key simultaneously.

  • AltGrCapsLock - This setting is analogous to CapsLock for the AltGr and AltGr+Shift shift states. It is used to determine whether AltGr+CapsLock is equal to AltGr+Shift.

  • AutoCaps - When the AutoCaps setting is enabled, the Microsoft Keyboard Layout Creator will automatically determine the CapsLock and AltGrCapsLock values, based on whether the unshifted and shifted characters are cased variants of each other. The setting is enabled by default, and can be found in the Options dialog, under View|Options.

  • base character - A term used with dead keys. The base character is the key typed after the dead key; the combination of the dead key and the base character outputs a composite character. A keyboard must designate which base characters go with a dead key, and what the output (composite character) should be.

  • CapsLock - This setting is used to determine whether the unshifted character+CAPS LOCK key is equal to the shifted character. Often, the shifted and unshifted characters on a key will be cased variants of each other, but this is not required. The CapsLock setting can be found in the Keystroke Information Dialog.

  • code point - A numerical reference within an encoding. In Windows, this generally refers to the Unicode numerical value of a character. Microsoft Keyboard Layout Creator can accept Unicode code points as "U+####" or "\x####" values.

  • complex scripts - scripts that require special processing to display and edit because the characters, or glyphs, are not laid out in a simple way. Examples of complex scripts include Thai, Arabic, and Tamil.

  • composite character - A term used with dead keys. The composite character is the character which is output from the combination of a dead key and a base character.

  • Ctrl - The shift state invoked when a CTRL key is pressed simultaneously with another key. It is not usually recommended (for more information, see Avoiding the Ctrl Shift State).

  • CTRL - The abbreviation for the control key. The exact placemenf of thie key varies, but is usually located to the left of the left ALT key, and to the right of the right ALT key when two CTRL keys are present.

  • DDK - The abbreviation for the Microsoft Device Driver Kit, recently renamed to WDK (Windows Driver Kit). The WDK is available at http://msdn2.microsoft.com/en-us/library/aa972908.aspx.

  • deadkey, dead key - A mechanism where two consecutive keystrokes are mapped to a single UTF-16 code point. It can be useful when you need to use a diacritic combined with different characters. It is used traditionally on many European keyboards. The origin of the term "dead" is based on the fact that when the first keystroke is typed, no glyph is produced; it is only when the next character is typed that any text is displayed.

  • European keyboard - Generally, European style keyboards contain a slightly different key physical key layout, different scan codes, and a differently shaped RETURN/ENTER key.

  • fallback fonts - Fonts that are used by the operating system to obtain glyphs when the originally chosen font does not contain these glyphs. The technologies used by Microsoft Keyboard Layout Creator to obtain fallback information are Uniscribe and GDI+.

  • font linking - Technology used to display correct glyphs for a code point. Font linking brings together a number of fonts, such that if the language is not supported in the current font, it will be displayable from other fallback fonts. The glyph is displayed seamlessly, without input from the user. You can sometimes obtain superior visual results by selecting your own preferred font from the View|Font... menu item. This feature is used only for display in Microsoft Keyboard Layout Creator and has no effect on the generated keyboard.

  • GDI - An acronym for Graphics Device Interface, a set of APIs that allow for display and rendering.

  • GDI+ - A managed successor to GDI that is used by Microsoft Keyboard Layout Creator

  • Input Language - The term used to identify the language of a keyboard on Windows.

  • keyboard layout - defines the mapping between scan codes, virtual keys, and code points that are produced when a key is typed. The content of a keyboard layout will often vary depending on language and region.

  • keystroke - The event caused by pressing a single key on a keyboard.

  • LANGID - Short for Language ID. A LANGID is a 16 bit value which is the combination of a primary and secondary language ID. For more information, see the MAKELANGID topic in MSDN.

  • LCID - Short for locale identifier. A locale identifier includes a language identifier, a sort identifer, and a reserved range. For more information, see the Locale Identifier topic in MSDN.

  • ligature - In keyboard terms, a combination of more than one UTF-16 code point for a single keystroke. This is generally used when you want to input multiple code points with a single keystroke. Ligatures are added to keystrokes in Microsoft Keyboard Layout Creator in the same manner as single code points.

  • LRM - Left to right marker. Used in bidirectional text to alter the behavior of the Unicode Bidi Algorithm (described in Unicode's UAX #9) by forcing a section of text to be treated as left-to-right when it may have been treated as right-to-left.

  • MSI - The extension of Windows Installer files. Windows Installer is used to package keyboards created with Microsoft Keyboard Layout Creator so that they can be installed.

  • MSKLC - Acronym for Microsoft Keyboard Layout Creator

  • Regional and Language Options - The applet in the Windows Control Panel through which a user can change their keyboard settings (as well as many other unrelated settings). In versions of Windows prior to XP, this applet has had other names, such as "Regional Options" and "Regional Settings".

  • RLM - Right to left marker. Used in bidirectional text to alter the behavior of the Unicode Bidi Algorithm (described in Unicode's UAX #9) by forcing a section of text to be treated as right-to-left when it may have been treated as left-to-right.

  • scan code - The numeric value given to each physical key on a keyboard; the scan code is a hardware-dependent number that identifies the key. Scan codes have a fixed position on the physical keyboard. Changing them is not recommended (for more information, see Changing Scan Codes).

  • SGCaps - A mechanism used to extend a keyboard layout by treating the CAPS LOCK key as if it were a separate shift state. For more information, see When to Use SGCaps.

  • Shift The shift state invoked when a shift key is pressed simultaneously with another key. When a keyboard layout is designed for a script that has case, it is common for the Shift state to contain capitalized variants of the letters found in the unshifted state.

  • SHIFT - The name of the shift key(s) on a keyboard layout. The shift keys are usually located on the left and right side of the layout, one row above the spacebar,

  • shift state - A means of extending the keyboard beyond the 40+ physical keys on a keyboard. Microsoft Keyboard Layout Creator supports defining up to seven of these shift states (Shift, AltGr, Shift+AltGr, Ctrl, Shift+Ctrl, SGCaps, and Shift+SGCaps). It is however recommended to use as few shift states as possible to minimize user confusion.

  • supplementary characters - A Unicode character not on the Basic Multilingual Plane. These characters are in the range U+10000 - U+10FFFF.

  • surrogate characters - An inappropiate term intended to mean supplementary characters.

  • surrogate codepoints - A Unicode code point in the range U+D800 through U+DFFF. Reserved for use by UTF-16

  • surrogate pair - a pair of surrogate code units (a high surrogate followed by a low surrogate) "stands in" for a supplementary code point in UTF-16.

  • Unicode - provides a unique number for every character, no matter what the platform, no matter what the program, no matter what the language. For more information, see the Unicode website (http://unicode.org/).

  • Uniscribe - A technology that defines is a set of APIs that allow a fine degree of control for processing complex scripts.

  • UTF-16 - An abbreviation for Unicode Transformation Format 16 bit encoding form. This is the encoding form of Unicode primarily used on Windows. A key on a Windows keyboard layout can maximally contain four UTF-16 code points.

  • virtual key - the code that is given by the Windows USER subsystem to represent a keystroke. It is mapped from a scan code by using the keyboard layout definition.

  • VK - An abbreviation for virtual key.

  • VK_* - Constants in the Platform SDK header files to represent virtual keys (e.g., VK_D for the D key, VK_A for the A key, etc.

  • VK_MENU - The Platform SDK virtual key constant that represents the ALT key. The origin of this term is the fact that the ALT key is primarily used for menu accelerators. For more information, see ALT.

  • VK_RETURN - The Platform SDK virtual key constant for the return key.


Microsoft Keyboard Layout Creator Dialog Reference

This section contains reference material for all the dialogs in Microsoft Keyboard Layout Creator.

The Main Microsoft Keyboard Creator Dialog

Load an Existing Keyboard Layout Dialog

Keystroke Information Dialogs

Testing Keyboard Layouts Dialog

Dead Key Entry Dialog

Properties Dialog

Options Dialog


The Main Microsoft Keyboard Layout Creator Dialog

The main dialog is the place where you will likely spend the bulk of your keyboard layout development time. This help topic will highlight some of the key features of this very important dialog.

Figure 1

The left side panel of the main dialog (Figure 1) makes it easy to toggle between different shift states of the keyboard layout, allowing you to choose which shift state to display.You can also check to see what happens on the keyboard when the CAPS LOCK button is clicked by checking the 'Show the Caps Lock' checkbox.

The legend at the bottom of the main dialog explains the various colors of the keyboard layout's buttons. You can optionally change the colors if your machine's color settings make the buttons hard to distinguish from one another.

Figure 2

Figure 3

The right click menu (Figure 2) allows you to:

  • Change the font for an individual keystroke. (You can change the font for all keystrokes by selecting 'Font...' from the View menu).
  • View and modify the properties for a key stroke in all shift states (this will invoke one of the Keystroke Information Dialogs)
  • View and modify the keys in a single shift state (Figure 3). (You can also move from the dialog to the larger dialog by clicking the Full button.)
  • Set the keystroke as a dead key, once you have assigned a character to the key in the selected shift state. Selecting this option will invoke the Dead Key Entry Dialog. (You can also reach this dialog from the Keystroke Information Dialog mentioned earlier.)

Figure 4

Note that this dialog also supports tooltips, displaying the Unicode code points and names for the character on the given keystroke (Figure 4).

Towards the bottom of the dialog is information about two important items, shown in Figure 5.

  • Current working directory - This setting displays the directory used for opening/saving keyboard source files, saving images of the current keyboard shift state, and building Windows Installer packages. You cannot edit the directory directly but you can click on the "..." button to change the directory any time you like.
  • Built keyboard layout location - This setting displays the exact location of the last keyboard DLL package that you have built. Until you build a keyboard layout DLL, it is empty, but after building it will contain a path and the "..." button will open the directory in a Windows Explorer window.

Figure 5


Load an Existing Keyboard Dialog

This dialog is opened when you choose the File|Load Existing menu option.

The 'Load an existing keyboard' dialog is invoked from the 'File | Load Existing Keyboard' menu:

The dialog reduces development time by loading the layout of one of the keyboards already installed on the machine.

Any existing information you have entered will be erased when you load an existing layout. It is important to save previous work before loading an existing layout.

All keyboards installed on the machine are included in this dialog. This list may or may not not include keyboards created by various third party tools, depending on whether they used the DDK-documented methods for their creation. All installed keyboards generated by the Microsoft Keyboard Layout Creator will be included. For more information on listed/supported layouts, see Using Layouts From Other Keyboard Layout Creation Tools.

It is important to note that you can only load keyboards that exist on the machine. Keyboards on a more recent version of Windows than what you are running will not be available.

For more information about this dialog, see Loading and Modifying an Existing Keyboard Layout.


Keystroke Information Dialogs

There are two dialogs that are available -- a simple dialog that shows the characters for a single keystroke and shift state, and a more complex dialog that shows information for a single keystroke in all shift states.

The simple dialog can be invoked by either clicking on a keyboard button with the mouse or typing the actual keystroke on your keyboard.

You may also choose to click on the "All..." button, which will bring up the full dialog for the key, showing the information for the key across all shift states, which looks like this:

Usually, this dialog will show only the four most commonly used shift states. You can look at the 'Advanced' view to see additional shift states (such as the VK_6 key in the Hebrew keyboard):

This view will appear by default if you have defined keystrokes that use any of those shift states. You can also select the 'Dead Key' view to see information about dead keys (such as the VK_OEM_7 key in the Swiss German keyboard layout):

Again, if there are dead keys defined, then this view will appear by default when the dialog is launched. The CheckBox controls in the upper left hand corner can be used to show or hide this additional advanced or dead key information.

The following pieces of information may also be helpful:

While the characters may be entered as either the actual characters or as UTF-16 code points, they will be converted to the UTF-16 code points when you leave the control (the actual characters will be displayed in the "Actual Char(s)" column).

In the case of Key/Shift+Key and Key+AltGr/Shift+Key+AltGr, you can decide whether you want the CAPS LOCK key to return the same results as the SHIFT key. Obviously the time you want to do this is when the characters are indeed cased variants of each other.

The AutoCaps feature will actually cause the 'CAPS=SHIFT' to be set automatically depending on whether the two shift states are cased versions of each other. This behavior will happen automatically by default but the setting can be changed in the View|Options dialog.

Dead keys can also be defined from here. Simply click on the CheckBox then click on the "..." button to open the Dead Key Entry Dialog to further define the dead key.

For more information, see :

Using Dead Keys

When To Use SGCaps

Recommendations and Best Practices


Testing Keyboard Layouts Dialog

The 'Test Keyboard Layouts' dialog, invoked by selecting 'Test Keyboard Layout...' from the 'Project' menu, allows you to type characters and test the behavior of your keyboard layout without having to first build and install the keyboard layout on the machine.

This dialog provides full support for all the features that your keyboard might use, including dead keys, SGCaps, other shift states, and ligatures.

Other keyboard features that MSKLC does not support (such as the keys on the numeric keypad) may not work as expected.

For more information about using this dialog, see Using the Test Pane under Validation, Test, and Build.


Dead Key Entry Dialog

The 'Dead key Entry' dialog, invoked from either the Vertical dialog in the Keystroke Information Dialogs topic or the keystroke right click menu on the Main Dialog, allows you to enter the base characters and associated composite characters for any particular dead key. The important features of this dialog are:

  • Dead Key Name -- The GetKeyNameText API associates a virtual key (VK) in a specific shift state to a character name. The character name typed into this dialog is what will be returned by this API. By default it will be the actual Unicode character name of the dead key, but it can be overidden in this dialog by changing the text. (To return to the default name based on the Unicode character name, click the 'Default' button.)
  • Base/Composite Key Table -- This table is used to enter the base characters associated with this particular dead key, as well as the corresponding composite key. You may type either characters or UTF-16 code points, though they will be converted to UTF-16 as in the above screenshot of the dialog.

For more information, see the Advanced topic about Dead Keys.


Properties Dialog

The keyboard properties dialog, accessed from the 'Project' menu, allows you to specify values for properties that will be used in the compiled keyboard file.

These properties include:

  • Name -- The name of the keyboard. This name becomes the name of the Keyboard DLL, and must be eight characters or less (so that the compiled file can fit in 8.3 form).

  • Description -- The description of the keyboard, used in the operating system's User Interface for keyboard layout installation, and in the keyboard DLL's property page in Windows Explorer.

  • Company -- The name of the company or organization developing the keyboard layout. This name is displayed in the keyboard DLL's property page in Windows Explorer.

  • Copyright -- The copyright string to display in the keyboard DLL's property page in Windows Explorer. If you remove the information in this TextBox, a string with the year that the keyboard was built will be constructed.

  • Language -- The language of the keyboard layout. This setting has several purposes:
  • In Windows, the user's keyboard layout is represented by a small blue box containing two letters (much like the one in the bottom right-hand corner of this dialog). The choice of language is based on the first two characters of the LOCALE_SABBREVLANGNAME value from the GetLocaleInfo API. By choosing a language here you can choose what two letters you wish to show up here. This also means that at present you cannot choose arbitrary initials for your keyboard layout.

  • On Vista, custom locales will always use the two-letter abbreviation OL (Other Language), an entry that will allow all of the keyboard layouts based on custom locales to be available.

  • During the validation stage of keyboard creation, one of the steps is to ensure that you have properly designated whether the Caps Lock key has been properly associated with the Shift key any time the case of two letters would indicate that the association should be there. Also, validation makes sure that there is no association if there should not be one. The rules for casing are determined by this language setting.

  • Every keyboard has an input locale (sometimes referred to as an input language) value, and that value is derived from the choice in this dialog.

  • Some applications will make decisions on how to process keyboard input based on the LOWORD of your keyboard layout, which is a Win32 Language ID (LANGID) value. This value is derived from the selection made here.
  • Right Alt treated as Ctrl+Alt (also known as AltGr) - Selecting this option makes the right ALT key equivalent to CTRL+ALT, making it easier to reach keys in layouts in which the Ctrl+Alt Shift state is used extensively. Note that if you have any AltGr keystrokes defined, this option will be checked and disabled (because it will automatically be used). The left ALT key is not affected by this setting.

  • CapsLock turned off when Shift is depressed - Selecting this option imitates traditional typewriter behavior where depressing the SHIFT key turns off CAPS LOCK if it is active, something many users are accustomed to.

  • L. Shift+Back == left to right marker (LRM), R. Shift+Back = right to left marker (RLM) - When making use of keyboards for bidirectional languages such as Arabic and Hebrew, users will sometimes be accustomed to using keyboards that use the BACKSPACE key with the left or right SHIFT keys will insert the LEFT-TO-RIGHT MARK (U+200E) or RIGHT-TO-LEFT MARK (U+200F) control characters. Checking this setting allows your keyboard to insert these characters as well.


Options Dialog

The Options dialog, accessed from the 'View' menu, allows you to specify general preference information for Microsoft Keyboard Layout Creator.

The actual dialog looks like this:

The explanation of the items in this dialog:

  • Keyboard Layout Type -- although there are hundreds of different layouts for the physical keyboards that are compatibile with Windows, they most often fall into one of these three categories for placement of the 'Enter' and surrounding keys. Other variants such as those found in laptop computers are often based on one of these three. You will want to note that this setting has no effect on the generated keyboard layout DLLs that are created by MSKLC. They are merely a convenience to the designer of a keyboard layout (so they can pick a layout that most closely matches their own keyboard).

  • Automate CapsLock Behavior - When set, the CapsLock and AltGrCapsLock setting is determined automatically by whether the code points in the shifted and unshifted states of a particular keystroke are cased variants of each other. It is set by default. You can override the setting after it has been made, but if you change one of the characters, the values will once again be set automatically. For more information, see Recommendations and Best Practices

  • Show All Shift States by Default - This option determines which of theKeystroke Information Dialogs is launched when a keystroke is selected. For more information, see Horizontal Versus Vertical Editing Modes.

  • Remember Settings After Shutdown - The option allows you to choose whether you wish to allow settings to be remembered for the next time MSKLC is run. If unchecked on shutdown, all information that MSKLC has remembered about your keyboard authoring preferences remembered while running (including your answers to any yes/no questions where you chose the 'Don't show me this again' option) will be forgotten.

  • Include Validation Warnings Related to CapsLock - When running through the Validation process, there can be warnings related to any time the CapsLock setting is not set properly between the shifted and unshifted states (i.e., the setting turned on when they are not cased variants of each other and turned off when they are). This option allows to supress these types of warnings.

  • Include Validation Warnings Related to Code Pages - When running through the Validation process, there can be warnings related to code points currently on the keyboard layout that are not representable on the default system code page of the associated language. This indicates there may be a compatibility issue for non-Unicode applications.


Using Microsoft Keyboard Layout Creator

This section discusses many of the real issues in using Microsoft Keyboard Layout Creator to create, test, validate, build, and install keyboards, taking you through the various parts of the process, step by step.

Creating Keyboard Layouts

Validation, Test, and Buid

Deployment and Installation

Advanced Topics

Troubleshooting


Getting Started

Getting Started with MSKLC

At first glance, keyboard layouts appear to be an easy item to develop. This impression will often last until layout design time, at which point the hopeful author realizes what they have gotten themselves into! This is further complicated by the complex technical issues of the Windows DDK.

One of the goals of MSKLC was to handle all of the complicated details so that the keyboard layout author could focus on authoring rather than complex technical issues. Of course, many of the complex linguistic, accessibility, and usage issues cannot really be handled by MSKLC (since they vary with the layout being created), but this should be a good place for the new layout author to start their journey....

The most elemental requirement is to enable the assignment of "characters", or Unicode code points and assign them to keystrokes. A great place to start is in the Assigning Keystrokes topic. There are many ways to assign code points to keys, and this topic goes through all of them.

Another important issue for keyboard authors is redistribution. The rules (as outlined in the End-User License Agreement (EULA)) are clear that you cannot sell a standalone keyboard layout that you author and that the keyboard layout must be installed via the package that MSKLC creates. This does not affect your ability to embed the MSKLC-created package in a product that supplies other functionality (such as fonts), but the keyboard layout itself must be free. For more details, see the EULA.


Assigning Keystrokes

With a number of diverse keyboard authoring tools available, the user may have any number of expectations with regards to assigning a specific key on a keyboard. MSKLC provides a number of different key assignment methods to meet these expectations:

  • Clicking on a key with the mouse to bring up the keystroke edit dialog
  • Typing the key twice (once to set focus on the key, once to bring up the keystroke edit dialog)
  • Dragging text from another application (such as Microsoft Word, Microsoft Internet Explorer, or Windows Character Map) and dropping it onto a key.

When entering code points in any of the keystroke editing or dead key dialogs, you can enter either the actual characters or the Unicode code points separated by spaces, in U+[##]#### format (the optional digits are for code points off of the Basic Multilingual Plane, greater than U+FFFF).


Creating Keyboard Layouts

The core feature of Microsoft Keyboard Layout Creator is the ability to create keyboard layouts, and this topic will help you in this venture. For more information, see the topics below.

Creating a New Keyboard Layout

Loading and Modiying an Keyboard Layout

Horizontal Versus Vertical Editing Modes

Recommendations and Best Practices


Entering Characters (or Code Points)

Microsoft Keyboard Layout Creator has many methods by which you can add character or code point definitions to your keyboard layout.

  • You can use Windows Drag & Drop functionality to drag contents from a webpage in IE, Character Map, or any application with the appropriate support and drop the text onto a key. If the keystroke already has characters on it, you will be asked to confim the replacement, but you will not be asked to confirm truncation of the selected string if it is longer than four UTF-16 code points.

  • You can enter the characters directly by typing them in -- first click the key with the mouse or hit the key on your own keyboard twice (once to select the key, the second time to load the dialog). You can then type the character(s).

  • You can enter the Unicode code points, either in U+####, U+####[##], or \x#### format (first open the dialog for keystroke entry, as above).

For more information about data entry, see the Keystroke Information Dialogs topic.


Creating a New Keyboard Layout

There are many times that there is no existing keyboard that can be used as a starting point for a keyboard layout. Perhaps you are not on a version of Windows that contains such a keyboard. There may be no version of Windows that contains an appropriate keyboard. Or you may want to create an alternate version of an existing keyboard that is so different that you would change almost every keystroke.

Regardless of the reason, Microsoft Keyboard Layout Creator will let you build a keyboard from the ground up.

To get started, you will want to choose File|New from the menus and then start assigning keystokes. When you are done you can test,m validate, and build your layout as discussed under the Validation, Test, and Build topic. If you ever have a problem, the F1 key should be able to provide you with assistance.

If you would prefer to base your layout on an existing keyboard layout, see Loading and Modifying an Existing Keyboard Layout.


Loading and Modifying an Existing Keyboard Layout

Many times, there will be an existing keyboard that is very close to the one you want. Perhaps you want a keyboard identical to the one you are using now, with only one change. You may want to add a new shift state to support another language. Or you may want to move the location of a few keys.

In these cases, Microsoft Keyboard Layout Creator allows you to easily load an existing keyboard layout, modify it, and build it as a new layout.

The Load an Existing Keyboard Layout dialog help topic explains exactly how you can load keyboards from your system. After that, the Keystroke Information dialogs will help you make whatever modifications are needed.

If you would prefer to not base your layout on an existing keyboard layout, see Creating a New Keyboard Layout.

For information on using layouts created in other tools, see Using Layouts From Other Keyboard Layout Creation Tools.


Horizontal Versus Vertical Editing Modes

There are two ways to look at a keyboard layout -- either by looking at every possible shift state for a given key, or by looking at all the keys for one shift state. By thinking of each shift state as a level, it is easy to see why these two views are referred to respectively as a vertical or a horizontal view.

Note that if you open the horizontal view on a keystroke that has already been assigned, the assigned character(s) will be selected, so that immediately typing will replace the selection with whatever you type. There are also some characters such as combining marks which may not be easily visible when they are selected in this dialog; if you run into this problem then all you need to do is click outside the selection with your mouse or hit the 'HOME' or 'END' keys to unselect the text.

A common question is "Which one is better?". The answer is that neither is better, at all. Each is good for different circumstances, though. It really depends on the source of your inspiration in designing a keyboard layout. For example, if you are given multiple flat views of the keyboard (one per shift state), then working in a horizontal view can prove to be more efficient. If, on the other hand, you are especially interested in making sure that you properly lay out the same key in different shift states (such as wanting to make sure that uppercase and lowercase "Q" show up on the same key, then you may find the Vertical view to be best suited to your needs.

You can change the default view invoked by clicking on a keystroke button by changing the "Show All Shift States By Default" setting in the Options dialog. This setting will ensure that you pick a default that it the most efficient setting for your needs.

For more information, see the reference topic on the Options dialog.


Recommendations and Best Practices

CapsLock -- Generally, using CapsLock makes sense only when the script of the keyboard layout has case. For example, keyboard layouts using the Latin, Cyrillic or Greek script might use CapsLock to invert shift states (uppercase characters are output rather than lowercase in the unshifted state in CapLock). This function might not be useful when a script does not have case as users may be confused by this behavior.

AutoCaps -- The AutoCaps feature validates cased variants of characters across two shift states (e.g., unshifted and shifted, AltGr and AltGrShift). This can save development time and unintentional errors, as it checks for appropriate cased variants of characters as based on the language associated with the keyboard through the Properties Dialog.

102 Key Keyboard -- Developers of keyboard layouts should determine whether they want a 101 or 102 key keyboard layout. As the 102 Key Keyboard has an additional key (located to the right of the left SHIFT key), users will not be access this key unless they have a physical 102 key keyboard.

"KBD" Prefix for Keyboard DLLs -- All keyboard layouts shipping on Windows systems start with the "kbd" prefix. It may be helpful to prefix any custom layouts with "kbd", to avoid interacting with other DLLs (this is not required).

For more information on best practices, see the following links:

Dead Keys

When to use SGCaps

Changing Scan Codes

Avoiding the Ctrl Shift State


Validation, Test, and Build

Okay, you have created your keyboard layout, and you think it has all of the characters on it that you need. But is it ready to be built and given to customers?

Clearly the answer is no, until you have tested it and run all of the necessary verification procedures to make sure that the keyboard layout is valid. After that, you need to build the keyboard layout DLL. This section discusses these issues so you can understand how they work.

Validation of Keyboard Layouts

Using the Test Pane

Building Keyboard Layouts


Validation of Keyboard Layouts

Validation serves two important purposes:

  • There are many rules that a keyboard layout must follow, and if any of these rules are broken, the build process will not succeed. Some of these rules are enforced by Microsoft Keyboard Layout Creator to keep people from creating keyboards that would not interact well with software, while other rules, if ignored, would prevent the keyboard from working. The validation step is a process that ensures a certain core set of issues are addressed properly in your keyboard layout. These items will be flagged as Errors in the validation log file and will block the building process.

  • Beyond the rules there are certain guidelines which maximize the chances that your keyboard layout will behave in a way that both you and the users of your keyboard layout would find acceptable. These entries will be in the validation log file as Warnings so they can be potentially addressed. Note that you may look at a specific warning and decide that you wanted your keyboard layout to behave as listed in the warning. That is okay. The important rule to keep in mind is to be aware of why you are going against the warning.

    For example, you may want to put a Greek symbol on a French keyboard layout (for math). You would most likely associate this French keyboard with the French language in the Properties dialog. Because French uses the Windows code page 1252, and the Greek symbol is not in this code page (rather 1253), a warning will be given (because this Greek symbol would not work if you used this keyboard with a non-Unicode application). This is a reasonable warning to ignore, if you need this symbol on your keyboard and it is not important to your users to support non-Unicode applications.

As you may discover in the process of loading existing keyboards provided by Microsoft, not all of them will pass without any warnings, a side effect of not having a great tool to do the validation until now!

For a reference list of validation rules that are used, see Validation Reference.


Validation Reference

This topic acts as a reference and provides a list of all of the issues that are checked as a part of validation of a keyboard layout.

Errors

Errors will stop the building of the keyboard and must be corrected if you want to build the layout DLL. Errors include:

Keyboard name

  • Keyboard name cannot be blank
  • Keyboard name cannot be longer than 8 characters
  • Keyboard name cannot contain spaces
  • Keyboard name must be ASCII
  • First character of the keyboard name cannot be a double quote
  • Can't create a file based on the keyboard name
  • Keyboard name must be unique on the local system

Keyboard description

  • Description cannot be blank
  • Description cannot be longer than 233 characters
  • Description must be unique on the local system
  • First character of the description cannot be a double quote

Company/organization

  • Company/organization cannnot be blank
  • Company/organization cannot be longer than 255 characters
  • First character of the company/organization cannot be a double quote

Copyright string

  • Copyright string cannot be longer than 255 characters
  • First character of the copyright string cannot be a double quote

Required keys

  • VK_DECIMAL must be defined.
  • VK_SPACE must be defined.

Ligatures

  • Ligatures cannot contain more than four UTF-16 code points

Dead Keys

  • Base character is null
  • Combining character is null

Scan codes

  • Duplicate scan codes defined

Warnings

Warnings will not block the building of the keyboard but indicate potential problems that should be reviewed and corrected as appropriate. Warnings include:

Defined character(s)

  • Character defined exclusively on a key that may not be present on all keyboards.
  • An unpaired surrogate code point was defined.

Caps Lock/AltGr+CapsLock

  • Marked to be the same as SHIFT, but the characters do not appear to be cased versions of each other
  • Marked to be different than SHIFT, but the characters appear to be cased versions of each other

Caps Lock/SCGAPS

  • SGCaps and CapsLock are both specified on the same Virtual Key

Layout table

  • Character is not contained in the Windows code page of the specified language
  • Character is defined more than once in the layout

Ligatures

  • Not all characters in ligature are contained in the Windows code page of the specified language

Dead Keys

  • Dead key table is empty
  • Dead key defined on a ligature
  • Dead key without defined name
  • Dead key's base character does not exist in the keyboard layout
  • Combining character is not contained in the Windows code page of the specified language
  • Last entry in a dead key table should use a space as its base character

CTRL/SHIFT + CTRL shift states

  • Unicode control characters defined in CTRL shift states


Using the Test Pane

If you want to test out the input capabilities of your keyboard layout, all you need to do is select the 'Test Keyboard Layout...' menu option. It will bring up a dialog that allows you to test out your keyboard layout (Figure 1).

Figure 1: The Keyboard Layout Testing Dialog

The dialog will let you type characters as if your keyboard layout were actually built and installed. It provides the perfect opportunity to test the keyboard layout and make sure it behaves as you expect it to (like the Tamil layout being tested in Figure 2). All features that your keyboard makes use of (dead keys, SGCaps, other shift states, and ligatures) will all be supported to assist with your testing.

Figure 2: Testing Your Tamil Keyboard is Simple!

If you are using a bidirectional script such as Hebrew or Arabic, you can select the 'Bidirectional (Right to Left)' checkbox to have the control behave as a right-to-left control would (Figure 3).

Figure 3: Testing a Persian Keyboard is Easy, too.


Building Keyboard Layouts

Once you have defined your keyboard layout you can build it by choosing the appropriate option from the Project menu. Prior to the build commencing, the keyboard will be validated. Assuming it passes validation, either without warnings (Figure 2) or with warnings (Figure 3), then everything is okay. Of course, it can also fail (Figure 4).

Figure 2: Validation Succeeded, With No Errors

Figure 3: Validation Succeeded, With Errors

Figure 4: Validation Failed

Next, the Windows Installer package will be built. The .MSI file will be created and you will be informed of where it has been placed. You will have the option of having a Windows Explorer window opened to that directory (Figure 5).

Figure 5: Building a Windows Installer database

This directory will contain the keyboard layout DLL to install and the MSI that performs the installation (the size of both of them together should usually be less than 50k, even in complex keyboard layouts).


Deployment and Installation

This section discusses how to deliver keyboard layouts to your users.

Deploying Keyboard Layouts

Installing Keyboard Layouts


Deploying Keyboard Layouts

There are some important items to note about the installation logic:

You cannot overwrite an existing file in the system32 directory; if your setup attempts to do so, setup will fail. This is one of the reasons that the tool validates your build by making sure that there is no such file already on the machine (to help avoid problems here).

You cannot have multiple keyboard layouts with identical descriptions, as such layouts will not work with Windows. If you have an identically-named keyboard layout, then setup will still succeed at installation, but it will append a #n at the end of the name (where n is a number from 2 to 99999) to make sure the name is unique. You can avoid such a description 'change' by choosing a unique description for your keyboard.

The actual MSI uses Windows Installer 2.0 features, and thus may require a newer version to be installed, in which case you might possibly have to include Windows Installer itself (InstMsiW.exe, which is at least 1.5mb). This would never be required on Vista..

The .MSI is not written with 'Upgrade' or other such scenarios in mind -- simplicity was the goal. Therefore, to upgrade, you would simply uninstall the old keyboard and install the new one in its place.

There are custom actions that the setup requires in order to install a keyboard layout; there is no other supported (or indeed supportable!) way to install a keyboard layout.

The actual UI for setup itself is very simple (Figures 1-3).

Figure 3: When you run the install program, it directly installs.

Figure 4: Maintenance mode lets you repair or remove the keyboard layout.

Figure 5: If you uninstall, you are informed that the uninstall has succeeded.


Installing Keyboard Layouts

The procedure for installing new keyboard layouts differs slightly across different versions of the Windows operating system.

Installing keyboard layouts on Windows Vista

Installing keyboard layouts on Windows XP/Windows Server 2003

Installing keyboard layouts on Windows 2000 Professional/Server

Installing keyboard layouts on Windows NT 4.0 Workstation/Server


Installing Keyboard Layouts on Windows Vista

Note: On Vista, the keyboard layout will automatically be added to the language bar on install and removed on uninstall. The following instructions only relate to adding the keyboard layout for other users on a machine.

In Windows Vista, a keyboard is known as an input language. To add an input language, you first start in the control panel, where you can find the icon for Regional and Language Options (Figure 1).

Figure 1: The Regional and Language Options Icon

Click the icon to launch the dialog. Then choose the Keyboards and Languages tab in the middle (Figure 2).

Figure 2: The Keyboards and Languages Tab of Regional and Language Options Dialog

Click the Change Keyboards... button to launch the Text Services and Input Languages dialog (Figure 3).

Figure 3: The Text Services and Input Languages Dialog

You will see a 'tree' listing of your input languages, where each main node is a language/region pairing and each branch underneath is a specific input method. From there, click the Add button to add an input language. This will launch the Add Input Language dialog (Figure 4).

Figure 4: The Add Input Language Dialog

Select the language you want the keyboard to appear under (Figure 5) and then select your custom keyboard layout, then click OK.

Figure 5: Choosing an input method in the Add Input Language dialog

You will be returned to the Text Services and Input Languages dialog, and you will be able to see your custom keyboard layout added to the tree (Figure 6).

Figure 6: Seeing the New Keyboard Layout in the Text Services and Input Languages Dialog


Installing Keyboard Layouts on Windows XP/Windows Server 2003

Note: On Windows XP and Windows Server 2003, the keyboard layout will automatically be added to the language bar on install and removed on uninstall. The following instructions only relate to adding the keyboard layout for other users on a machine.

In Windows XP and Windows Server 2003, a keyboard is known as an input language. To add an input language, you first start in the control panel, where you can find the icon for Regional and Language Options (Figure 1).

Figure 1: The Regional and Language Options Icon

Click the icon to launch the dialog. Then choose the Languages tab in the middle (Figure 2).

Figure 2: The Languages Tab of Regional and Language Options Dialog

Click the Details button to launch the Text Services and Input Languages dialog (Figure 3).

Figure 3: The Text Services and Input Languages Dialog

You will see a 'tree' listing of your input languages, where each main node is a language/region pairing and each branch underneath is a specific input method. From there, click the Add button to add an input language. This will launch the Add Input Language dialog (Figure 4).

Figure 4: The Add Input Language Dialog

Select the language you want the keyboard to appear under and then select your custom keyboard layout, then click OK. You will be returned to the Text Services and Input Languages dialog, and you will be able to see your custom keyboard layout added to the tree (Figure 5).

Figure 5: Seeing the New Keyboard Layout in the Text Services and Input Languages Dialog

Unfortunately, if you want to see the custom keyboard in the Language Bar, then things get a little more complicated. The reason is that the Text Services Framework makes an assumption that the user does not need to see the specific information about the exact type of input method if they only have one under a language. The upshot of this is that when you look at the language bar, it will only mention the language "Kannada" for the custom keyboard and not that it is the custom keyboard (as in Figure 6).

Figure 6: The Language Bar does not always tell you what kind of keyboard layout has been chosen.

The only way to work around this is to install another input method under the same language, loading the original Kannada keyboard at the same time as the custom one. Once you do this you can click the "Language Bar..." button in the lower left hand corner of the dialog and it will bring up the "Language Bar Settings" dialog (Figure 7). Make sure the first, third, and fourth CheckBox controls are checked, and click OK.

Figure 7: The Language Bar Settings Dialog

Once all of this has been done, the language bar will show a slightly different UI (the one shown in Figure 8). In addition to the language dropdown, an input method dropdown will be present to switch between input methods.

Figure 8: The Language Bar will tell you what kind of keyboard layout has been chosen, if you follow the above procedures.

It is important to note that the extra step of adding an additional input method under the same language as the custom keyboard is only required if you want to see the custom keyboard listed layout in the language bar, as you can in prior versions of Windows. If you only select the one custom keyboard, then you can trust that it is the one that will be used when you switch to the appropriate language.


Installing Keyboard Layouts on Windows 2000 Professional/Server

In Windows 2000 Professional and Windows 2000 Server, the terminology is an input locale. To add an input locale, you first start in the Control Panel, where you can find the icon for Regional Options (Figure 1).

Figure 1: The Regional Options Icon

Click the icon to launch the dialog. Then choose the Input Locales tab to view all of the currently chosen input locales (Figure 2).

Figure 2: The Input Locales Tab of the Regional Options Dialog

You can then click on the Add button to launch the Add Input Locale dialog (Figure 3).

Figure 3: The Add Input Locale Dialog

Select the language you want the keyboard to appear under and then select your custom keyboard layout, then click Ok. You will be returned to the Input Locales tab of the Regional Options dialog, and you will be able to see your custom keyboard layout added to the list (Figure 4).

Figure 4: Seeing the New Keyboard Layout in the Input Locales Tab of the Regional Options Dialog

If you look in the Windows Explorer taskbar, you will see an icon with two letters in it which is known as the language indicator. Clicking on that icon will show you the list of languages and you will be allowed to select your custom keyboard layout (Figure 5).

Figure 5: The Input Locale Indicator on the Taskbar


Installing Keyboard Layouts on Windows NT 4.0 Workstation and Server

In Windows NT 4.0, the overall process is similar to that on Windows 2000, and they both use the same term -- input locale. To add an input locale, you first start in the Control Panel, where you can find the icon for Regional Settings (Figure 1).

Figure 1: The Regional Settings Option

Click the icon to launch the dialog. Then choose the Input Locales tab. If there are many keyboard layouts installed, they will all be listed, otherwise you will see the simple unadorned dialog in Figure 2.

Figure 2: The Input Locales Tab of the Regional Settings Dialog

You can then click on the Change... button to launch the Text Services dialog (Figure 3).

Figure 3: The Text Services Dialog

You can then click on the Add button to launch the Add Input Language dialog (Figure 4).

Figure 4: The Add Input Language Dialog

From here, you can select the language under which to place the keyboard layout, after which you can select your custom keyboard layout. Once you have selected the layout and you press OK, you will see a different Input Locales tab in Regional Settings (the one in Figure 5, which lists all of the input languages).

Figure 5: The Input Locales Tab of the Regional Settings Dialog when another locale has been added.

If you look in the Windows Explorer taskbar, you will see an icon with two letters in it which is known as the language indicator. Clicking on that icon will show you the list of languages and you will be allowed to select your custom keyboard layout (Figure 6).

Figure 6: The Input Locale Indicator on the Taskbar


Advanced Topics

The following section deals with various advanced functions available through Microsoft Keyboard Layout Creator.

Using Layouts From Other Tools

Using Dead Keys

Code Points With No Visible Representation

Avoding the Ctrl Shift State

When To Use SGCaps

Changing Scan Codes


Using Layouts From Other Keyboard Layout Creation Tools

There are several tools created by third parties that assist in the creation of keyboard layouts. They generally fall into categories:

  • Tools that use the Windows DDK-documented methods for generating keyboard layouts in .DLL form for NT-based platforms (Microsoft Keyboard Layout Creator is one of these)

  • Tools that use an extra runtime layer to map keystrokes outside of what the operating system does for keyboard handling

For MSKLC's Loading and Modiying an Keyboard Layout functionality, it is using normal Win32 registry APIs to obtain the list of keyboards and Win32 API such as ToUnicodeEx and MapVirtualKeyEx to obtain information about the layouts themselves. Because of this, only layouts created by tools in the first category above would be expected to be listed and work properly. Tools in the second category will either be filtered from the list or when loaded will not be able to produce a useful layout in MSKLC.


Using Dead Keys

When a keystroke has been set up as a dead key, the color will change, like in the case of the AltGr+VK_7 on the French keyboard layout, below. The tooltip for the key will also list all of the dead key pairs.

Once you open the dead key dialog, you can see all of the same information, much more closely.

Using a dead key is easy: when the typed dead key (on the left) is immediately followed by a typed base character (below left), the corresponding composite character (below right) will be inserted.

You will need pairs of entries for each dead key: one for 'Base' and one for 'Composite'. These can be entered as either single characters or UTF-16 code points (they will be converted to UTF-16 code points).

You can enter a code point in the 'Base (codepoint)' column here even if it has not yet been added to the keyboard. You should, however, add those characters before you try to build the keyboard. If you do not do this, then your keyboard layout can still be built, but you will never actually be able to use the dead key table entry in question. This will appear as a validation warning when you are building your keyboard.


Code Points With No Visible Representation

In the Unicode Standard, there are many code points defined that have no actual visible representation but are instead control characters or different types of space characters that allow formatting of text in a particular way. In order to make it easier to use such code points in Microsoft Keyboard Layout Creator generated keyboards, they will be given a visible representation in the layout. This will occur in both the main dialog as above, and in the Keystroke Information dialog:

This visual substitution is a simple method to assist in creating keyboards. It has no effect on the generated output. The glyphs used are similar in appearance to the reference glyphs used in the Unicode Standard's code charts (when such glyphs exist). A list of the characters covered by this method, along with the glyphs used to represent them, is shown below:


Avoiding the Ctrl Shift State

While it is possible to define characters for both the Ctrl and Ctrl+Shift shift states, it is highly recommended that you avoid doing this if you can, for two reasons:

  • There may be conflicts with common applications such as Microsoft Word, which use the "Control" key for its intended purpose - control functions. Generally speaking, they will handle the WM_KEYDOWN message (which contains the VK value). Because of this, your keyboard layout will never see that message translated into a WM_CHAR message (which contains the characters). These applications document their usage of these Control keys

    You may rely on many of the same features without realizing it when hit Ctrl+S to save, etc.

  • Even if the application does not try to wrest control of these keystrokes, Windows internally tends to map the Ctrl shift states for VK_A - VK_Z to Unicode control characters any time the keyboard layout does not map them. This little known feature has been a part of Windows for a long time, and there are people assuming it will always be true, for compatibility with old DOS-based appliations.

If you feel you must use the Ctrl shift state, then at least consider avoiding VK_A - VK_Z (which is where most control functions would be kept) and also consider not putting any vital characters in your keyboard layout there, to guard against when the application blocks your layout's desired input.

You may notice specific keys in the Ctrl shift state are assigned when you load an existing keyboard layout. These key assignments are used in certain legacy applications like Microsoft HyperTerminal and should usually not be removed.


When To Use SGCaps

Some keyboards (such as those for Swiss German, Hebrew, and Swiss) do not associate the CAPS LOCK and Shift keys together for all keystrokes; instead, pressing the CAPS LOCK key defines an additional two shift states for specific keys.

The "SG" in the name orginiates from the first keyboard layout to use the functionality, the Swiss German keyboard layout.

You may use these additional shift states if you want to, but it will increase the complexity of your keyboard and anyone who is not used to this mechanism may find the keyboard confusing until they understand it.

NOTE: You cannot mix the first Caps Lock CheckBox and the SGCaps shift state for a single keystroke. If both are selected, only the SGCAPS definition will be used.


Changing Scan Codes

Scan codes are hardware values -- the ones that the keyboard hardware sends to the computer when a key is pressed. The intention of Microsoft Keyboard Layout Creator is to map the expected values coming from the keyboard to the keyboard layout you are creating. If you change the scan code value of a key in your keyboard layout, then you will fundamentally change how that keystroke is viewed, in all shift states.

This value should never be changed in Microsoft Keyboard Layout Creator unless you are developing a keyboard layout for hardware that generates different scan codes. Since MSKLC currently only supports a few specific layouts, this may be a possibility. If you obtain the scan code values for the alternate hardware, then it would make sense to change the scan codes to match that hardware.

Microsoft Keyboard Layout Creator supports layouts commonly used in the United States, Europe, and Russia (see information about the Options Dialog for information on how to toggle between them). The actual layout of scan codes for these three types of keyboards can be seen below.

The differences between these three layouts are minor but they help show how different hardware can give different results. What is important to realize is that all three layouts support the same keys, and it is only the position of some of the keys that changes.

One exception to this is that on the US keyboard the 102nd key (shown as 0x56, to the right of the left SHIFT key) is often not present. If you assign code points to this key, it is a good idea to assign the same code points to other characters so that people with US hardware will not be unable to use this key on your keyboard.

Another interesting exception relates to Japanese keyboard hardware. This hardware adds an additional key to the keyboard, to the left of the Backspace key. This key has a scan code of 0x7d and no defined VK, and is not assigned in any defined Windows keyboard. In fact, it is only ever used by the Japanese IME. MSKLC does not handle this key since it is not assigned on any non-IME keyboard currently in use.


Troubleshooting

If you run into problems in creating new keyboard layouts, here are some helpful hints that you may find to be of some assistance.

Changing the Font Used to Display Characters


Changing the Font Used to Display Characters

Microsoft Keyboard Layout Creator is capable of displaying a wide range of characters without ever requiring the font to be changed. However, characters from some scripts may not display correctly (Figure 1) until the font is changed.

To fix this problem, select "Fonts" from the View menu and choose a TrueType or OpenType font that you know can support the language/script in use. This will allow you to see the characters properly, as shown below:

For any scripts in Unicode not covered by the fonts that ship with the operating system, you may have to find a suitable font and add it to your system (and then select your font from the View|Fonts dialog as noted above). If you cannot find a font, then you can still build a keyboard layout, but it will more look like the one in Figure 1 above (so you should carefully verify code points as you type them in).

Note: If the font you switch to contains incomplete/inaccurate TrueType/OpenType information about the scripts it supports, it is possible that even selecting that font will not correct the display problem. While your keyboard layout data is unaffected by your font selection, you will need to choose a font with correct information in it before you will be able to see the characters you have associated with each keystroke. None of the fonts that ship with Microsoft products should have such problems as they are run through validation tools (for more information see the Microsoft Typography website at http://microsoft.com/typography/).

Additionally, if the font has information intended to support a script that the .NET Framework version you have installed does not support, then there are times that the characters you add to the keyboard will not render properly. In some extreme cases, you could even cause MSKLC to throw an ignorable exception. It is best in such cases to think of the font selection option in MSKLC as a convenience rather than as a requirement to producing adequate keyboard layouts, and just use another font.


MICROSOFT SOFTWARE LICENSE TERMS

MICROSOFT KEYBOARD LAYOUT CREATOR, Version 1.4

NOTICE: INSTALLATION AND USE OF THIS SOFTWARE REQUIRES VALIDATION THAT YOU ARE RUNNING A PROPERLY LICENSED, GENUINE COPY OF WINDOWS OPERATING SYSTEM SOFTWARE. AS PART OF VALIDATION, INFORMATION ABOUT YOUR SYSTEM WILL BE SENT TO MICROSOFT. MICROSOFT WILL NOT USE THE INFORMATION TO IDENTIFY OR CONTACT YOU.

These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft

· updates,

· supplements,

· Internet-based services, and

· support services

for this software, unless other terms accompany those items. If so, those terms apply.

By using the software, you accept these terms. If you do not accept them, do not use the software.

As described below, using some features also operates as your consent to the transmission of certain standard computer information for Internet-based services.

If you comply with these license terms, you have the rights below.

1. INSTALLATION AND USE RIGHTS. You may install and use one copy of the software on your device running validly licensed copies of Microsoft Windows Operating System software.

2. VALIDATION. The software also includes the Windows Genuine Advantage validation tool. The tool will check whether you have a properly licensed copy of Microsoft Windows Operating System software (“Windows”) installed. IF YOU DO NOT HAVE A VALID COPY OF WINDOWS, THEN YOU CANNOT INSTALL AND RUN THE SOFTWARE. For more information about this feature, see http://go.microsoft.com/fwlink/?LinkId=56310.

a. Computer Information. The tool uses Internet protocols to send to Microsoft computer information, such as your Windows product key (hashed), hard drive volume serial number (hashed), PC manufacturer, operating system version, Windows product ID, PC BIOS information, user locale setting, language version of Windows, validation result and whether the installation of this software was successful. Certain information derived from your IP address, which cannot be used to identify you, is retained in association with this computer information.

b. Use of Information. We may use the computer information to improve our software and services, help prevent improperly licensed use of the software, and develop aggregate statistics. We may also share the aggregate data with others, such as hardware and software vendors and volume licensees to help protect their license keys.

c. Consent for Internet-Based Services. By using this SOFTWARE, you consent to the transmission AND USE of thE ABOVE COMPUTER information. Microsoft does not use the information to identify or contact you.

d. Privacy Notice. For additional Information about the computer information transmitted to Microsoft, see http://go.microsoft.com/fwlink/?LinkId=68985.

3. Scope of License. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not

· work around any technical limitations in the software;

· reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;

· make more copies of the software than specified in this agreement or allowed by applicable law, despite this limitation;

· publish the software for others to copy;

· rent, lease or lend the software;

· transfer the software or this agreement to any third party;

· use the software for commercial software hosting services; or

· Use the software for the sole purpose of repackaging a Microsoft provided keyboard layout to offer as a stand-alone commercial product for which you charge a fee.

4. BACKUP COPY. You may make one backup copy of the software. You may use it only to reinstall the software.

5. DOCUMENTATION. Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.

6. Export Restrictions. The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting.

7. SUPPORT SERVICES. Because this software is “as is,” we may not provide support services for it.

8. Entire Agreement. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.

9. Applicable Law.

a. United States. If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.

b. Outside the United States. If you acquired the software in any other country, the laws of that country apply.

10. LEgal Effect. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.

11. Disclaimer of Warranty. The software is licensed “as-is”. You bear the risk of using it. Microsoft gives no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this agreement cannot change. To the extent permitted under your local laws, Microsoft excludes the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

12. Limitation on and Exclusion of Remedies and Damages. You can recover from Microsoft and its suppliers only direct damages up to U.S. $5.00. You cannot recover any other damages, including consequential, lost profits, special, indirect or incidental damages.

This limitation applies to

· anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and

· claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.

It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.

Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.

Remarque : Ce logiciel étant distribué au Québec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français.

EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert « tel quel ». Toute utilisation de ce logiciel est à votre seule risque et péril. Microsoft n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues.

LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices.

Cette limitation concerne :

· tout ce qui est relié au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et

· les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur.

Elle s’applique également, même si Microsoft connaissait ou devrait connaître l’éventualité d’un tel dommage. Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne s’appliquera pas à votre égard.

EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas.