2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: include/keyboard.h
5 * PURPOSE: Keyboard declarations used by all the parts of the
7 * PROGRAMMER: David Welch <welch@cwcom.net>
13 #ifndef __INCLUDE_KEYBOARD_H
14 #define __INCLUDE_KEYBOARD_H
16 #include <ntos/types.h>
18 /* Virtual Key codes */
58 /* KEY_EVENT_RECORD structure */
59 #define CAPSLOCK_ON (128)
60 #define ENHANCED_KEY (256)
61 #define LEFT_ALT_PRESSED (2)
62 #define LEFT_CTRL_PRESSED (8)
63 #define NUMLOCK_ON (32)
64 #define RIGHT_ALT_PRESSED (1)
65 #define RIGHT_CTRL_PRESSED (4)
66 #define SCROLLLOCK_ON (64)
67 #define SHIFT_PRESSED (16)
69 /* MOUSE_EVENT_RECORD structure */
70 #define FROM_LEFT_1ST_BUTTON_PRESSED (1)
71 #define RIGHTMOST_BUTTON_PRESSED (2)
72 #define FROM_LEFT_2ND_BUTTON_PRESSED (4)
73 #define FROM_LEFT_3RD_BUTTON_PRESSED (8)
74 #define FROM_LEFT_4TH_BUTTON_PRESSED (16)
75 #define DOUBLE_CLICK (2)
76 #define MOUSE_MOVED (1)
78 /* INPUT_RECORD structure */
80 #define MOUSE_EVENT (2)
81 #define WINDOW_BUFFER_SIZE_EVENT (4)
82 #define MENU_EVENT (8)
83 #define FOCUS_EVENT (16)
86 typedef struct _KEY_EVENT_RECORD
91 WORD wVirtualScanCode;
97 DWORD dwControlKeyState;
98 } KEY_EVENT_RECORD PACKED;
100 typedef struct _MOUSE_EVENT_RECORD
102 COORD dwMousePosition;
104 DWORD dwControlKeyState;
106 } MOUSE_EVENT_RECORD;
108 typedef struct _WINDOW_BUFFER_SIZE_RECORD
111 } WINDOW_BUFFER_SIZE_RECORD;
113 typedef struct _MENU_EVENT_RECORD
116 } MENU_EVENT_RECORD, *PMENU_EVENT_RECORD;
118 typedef struct _FOCUS_EVENT_RECORD
121 } FOCUS_EVENT_RECORD;
123 typedef struct _INPUT_RECORD
129 /* this will be the wrong size in c++ */
130 KEY_EVENT_RECORD KeyEvent;
132 MOUSE_EVENT_RECORD MouseEvent;
133 WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
134 MENU_EVENT_RECORD MenuEvent;
135 FOCUS_EVENT_RECORD FocusEvent;
137 } INPUT_RECORD, *PINPUT_RECORD;
139 /* Virtual Key codes */
140 #define VK_LBUTTON (1)
141 #define VK_RBUTTON (2)
142 #define VK_CANCEL (3)
143 #define VK_MBUTTON (4)
146 #define VK_CLEAR (12)
147 #define VK_RETURN (13)
148 #define VK_SHIFT (16)
149 #define VK_CONTROL (17)
151 #define VK_PAUSE (19)
152 #define VK_CAPITAL (20)
153 #define VK_ESCAPE (27)
154 #define VK_SPACE (32)
155 #define VK_PRIOR (33)
161 #define VK_RIGHT (39)
163 #define VK_SELECT (41)
164 #define VK_PRINT (42)
165 #define VK_EXECUTE (43)
166 #define VK_SNAPSHOT (44)
167 #define VK_INSERT (45)
168 #define VK_DELETE (46)
170 #define VK_NUMPAD0 (96)
171 #define VK_NUMPAD1 (97)
172 #define VK_NUMPAD2 (98)
173 #define VK_NUMPAD3 (99)
174 #define VK_NUMPAD4 (100)
175 #define VK_NUMPAD5 (101)
176 #define VK_NUMPAD6 (102)
177 #define VK_NUMPAD7 (103)
178 #define VK_NUMPAD8 (104)
179 #define VK_NUMPAD9 (105)
180 #define VK_MULTIPLY (106)
182 #define VK_SEPARATOR (108)
183 #define VK_SUBTRACT (109)
184 #define VK_DECIMAL (110)
185 #define VK_DIVIDE (111)
211 /* GetAsyncKeyState */
212 #define VK_NUMLOCK (144)
213 #define VK_SCROLL (145)
214 #define VK_LSHIFT (160)
215 #define VK_LCONTROL (162)
216 #define VK_LMENU (164)
217 #define VK_RSHIFT (161)
218 #define VK_RCONTROL (163)
219 #define VK_RMENU (165)
221 #endif /* !__USE_W32API */
223 #endif /* __INCLUDE_KEYBOARD_H */