]> asedeno.scripts.mit.edu Git - PuTTY_svn.git/commitdiff
AltGr should now work again even when Compose key disabled
authorSimon Tatham <anakin@pobox.com>
Sun, 7 Jan 2001 14:30:00 +0000 (14:30 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 7 Jan 2001 14:30:00 +0000 (14:30 +0000)
git-svn-id: http://svn.tartarus.org/sgt/putty@838 cda61777-01e9-0310-a592-d414129be87e

window.c

index 1568617b00973bdbd7fb578a79a5da23d81679a2..2797c53e262d4075558fbae77c86078c1aa954ae 100644 (file)
--- a/window.c
+++ b/window.c
@@ -1911,11 +1911,14 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
        }
 #endif
 
+       if (wParam == VK_MENU && (HIWORD(lParam)&KF_EXTENDED)) {
+           keystate[VK_RMENU] = keystate[VK_MENU];
+       }
+
        /* Note if AltGr was pressed and if it was used as a compose key */
        if (cfg.compose_key) {
            if (wParam == VK_MENU && (HIWORD(lParam)&KF_EXTENDED))
            {
-               keystate[VK_RMENU] = keystate[VK_MENU];
                if (!compose_state) compose_key = wParam;
            }
            if (wParam == VK_APPS && !compose_state)
@@ -1932,8 +1935,9 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
            }
            else if (compose_state==1 && wParam != VK_CONTROL)
                compose_state = 0;
-       } else
+       } else {
            compose_state = 0;
+       }
 
        /* Nastyness with NUMLock - Shift-NUMLock is left alone though */
        if ( (cfg.funky_type == 3 ||