Only ONE WCHAR per dead key

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


Regular reader Ivan Petrov asked the following in the Suggestion Box:

Hi Michael

I've the following problem:

In MSKLC in the 'Control state' of the keyboard (when the Control key is pressed) I'm trying to make VK_OEM_3 a Dead Key. So, I assign to it  'U+0060 (') GRAVE ACCENT' and then I set it as Dead key. To this point everythig goes ok! Then I go into the Dead key dialog box. And here is the BIG problem. What I mean:
I want to do the following:
When I press "Ctrl" + "`"  followed by one of this vowels in the Bulgarian alphabet:
"а", "е", "и", "о", "у", "ъ", "ю" and "я",
the keyboard layout to produce one of this results:

а̀  (0430 + 0300)
ѐ  0450 or (0435 + 0300)
ѝ  045d or (0438 + 0300)
о̀  (043e + 0300)
у̀  (0443 + 0300)
ъ̀  (044a + 0300)
ю̀  (044e + 0300)
я̀   (044f  + 0300)

And finally the problem:

Let's take for example the first vowel "а":
In the Ded Key dialog box in the Base (code point) field I type "а". Then in the Composite (code point) field I type "U+0430 U+0300" and then MSKLC says that "The value must be either a single character or code point." So, this is the problem!

Can you help, how to deal with this.

I've no problem with the two precomposed letters "ѐ" and "ѝ", but the rest ... ;-(

Thank you in advance.
Regards,
Ivan Petrov.

Hmmm.... maybe Ivan was not reading often enough. :-(

The problem that he is reporting on has no solution. As I pointed out back in December of 2004 when I mentioned that Dead keys are not intuitive, and then a few times since then -- the end result of a dead key transaction must be s single UTF-16 code unit.

This is also explained in the MSKLC help file, as is the explanation that the dead key architecture is one that is around for legacy purposes only, and not generally for the creation of new keyboards.

Even if this ever were changed in a future release of Windows, it could not be used on existing versions due to the backcompat break that this would cause -- and the future version of MSKLC would have to support different keyboard layout DLLs for different versions of Windows. Which as I am sure people can imagine is not a terribly popular plan....

For solutions, there are two obvious ones:

Either of these plans will allow the characters to be supported....

 

This post brought to you by "у" (U+0443, a.k.a. CYRILLIC SMALL LETTER U)


# Ivan Petrov on 28 Mar 2006 4:42 AM:

Thank you Michael for the quick response! :-)

Please, correct 'comining' to 'combining' in the second solution ;-)

Best regards,
Ivan.

# Ivan Petrov on 9 Apr 2006 8:37 AM:

Hi Michael.

How do you think, is the above question a good reason to be proposed for encoding in Unicode in the Precomposed form the following grave stressed vowels in the Bulgarian language?:

а, о, у, ъ, ю, я
А, О, У, Ъ, Ю, Я


As you know from my previous posts, they're needed for the Bulgarian written language, see:

1.(see the comments)
How does Microsoft assign new collation weights?
http://blogs.msdn.com/michkap/archive/2005/09/12/463483.aspx

2.(see the whole post)
Can I get my characters into Unicode?
http://blogs.msdn.com/michkap/archive/2005/02/06/367985.aspx

Regards,
Ivan.

# Michael S. Kaplan on 9 Apr 2006 9:47 AM:

Given the fact that dead keys are a legacy technology, I think it would be a uphill battle....

# Ivan Petrov on 9 Apr 2006 10:23 AM:

Ok, thanks again Michael.

One more question:

In the second sollution:

   * You can add the combining character and then type letter plus combining character on the keyboard,

I see something wich bothers me! What I mean? I mean that after the user is typing a letter, than he can stroke as many times as he wish the key on wich is assigned the combining character (in our case the grave accent). Visually we will have a letter and grave accent, but in practice there will be a letter plus many grave accents! And also one more fact: as we've a key on which is assigned a combining character (in our case the grave accent), then the user can type every letter wich supports the keyboard layot plus the combining character! This is undesired in our case, because we want to type only the grave accented Bulgaraian vowels.

So can you suggest how to deal with this issue if I choose to use the second sollution you've proposed?

Thank you in advance.
Best regards,
Ivan.

# Michael S. Kaplan on 9 Apr 2006 11:01 AM:

Well, I have talked about stacked diacritics in the past.

But I do not believe it is common that people will type a letter, a diacritic, and then keep typing diacritics -- once they get what they want they move on to the next character.

People are much more likely to hit a dead key, see nothing, and so type the dead key again -- which will cause them to see the wrong thing. I have seen people do it, and think it would be a much more common problem from a usability standpoint.

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.

referenced by

2010/09/28 Like one of those standards that can't/won't be fully implemented

2009/06/18 Those keys aren't going to be extended; they're dead!

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