This repository has been archived by the owner on Oct 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
driver.h
74 lines (54 loc) · 1.39 KB
/
driver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// driver.h
#ifndef _DRIVER_H
# define _DRIVER_H
#if defined(_MSC_VER)
# if defined(_WINNT)
# include <winioctl.h>
/// mayu device file name
# define MAYU_DEVICE_FILE_NAME _T("\\\\.\\MayuDetour1")
///
# define MAYU_DRIVER_NAME _T("mayud")
# elif defined(_WIN95)
///
# define MAYU_DEVICE_FILE_NAME _T("\\\\.\\mayud.vxd")
# endif
# endif
/// Ioctl value
#include "d/ioctl.h"
#include "wintypes.h" // linux and mac
/// derived from w2kddk/inc/ntddkbd.h
class KEYBOARD_INPUT_DATA
{
public:
///
enum
{
/// key release flag
BREAK = 1,
/// extended key flag
E0 = 2,
/// extended key flag
E1 = 4,
/// extended key flag (E0 | E1)
E0E1 = 6,
///
TERMSRV_SET_LED = 8,
/// Define the keyboard overrun MakeCode.
KEYBOARD_OVERRUN_MAKE_CODE_ = 0xFF,
};
public:
/** Unit number. E.g., for \Device\KeyboardPort0 the unit is '0', for
\Device\KeyboardPort1 the unit is '1', and so on. */
USHORT UnitId;
/** The "make" scan code (key depression). */
USHORT MakeCode;
/** The flags field indicates a "break" (key release) and other miscellaneous
scan code information defined above. */
USHORT Flags;
///
USHORT Reserved;
/** Device-specific additional information for the event. */
ULONG ExtraInformation;
};
#endif // !_DRIVER_H