1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Fix from Thomas Henlich for bug in dead key support. I've reproduced the

problem and verified the fix on Win2K with the US-International keyboard layout.
(Closes: `win-dead-keys')
<20040323143836.GA40414@rcs.urz.tu-dresden.de>

[originally from svn r3963]
This commit is contained in:
Jacob Nevins 2004-03-24 14:53:51 +00:00
parent c4bfa9b7b7
commit aa07666cc1

View File

@ -3170,7 +3170,8 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
HKL kbd_layout = GetKeyboardLayout(0);
static WORD keys[3];
/* keys is for ToAsciiEx; XXX do we know how big this needs to be? */
static BYTE keys[3];
static int compose_char = 0;
static WPARAM compose_key = 0;
@ -3861,7 +3862,12 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
keystate[VK_CAPITAL] = 0;
}
r = ToAsciiEx(wParam, scan, keystate, keys, 0, kbd_layout);
/* 'keys' parameter is declared in MSDN documentation as
* 'LPWORD lpChar'. In 0.54 and below we took that to mean that
* 'keys' should be an array of WORD, but an array of BYTE works
* better on keyboard with dead keys, at least for Win2K/US-
* International and WinXP/German. Bletch. */
r = ToAsciiEx(wParam, scan, keystate, (LPWORD)keys, 0, kbd_layout);
#ifdef SHOW_TOASCII_RESULT
if (r == 1 && !key_down) {
if (alt_sum) {