--- wine/windows/input.c 2003-05-11 08:27:59.000000000 +0200 +++ mywine/windows/input.c 2003-05-28 11:39:03.000000000 +0200 @@ -54,6 +54,7 @@ BYTE InputKeyStateTable[256]; BYTE AsyncKeyStateTable[256]; +BYTE SysCharacter = 0; /* Storage for the USER-maintained mouse positions */ static DWORD PosX, PosY; @@ -151,8 +152,12 @@ if (ki->dwFlags & KEYEVENTF_KEYUP ) { - BOOL sysKey = (InputKeyStateTable[VK_MENU] & 0x80) && - !(InputKeyStateTable[VK_CONTROL] & 0x80); + BOOL sysKey = FALSE; + if( (InputKeyStateTable[VK_MENU] & 0x80) && !(InputKeyStateTable[VK_CONTROL] & 0x80)) { + if( SysCharacter == VK_MENU || (ki->wVk != VK_MENU)) + sysKey = TRUE; + SysCharacter = 0; + } InputKeyStateTable[ki->wVk] &= ~0x80; keylp.lp1.previous = 1; keylp.lp1.transition = 1; @@ -166,8 +171,13 @@ InputKeyStateTable[ki->wVk] |= 0x80; AsyncKeyStateTable[ki->wVk] |= 0x80; - message = (InputKeyStateTable[VK_MENU] & 0x80) && !(InputKeyStateTable[VK_CONTROL] & 0x80) - ? WM_SYSKEYDOWN : WM_KEYDOWN; + if( (InputKeyStateTable[VK_MENU] & 0x80) && !(InputKeyStateTable[VK_CONTROL] & 0x80)) { + message = WM_SYSKEYDOWN; + SysCharacter = ki->wVk; + } else { + message = WM_KEYDOWN; + /* SysCharacter = 0; */ + } } keylp.lp1.context = (InputKeyStateTable[VK_MENU] & 0x80) != 0; /* 1 if alt */