From 00e3ba0f99b3ef1b228612ce22952dbb232aded9 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 7 Jan 2001 18:28:01 +0000 Subject: [PATCH] Kestutis Kupciunas's Lithuanian-friendliness patch to TranslateKey git-svn-id: svn://svn.tartarus.org/sgt/putty@847 cda61777-01e9-0310-a592-d414129be87e --- window.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/window.c b/window.c index 14ab3d69..b2bd490a 100644 --- a/window.c +++ b/window.c @@ -1890,10 +1890,12 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, int r, i, code; unsigned char * p = output; + HKL kbd_layout = GetKeyboardLayout(0); + static WORD keys[3]; static int compose_char = 0; static WPARAM compose_key = 0; - + r = GetKeyboardState(keystate); if (!r) memset(keystate, 0, sizeof(keystate)); else @@ -1926,7 +1928,7 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, debug(("*")); debug((", S%02x", scan=(HIWORD(lParam) & 0xFF) )); - ch = MapVirtualKey(wParam, 2); + ch = MapVirtualKeyEx(wParam, 2, kbd_layout); if (ch>=' ' && ch<='~') debug((", '%c'", ch)); else if (ch) debug((", $%02x", ch)); @@ -2310,7 +2312,7 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, if(cfg.xlat_capslockcyr) keystate[VK_CAPITAL] = 0; - r = ToAscii (wParam, scan, keystate, keys, 0); + r = ToAsciiEx(wParam, scan, keystate, keys, 0, kbd_layout); if(r>0) { p = output; -- 2.11.0