[CONSRV] Less hardcoded magic values.

This commit is contained in:
Hermès Bélusca-Maïto 2020-12-27 00:38:36 +01:00
parent a748350fc9
commit 89f36bcfc8
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 3 additions and 3 deletions

View file

@ -1903,7 +1903,7 @@ OnMouse(PGUI_CONSOLE_DATA GuiData, UINT msg, WPARAM wParam, LPARAM lParam)
if (GetKeyState(VK_CAPITAL) & KEY_TOGGLED)
dwControlKeyState |= CAPSLOCK_ON;
/* See WM_CHAR MSDN documentation for instance */
if (lParam & 0x01000000)
if (HIWORD(lParam) & KF_EXTENDED)
dwControlKeyState |= ENHANCED_KEY;
/* Send a mouse event */

View file

@ -50,7 +50,7 @@ ConioGetShiftState(PBYTE KeyState, LPARAM lParam)
// if (KeyState[VK_MENU] & 0x80) { ... }
/* See WM_CHAR MSDN documentation for instance */
if (lParam & 0x01000000)
if (HIWORD(lParam) & KF_EXTENDED)
ssOut |= ENHANCED_KEY;
return ssOut;
@ -68,7 +68,7 @@ ConioProcessKey(PCONSRV_CONSOLE Console, MSG* msg)
WCHAR UnicodeChar;
UINT VirtualKeyCode;
UINT VirtualScanCode;
BOOL Down = FALSE;
BOOL Down;
BOOLEAN Fake; // Synthesized, not a real event
BOOLEAN NotChar; // Message should not be used to return a character