PuTTY semi-bug win-dead-keys

This is a mirror. Follow this link to find the primary PuTTY web site.

Home | FAQ | Feedback | Licence | Updates | Mirrors | Keys | Links | Team
Download: Stable · Pre-release · Snapshot | Docs | Privacy | Changes | Wishlist

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 4736781f42e99168a2fc792b96141d08ee5d6497 (0.55)

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.


If you want to comment on this web site, see the Feedback page.
Audit trail for this semi-bug.
(last revision of this bug record was at 2017-04-28 16:52:45 +0100)