https://git.reactos.org/?p=reactos.git;a=commitdiff;h=89f36bcfc85183b520a94…
commit 89f36bcfc85183b520a9426f7b86fa6381113176
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sun Dec 27 00:38:36 2020 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Dec 27 00:52:01 2020 +0100
[CONSRV] Less hardcoded magic values.
---
win32ss/user/winsrv/consrv/frontends/gui/conwnd.c | 2 +-
win32ss/user/winsrv/consrv/frontends/input.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
b/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
index 8770eca88ab..de9eea6053a 100644
--- a/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
+++ b/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
@@ -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 */
diff --git a/win32ss/user/winsrv/consrv/frontends/input.c
b/win32ss/user/winsrv/consrv/frontends/input.c
index 053e2006efb..5305e1091a2 100644
--- a/win32ss/user/winsrv/consrv/frontends/input.c
+++ b/win32ss/user/winsrv/consrv/frontends/input.c
@@ -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