PuTTY semi-bug win-dead-keys

This is a mirror. The primary PuTTY web site can be found here.

Home | Licence | FAQ | Docs | Download | Keys | Links
Mirrors | Updates | Feedback | Changes | Wishlist | Team

summary: Trouble with dead keys on Windows
class: semi-bug: This might or might not be a bug, depending on your precise definition of what a bug is.
difficulty: taxing: Needs external things we don't have (standards, users etc)
priority: medium: This should be fixed one day.
fixed-in: 2004-03-27 (0.55) (0.56) (0.57) (0.58) (0.59) (0.60)

When using a keyboard layout that uses dead keys (such as German, or US International) on Win2K or XP, entering a non-composing sequence (such as a pair of circumflexes), such that the second keypress resulted in two characters, gave the wrong result (the second character was wrong).

Changing the storage behind the lpChar argument of ToAsciiEx from WORD[] to BYTE[], and using a pointer cast, makes it work properly on 2K/XP. (Done as of 2004-03-25.) The documentation isn't clear what type the storage behind the pointer should be, but Googling indicates that this usage is not uncommon.

However, this breaks the same situation in (French and German) Win98SE, which was working OK before with the WORD[] array. (But fixes it for French Win2K.) The storage of the array is conditionalised on Windows version as of 2004-03-27. *crosses fingers*

This area is rich in history. For example:

I've got a horrible suspicion that it's not as simple as a Win9x/NT split; this function appears to be an interface to the keyboard driver, and MS's specification of that interface on their website looks unclear to me, so I suspect that whether it's an array of bytes or words is dependent on the keyboard driver in question.

We could in principle try to detect it by initialising the array with unlikely values and seeing what changes. Bleurgh.

This may be the root of some other keyboard problems people have been having, too, if we're lucky. If our hacking in this area makes a difference to you (positive or negative), please let us know.

Audit trail for this semi-bug.


If you want to comment on this web site, see the Feedback page.
(last revision of this bug record was at 2004-11-16 15:27:00 +0000)