Best practices for keyboards #0: MSKLC warnings in 1.0/1.1

by Michael S. Kaplan, published on 2005/12/29 21:01 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/12/29/508124.aspx


When MSKLC was first developed, it had no validation step, and no warnings. But then as Simon Earnshaw, Cathy Wissink, and I were getting more involved with the process of creating this tool that was going to make it so much easier to create new layouts, we reached a realization.

While it may be a bit too draconian to simply block people from doing things that do not fall in the category of our "best practices" (especially when scenarios may alter those practices!), at least adding in warnings would allow a little bit of social engineering to take place. People would be gently encouraged to avoid creating layouts that could cause problems out in the wild.

Here are the warnings that exist in MSKLC today (this is from the MSKLC help file, in the topic entitled 'Validation Reference'):

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

Looking at things today, MSKLC has revolutionized keyboard layouts internally as well!

These days when subsidiary contacts have new keyboards that they want to be added to Windows based on new standards they have to also provide the .KLC file with the layout. And as we have been picking up keyboards for the Vista release, we have been getting even more ideas for validation warnings -- because when mistakes are easy to make, people will make them and that can hardly be considered their fault.

All of thses issues apply to customers outside of Microsoft just as much as they do to these internal contacts, so they do make sense to add.

Future posts in this series will talk about some of these new issues that have come up, and which may well be added to the validation process in upcoming releases of MSKLC....

 

This post brought to you by "" (U+0b0a, a.k.a. ORIYA LETTER UU)


# Centaur on 29 Dec 2005 11:48 PM:

Why is it a problem when “Character is defined more than once in the layout”?

# Michael S. Kaplan on 30 Dec 2005 12:29 AM:

In our experience, usually when it happens it is by accident -- so the warning is a good one to make sure that it is not done unintentionally. Note that we also give a warning in the situation where you put a chasracter on the 102 key only, since it may not be on all user keyboards!).

# Crissov on 31 Dec 2005 7:23 AM:

It most often happens with the dot or comma on VK_DECIMAL in my experience, which is a useless warning IMHO. It would be worth a warning on the contrary, when any character on VK_DECIMAL is defined nowhere else.

The log uses “Ctl” for “Control” by the way, whereas it’s usually “Ctrl”.

# Michael S. Kaplan on 31 Dec 2005 10:09 AM:

This is a good point, Crisov. We do that for other characters, it would make sense to do here. And the abbreviation should also be consistent.

Thanks! :-)

Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

go to newer or older post, or back to index or month or day