1 | /*
|
---|
2 | * X11 keyboard driver definitions to use it outside wine
|
---|
3 | *
|
---|
4 | * This library is free software; you can redistribute it and/or
|
---|
5 | * modify it under the terms of the GNU Lesser General Public
|
---|
6 | * License as published by the Free Software Foundation; either
|
---|
7 | * version 2.1 of the License, or (at your option) any later version.
|
---|
8 | *
|
---|
9 | * This library is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
12 | * Lesser General Public License for more details.
|
---|
13 | *
|
---|
14 | * You should have received a copy of the GNU Lesser General Public
|
---|
15 | * License along with this library; if not, write to the Free Software
|
---|
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | #ifndef __H_KEYBOARD_OUTOFWINE
|
---|
20 | #define __H_KEYBOARD_OUTOFWINE
|
---|
21 |
|
---|
22 | // type definitions
|
---|
23 | typedef unsigned char BYTE, *LPBYTE;
|
---|
24 | typedef unsigned short WORD;
|
---|
25 | typedef unsigned long DWORD;
|
---|
26 | typedef unsigned int UINT;
|
---|
27 | typedef long BOOL;
|
---|
28 | typedef DWORD LCID;
|
---|
29 | typedef void *HWND;
|
---|
30 |
|
---|
31 | #define FALSE 0
|
---|
32 | #define TRUE 1
|
---|
33 |
|
---|
34 | // debug macros
|
---|
35 | #define TRACE
|
---|
36 | //#define TRACE printf
|
---|
37 | #define TRACE_(a)
|
---|
38 | //#define TRACE_(ch) printf
|
---|
39 | #define TRACE_ON(a) 0
|
---|
40 | #define WARN
|
---|
41 | #define ERR
|
---|
42 |
|
---|
43 | // @@@AH do we need semaphore protection?
|
---|
44 | #define wine_tsx11_lock(a)
|
---|
45 | #define wine_tsx11_unlock(a)
|
---|
46 |
|
---|
47 | // global wine defines
|
---|
48 | #define HAVE_XKB
|
---|
49 |
|
---|
50 | //
|
---|
51 | // x11drv.h
|
---|
52 | //
|
---|
53 |
|
---|
54 |
|
---|
55 | //
|
---|
56 | // user.h
|
---|
57 | //
|
---|
58 |
|
---|
59 |
|
---|
60 | //
|
---|
61 | // winuser.h
|
---|
62 | //
|
---|
63 |
|
---|
64 |
|
---|
65 | /* WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags */
|
---|
66 | #define KF_EXTENDED 0x0100
|
---|
67 | #define KF_DLGMODE 0x0800
|
---|
68 | #define KF_MENUMODE 0x1000
|
---|
69 | #define KF_ALTDOWN 0x2000
|
---|
70 | #define KF_REPEAT 0x4000
|
---|
71 | #define KF_UP 0x8000
|
---|
72 |
|
---|
73 | /* Virtual key codes */
|
---|
74 | #define VK_LBUTTON 0x01
|
---|
75 | #define VK_RBUTTON 0x02
|
---|
76 | #define VK_CANCEL 0x03
|
---|
77 | #define VK_MBUTTON 0x04
|
---|
78 | #define VK_XBUTTON1 0x05
|
---|
79 | #define VK_XBUTTON2 0x06
|
---|
80 | /* 0x07 Undefined */
|
---|
81 | #define VK_BACK 0x08
|
---|
82 | #define VK_TAB 0x09
|
---|
83 | /* 0x0A-0x0B Undefined */
|
---|
84 | #define VK_CLEAR 0x0C
|
---|
85 | #define VK_RETURN 0x0D
|
---|
86 | /* 0x0E-0x0F Undefined */
|
---|
87 | #define VK_SHIFT 0x10
|
---|
88 | #define VK_CONTROL 0x11
|
---|
89 | #define VK_MENU 0x12
|
---|
90 | #define VK_PAUSE 0x13
|
---|
91 | #define VK_CAPITAL 0x14
|
---|
92 |
|
---|
93 | #define VK_KANA 0x15
|
---|
94 | #define VK_HANGEUL 0x15
|
---|
95 | #define VK_HANGUL 0x15
|
---|
96 | #define VK_JUNJA 0x17
|
---|
97 | #define VK_FINAL 0x18
|
---|
98 | #define VK_HANJA 0x19
|
---|
99 | #define VK_KANJI 0x19
|
---|
100 |
|
---|
101 | /* 0x1A Undefined */
|
---|
102 | #define VK_ESCAPE 0x1B
|
---|
103 |
|
---|
104 | #define VK_CONVERT 0x1C
|
---|
105 | #define VK_NONCONVERT 0x1D
|
---|
106 | #define VK_ACCEPT 0x1E
|
---|
107 | #define VK_MODECHANGE 0x1F
|
---|
108 |
|
---|
109 | #define VK_SPACE 0x20
|
---|
110 | #define VK_PRIOR 0x21
|
---|
111 | #define VK_NEXT 0x22
|
---|
112 | #define VK_END 0x23
|
---|
113 | #define VK_HOME 0x24
|
---|
114 | #define VK_LEFT 0x25
|
---|
115 | #define VK_UP 0x26
|
---|
116 | #define VK_RIGHT 0x27
|
---|
117 | #define VK_DOWN 0x28
|
---|
118 | #define VK_SELECT 0x29
|
---|
119 | #define VK_PRINT 0x2A /* OEM specific in Windows 3.1 SDK */
|
---|
120 | #define VK_EXECUTE 0x2B
|
---|
121 | #define VK_SNAPSHOT 0x2C
|
---|
122 | #define VK_INSERT 0x2D
|
---|
123 | #define VK_DELETE 0x2E
|
---|
124 | #define VK_HELP 0x2F
|
---|
125 | /* VK_0 - VK-9 0x30-0x39 Use ASCII instead */
|
---|
126 | /* 0x3A-0x40 Undefined */
|
---|
127 | /* VK_A - VK_Z 0x41-0x5A Use ASCII instead */
|
---|
128 | #define VK_LWIN 0x5B
|
---|
129 | #define VK_RWIN 0x5C
|
---|
130 | #define VK_APPS 0x5D
|
---|
131 | /* 0x5E Unassigned */
|
---|
132 | #define VK_SLEEP 0x5F
|
---|
133 | #define VK_NUMPAD0 0x60
|
---|
134 | #define VK_NUMPAD1 0x61
|
---|
135 | #define VK_NUMPAD2 0x62
|
---|
136 | #define VK_NUMPAD3 0x63
|
---|
137 | #define VK_NUMPAD4 0x64
|
---|
138 | #define VK_NUMPAD5 0x65
|
---|
139 | #define VK_NUMPAD6 0x66
|
---|
140 | #define VK_NUMPAD7 0x67
|
---|
141 | #define VK_NUMPAD8 0x68
|
---|
142 | #define VK_NUMPAD9 0x69
|
---|
143 | #define VK_MULTIPLY 0x6A
|
---|
144 | #define VK_ADD 0x6B
|
---|
145 | #define VK_SEPARATOR 0x6C
|
---|
146 | #define VK_SUBTRACT 0x6D
|
---|
147 | #define VK_DECIMAL 0x6E
|
---|
148 | #define VK_DIVIDE 0x6F
|
---|
149 | #define VK_F1 0x70
|
---|
150 | #define VK_F2 0x71
|
---|
151 | #define VK_F3 0x72
|
---|
152 | #define VK_F4 0x73
|
---|
153 | #define VK_F5 0x74
|
---|
154 | #define VK_F6 0x75
|
---|
155 | #define VK_F7 0x76
|
---|
156 | #define VK_F8 0x77
|
---|
157 | #define VK_F9 0x78
|
---|
158 | #define VK_F10 0x79
|
---|
159 | #define VK_F11 0x7A
|
---|
160 | #define VK_F12 0x7B
|
---|
161 | #define VK_F13 0x7C
|
---|
162 | #define VK_F14 0x7D
|
---|
163 | #define VK_F15 0x7E
|
---|
164 | #define VK_F16 0x7F
|
---|
165 | #define VK_F17 0x80
|
---|
166 | #define VK_F18 0x81
|
---|
167 | #define VK_F19 0x82
|
---|
168 | #define VK_F20 0x83
|
---|
169 | #define VK_F21 0x84
|
---|
170 | #define VK_F22 0x85
|
---|
171 | #define VK_F23 0x86
|
---|
172 | #define VK_F24 0x87
|
---|
173 | /* 0x88-0x8F Unassigned */
|
---|
174 | #define VK_NUMLOCK 0x90
|
---|
175 | #define VK_SCROLL 0x91
|
---|
176 | #define VK_OEM_NEC_EQUAL 0x92
|
---|
177 | #define VK_OEM_FJ_JISHO 0x92
|
---|
178 | #define VK_OEM_FJ_MASSHOU 0x93
|
---|
179 | #define VK_OEM_FJ_TOUROKU 0x94
|
---|
180 | #define VK_OEM_FJ_LOYA 0x95
|
---|
181 | #define VK_OEM_FJ_ROYA 0x96
|
---|
182 | /* 0x97-0x9F Unassigned */
|
---|
183 | /*
|
---|
184 | * differencing between right and left shift/control/alt key.
|
---|
185 | * Used only by GetAsyncKeyState() and GetKeyState().
|
---|
186 | */
|
---|
187 | #define VK_LSHIFT 0xA0
|
---|
188 | #define VK_RSHIFT 0xA1
|
---|
189 | #define VK_LCONTROL 0xA2
|
---|
190 | #define VK_RCONTROL 0xA3
|
---|
191 | #define VK_LMENU 0xA4
|
---|
192 | #define VK_RMENU 0xA5
|
---|
193 |
|
---|
194 | #define VK_BROWSER_BACK 0xA6
|
---|
195 | #define VK_BROWSER_FORWARD 0xA7
|
---|
196 | #define VK_BROWSER_REFRESH 0xA8
|
---|
197 | #define VK_BROWSER_STOP 0xA9
|
---|
198 | #define VK_BROWSER_SEARCH 0xAA
|
---|
199 | #define VK_BROWSER_FAVORITES 0xAB
|
---|
200 | #define VK_BROWSER_HOME 0xAC
|
---|
201 | #define VK_VOLUME_MUTE 0xAD
|
---|
202 | #define VK_VOLUME_DOWN 0xAE
|
---|
203 | #define VK_VOLUME_UP 0xAF
|
---|
204 | #define VK_MEDIA_NEXT_TRACK 0xB0
|
---|
205 | #define VK_MEDIA_PREV_TRACK 0xB1
|
---|
206 | #define VK_MEDIA_STOP 0xB2
|
---|
207 | #define VK_MEDIA_PLAY_PAUSE 0xB3
|
---|
208 | #define VK_LAUNCH_MAIL 0xB4
|
---|
209 | #define VK_LAUNCH_MEDIA_SELECT 0xB5
|
---|
210 | #define VK_LAUNCH_APP1 0xB6
|
---|
211 | #define VK_LAUNCH_APP2 0xB7
|
---|
212 |
|
---|
213 | /* 0xB8-0xB9 Unassigned */
|
---|
214 | #define VK_OEM_1 0xBA
|
---|
215 | #define VK_OEM_PLUS 0xBB
|
---|
216 | #define VK_OEM_COMMA 0xBC
|
---|
217 | #define VK_OEM_MINUS 0xBD
|
---|
218 | #define VK_OEM_PERIOD 0xBE
|
---|
219 | #define VK_OEM_2 0xBF
|
---|
220 | #define VK_OEM_3 0xC0
|
---|
221 | /* 0xC1-0xDA Unassigned */
|
---|
222 | #define VK_OEM_4 0xDB
|
---|
223 | #define VK_OEM_5 0xDC
|
---|
224 | #define VK_OEM_6 0xDD
|
---|
225 | #define VK_OEM_7 0xDE
|
---|
226 | #define VK_OEM_8 0xDF
|
---|
227 | /* 0xE0 OEM specific */
|
---|
228 | #define VK_OEM_AX 0xE1 /* "AX" key on Japanese AX keyboard */
|
---|
229 | #define VK_OEM_102 0xE2 /* "<>" or "\|" on RT 102-key keyboard */
|
---|
230 | #define VK_ICO_HELP 0xE3 /* Help key on ICO */
|
---|
231 | #define VK_ICO_00 0xE4 /* 00 key on ICO */
|
---|
232 | #define VK_PROCESSKEY 0xE5
|
---|
233 |
|
---|
234 | /* 0xE6 OEM specific */
|
---|
235 | /* 0xE7-0xE8 Unassigned */
|
---|
236 | /* 0xE9-0xF5 OEM specific */
|
---|
237 |
|
---|
238 | #define VK_ATTN 0xF6
|
---|
239 | #define VK_CRSEL 0xF7
|
---|
240 | #define VK_EXSEL 0xF8
|
---|
241 | #define VK_EREOF 0xF9
|
---|
242 | #define VK_PLAY 0xFA
|
---|
243 | #define VK_ZOOM 0xFB
|
---|
244 | #define VK_NONAME 0xFC
|
---|
245 | #define VK_PA1 0xFD
|
---|
246 | #define VK_OEM_CLEAR 0xFE
|
---|
247 |
|
---|
248 | // ...
|
---|
249 |
|
---|
250 | /* keybd_event flags */
|
---|
251 | #define KEYEVENTF_EXTENDEDKEY 0x0001
|
---|
252 | #define KEYEVENTF_KEYUP 0x0002
|
---|
253 |
|
---|
254 | // end of winuser.h
|
---|
255 |
|
---|
256 |
|
---|
257 | #endif // __H_KEYBOARD_OUTOFWINE
|
---|