62 static BYTE KeyState[256] = { 0 };
66 static UINT LastVirtualKey = 0;
79 DPRINT1(
"No Active Console!\n");
83 VirtualScanCode =
HIWORD(
msg->lParam) & 0xFF;
92 VirtualKeyCode = LastVirtualKey;
93 UnicodeChar =
msg->wParam;
100 VirtualKeyCode =
msg->wParam;
108 UnicodeChar = (RetChars == 1 ? Chars[0] : 0);
111 Fake = UnicodeChar &&
115 if (NotChar) LastVirtualKey =
msg->wParam;
117 DPRINT(
"CONSRV: %s %s %s %s %02x %02x '%lc' %04x\n",
118 Down ?
"down" :
"up ",
121 Fake ?
"fake" :
"real",
122 NotChar ?
"notc" :
"char",
125 (UnicodeChar >=
L' ') ? UnicodeChar :
L'.',
136 (VirtualKeyCode ==
VK_UP || VirtualKeyCode ==
VK_DOWN) )
141 if (VirtualKeyCode ==
VK_UP)
144 if (
Console->ActiveBuffer->CursorPosition.Y !=
Console->ActiveBuffer->ScreenBufferSize.Y - 1)
146 Console->ActiveBuffer->VirtualY = (
Console->ActiveBuffer->VirtualY +
147 Console->ActiveBuffer->ScreenBufferSize.Y - 1) %
148 Console->ActiveBuffer->ScreenBufferSize.Y;
149 Console->ActiveBuffer->CursorPosition.Y++;
155 if (
Console->ActiveBuffer->CursorPosition.Y != 0)
157 Console->ActiveBuffer->VirtualY = (
Console->ActiveBuffer->VirtualY + 1) %
158 Console->ActiveBuffer->ScreenBufferSize.Y;
159 Console->ActiveBuffer->CursorPosition.Y--;
union _KEY_EVENT_RECORD::@3281 uChar
VOID ConioDrawConsole(PCONSRV_CONSOLE Console)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
#define LEFT_CTRL_PRESSED
#define RIGHT_CTRL_PRESSED
#define RIGHT_ALT_PRESSED
_Check_return_ BOOL WINAPI GetKeyboardState(_Out_writes_(256) PBYTE lpKeyState)
int WINAPI ToUnicodeEx(_In_ UINT wVirtKey, _In_ UINT wScanCode, _In_reads_bytes_(256) CONST BYTE *lpKeyState, _Out_writes_(cchBuff) LPWSTR pwszBuff, _In_ int cchBuff, _In_ UINT wFlags, _In_opt_ HKL dwhkl)