Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / include / ddk / ntddkbd.h
blob93bc690b5c84067cd20a81fa47d321eb4a64a673
1 /*
2 * ntddkbd.h
4 * Keyboard IOCTL interface
6 * This file is part of the w32api package.
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 #ifndef __NTDDKBD_H
24 #define __NTDDKBD_H
26 #if __GNUC__ >=3
27 #pragma GCC system_header
28 #endif
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 #include "ntddk.h"
36 #define DD_KEYBOARD_DEVICE_NAME "\\Device\\KeyboardClass"
37 #define DD_KEYBOARD_DEVICE_NAME_U L"\\Device\\KeyboardClass"
39 #define IOCTL_KEYBOARD_QUERY_ATTRIBUTES \
40 CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0000, METHOD_BUFFERED, FILE_ANY_ACCESS)
42 #define IOCTL_KEYBOARD_QUERY_INDICATORS \
43 CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS)
45 #define IOCTL_KEYBOARD_QUERY_INDICATOR_TRANSLATION \
46 CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0020, METHOD_BUFFERED, FILE_ANY_ACCESS)
48 #define IOCTL_KEYBOARD_QUERY_TYPEMATIC \
49 CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0008, METHOD_BUFFERED, FILE_ANY_ACCESS)
51 #define IOCTL_KEYBOARD_SET_TYPEMATIC \
52 CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0001, METHOD_BUFFERED, FILE_ANY_ACCESS)
54 #define IOCTL_KEYBOARD_SET_INDICATORS \
55 CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0002, METHOD_BUFFERED, FILE_ANY_ACCESS)
58 DEFINE_GUID(GUID_DEVINTERFACE_KEYBOARD, \
59 0x884b96c3, 0x56ef, 0x11d1, 0xbc, 0x8c, 0x00, 0xa0, 0xc9, 0x14, 0x05, 0xdd);
61 #define KEYBOARD_ERROR_VALUE_BASE 10000
63 /* KEYBOARD_INPUT_DATA.MakeCode constants */
64 #define KEYBOARD_OVERRUN_MAKE_CODE 0xFF
66 /* KEYBOARD_INPUT_DATA.Flags constants */
67 #define KEY_MAKE 0
68 #define KEY_BREAK 1
69 #define KEY_E0 2
70 #define KEY_E1 4
72 typedef struct _KEYBOARD_INPUT_DATA {
73 USHORT UnitId;
74 USHORT MakeCode;
75 USHORT Flags;
76 USHORT Reserved;
77 ULONG ExtraInformation;
78 } KEYBOARD_INPUT_DATA, *PKEYBOARD_INPUT_DATA;
81 typedef struct _KEYBOARD_TYPEMATIC_PARAMETERS {
82 USHORT UnitId;
83 USHORT Rate;
84 USHORT Delay;
85 } KEYBOARD_TYPEMATIC_PARAMETERS, *PKEYBOARD_TYPEMATIC_PARAMETERS;
87 typedef struct _KEYBOARD_ID {
88 UCHAR Type;
89 UCHAR Subtype;
90 } KEYBOARD_ID, *PKEYBOARD_ID;
92 #define ENHANCED_KEYBOARD(Id) ((Id).Type == 2 || (Id).Type == 4 || FAREAST_KEYBOARD(Id))
93 #define FAREAST_KEYBOARD(Id) ((Id).Type == 7 || (Id).Type == 8)
95 typedef struct _KEYBOARD_INDICATOR_PARAMETERS {
96 USHORT UnitId;
97 USHORT LedFlags;
98 } KEYBOARD_INDICATOR_PARAMETERS, *PKEYBOARD_INDICATOR_PARAMETERS;
100 typedef struct _INDICATOR_LIST {
101 USHORT MakeCode;
102 USHORT IndicatorFlags;
103 } INDICATOR_LIST, *PINDICATOR_LIST;
105 typedef struct _KEYBOARD_INDICATOR_TRANSLATION {
106 USHORT NumberOfIndicatorKeys;
107 INDICATOR_LIST IndicatorList[1];
108 } KEYBOARD_INDICATOR_TRANSLATION, *PKEYBOARD_INDICATOR_TRANSLATION;
110 typedef struct _KEYBOARD_ATTRIBUTES {
111 KEYBOARD_ID KeyboardIdentifier;
112 USHORT KeyboardMode;
113 USHORT NumberOfFunctionKeys;
114 USHORT NumberOfIndicators;
115 USHORT NumberOfKeysTotal;
116 ULONG InputDataQueueLength;
117 KEYBOARD_TYPEMATIC_PARAMETERS KeyRepeatMinimum;
118 KEYBOARD_TYPEMATIC_PARAMETERS KeyRepeatMaximum;
119 } KEYBOARD_ATTRIBUTES, *PKEYBOARD_ATTRIBUTES;
121 typedef struct _KEYBOARD_UNIT_ID_PARAMETER {
122 USHORT UnitId;
123 } KEYBOARD_UNIT_ID_PARAMETER, *PKEYBOARD_UNIT_ID_PARAMETER;
125 typedef struct _KEYBOARD_IME_STATUS {
126 USHORT UnitId;
127 ULONG ImeOpen;
128 ULONG ImeConvMode;
129 } KEYBOARD_IME_STATUS, *PKEYBOARD_IME_STATUS;
131 #ifdef __cplusplus
133 #endif
135 #endif /* __NTDDKBD_H */