#include <usetup.h>
#include "keytrans.h"
#include <debug.h>
Go to the source code of this file.
◆ NDEBUG
◆ PSCANTOASCII
◆ SCANTOASCII
◆ IntAsciiFromInput()
Definition at line 376 of file keytrans.c.
377{
380
382
390 } else {
392 }
393 }
394
397
400
402 }
404 }
405
406 return 0;
407}
SCANTOASCII ScanToAscii[]
static LARGE_INTEGER Counter
Referenced by IntTranslateKey().
◆ IntTranslateKey()
Definition at line 417 of file keytrans.c.
418{
419 static DWORD dwControlKeyState;
420
422
425 else
427
428 Event->wRepeatCount = 1;
430
432
434 Event->dwControlKeyState = dwControlKeyState;
435
438
440 Event->dwControlKeyState);
441
443
444 if (
Event->bKeyDown) {
445 Event->uChar.AsciiChar =
447 Event->dwControlKeyState);
449 } else {
450 Event->uChar.AsciiChar = 0;
451 }
452
454}
static void IntUpdateControlKeyState(HANDLE hConsoleInput, LPDWORD State, PKEYBOARD_INPUT_DATA InputData)
static UCHAR IntAsciiFromInput(PKEYBOARD_INPUT_DATA InputData, DWORD KeyState)
static DWORD IntVKFromKbdInput(PKEYBOARD_INPUT_DATA InputData, DWORD KeyState)
#define RtlZeroMemory(Destination, Length)
Referenced by PeekConsoleInput(), and ReadConsoleInput().
◆ IntUpdateControlKeyState()
Definition at line 251 of file keytrans.c.
252{
254 DWORD oldState, newState;
255
257 return;
258
259 oldState = newState = *
State;
260
263 case 0x2a:
264 case 0x36:
266 break;
267
268 case 0x1d:
270 break;
271
272 case 0x38:
274 break;
275
276 case 0x3A:
279 break;
280
281 case 0x45:
284 break;
285
286 case 0x46:
289 break;
290
291 default:
292 return;
293 }
294 } else {
296 case 0x1d:
298 break;
299
300 case 0x38:
302 break;
303
304 default:
305 return;
306 }
307 }
308
309
311 {
315
318
321
324
327
328
330
332 hConsoleInput,
338 &kip,
339 sizeof(kip),
341 0);
342
344 {
345 DPRINT1(
"NtDeviceIoControlFile(IOCTL_KEYBOARD_SET_INDICATORS) failed (Status %lx)\n",
Status);
346 }
347 } else
348
351 else
353
355}
#define NT_SUCCESS(StatCode)
static OUT PIO_STATUS_BLOCK IoStatusBlock
NTSYSAPI NTSTATUS NTAPI NtDeviceIoControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
#define KEYBOARD_CAPS_LOCK_ON
#define IOCTL_KEYBOARD_SET_INDICATORS
#define KEYBOARD_SCROLL_LOCK_ON
#define KEYBOARD_NUM_LOCK_ON
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
#define LEFT_CTRL_PRESSED
#define RIGHT_CTRL_PRESSED
#define RIGHT_ALT_PRESSED
Referenced by IntTranslateKey().
◆ IntVKFromKbdInput()
Definition at line 358 of file keytrans.c.
359{
363 DPRINT(
"Numlock, using %x\n",
366 }
369 }
370
373}
static WORD KeyTableEnhanced[]
static WORD KeyTableNumlock[]
Referenced by IntTranslateKey().
◆ KeyTable
◆ KeyTableEnhanced
◆ KeyTableNumlock
◆ ScanToAscii