Just one code point for SGCAPS....

by Michael S. Kaplan, published on 2006/01/16 03:01 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2006/01/16/513088.aspx

Fred Jones asked in the Suggestion Box:

In MSKLC I can only add a single unicode codepoint to the SGCAP + <key> field. Is this intentional or a bug? If intentional...why?

It is indeed intentional, though not through an attempt on our part to be difficult. :-)

It is actually a limitation in SGCAPS on Windows that we did not know about when MSKLC was first developed!

Early internal versions of MSKLC allowed SGCAPS to contain up to four characters, and also allowed an 'ALTGR SGCAPS' which gave two additional shift states. It was not until after testing the functionality we investigated and found that there was no way to represent these things in the created layout (at which point we had to take all that support out, unfortunately).

In the end, MSKLC is designed to make what is possible much easier to do, rather than to make the impossible possible....

It is one of the possible things that we could look into adding in a future version, though of course that is an uphill battle since it would require work in both Windows and MSKLC, which is harder to coordinate, especially at a time where people are so focused on getting the next version of Windows ready to ship (the fact that SGCAPS as a feature is not the most intuitive thing in the world for most users is also a factor that makes this a more difficult addition to justify).


This post brought to you by "" (U+0f4d, a.k.a. TIBETAN LETTER DDHA)

# Nick Lamb on 16 Jan 2006 6:02 PM:

As with many other Microsoft tools and documents, MSKLC says codepoint when it means UTF-16 code unit.

The result in this case is that characters outside the Basic Multilingual Plane cannot be used with SGCAPS, a single UTF-16 code unit is not enough to encode such characters in Unicode.

# Michael S. Kaplan on 16 Jan 2006 6:05 PM:

An excellent point, Nick -- and one that I will ask to have added to the list of considerations on this issue.

# Nick Lamb on 17 Jan 2006 7:14 AM:

In contrast to the documentation if you enter illegal code sequences such as lone surrogates they just crash the application rather than causing an error to be reported during validation.

It might be interesting to either write something like MSKLC for XKB (this would have the advantage that XKB understands keyboard geometry) or write a script that converts MSKLC source into XKB source...

Of course the two work in quite different ways, so some things won't translate in one direction or the other.

# Michael S. Kaplan on 17 Jan 2006 11:14 AM:

Are you saying MSKLC is crashing for you with lone surrogates? That does not repro for me here....

# Nick Lamb on 21 Jan 2006 8:25 AM:

Instructions to reproduce, for vanilla XP system up-to-date on Microsoft Update, with MSKlC 1.3.4073.0 and .NET Framework Version 1.1.4322.2032 apparently

1. Click the distinct grey key right of Left Shift to bring up a dialog

2. Type U+D801 and close the dialog

3. Confirm, tooltip for this key now says U+d801 Non Private Use High Surrogate

4. Select Project/Validate from menu

5. Say "No" to prompt about reviewing properties

6. "An unhandled exception has occurred in your application"

# Michael S. Kaplan on 21 Jan 2006 1:18 PM:

A vanilla XP system with all updates means XP SP2 plus updates, right? :-)

I will see about having someone look into this deeper, it is definitely not expected.

Michael S. Kaplan on 14 Feb 2008 10:38 AM:

referenced by

2010/07/07 [Pretty much] All the things you can't do with SGCAPS, and why

2006/10/06 If you hate the CAPS LOCK key, please read this!

2006/04/10 Getting all you can out of a keyboard layout, Part #8

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