From: simon Date: Sat, 7 Oct 2000 08:10:32 +0000 (+0000) Subject: Alt-Enter was fouling up on Win95; added explicit handler X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/0c50ef57baa8c64b7983589604346605fd1b5290?hp=a84ca2f5202f30814a7926d49621c872f4444194 Alt-Enter was fouling up on Win95; added explicit handler git-svn-id: svn://svn.tartarus.org/sgt/putty@687 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/window.c b/window.c index de431d62..47ca0893 100644 --- a/window.c +++ b/window.c @@ -1758,10 +1758,10 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, unsigned cha int r, i, code; unsigned char * p = output; -static WORD keys[3]; -static int compose_state = 0; -static int compose_char = 0; -static WPARAM compose_key = 0; + static WORD keys[3]; + static int compose_state = 0; + static int compose_char = 0; + static WPARAM compose_key = 0; r = GetKeyboardState(keystate); if (!r) memset(keystate, 0, sizeof(keystate)); @@ -2072,6 +2072,16 @@ static WPARAM compose_key = 0; return p - output; } } + + /* + * Finally, deal with Return ourselves. (Win95 seems to + * foul it up when Alt is pressed, for some reason.) + */ + if (wParam == VK_RETURN) /* Return */ + { + *p++ = 0x0D; + return p-output; + } } /* Okay we've done everything interesting; let windows deal with