1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #include <QtTest/qtestcase.h> |
5 | #include <QtTest/qtestassert.h> |
6 | |
7 | QT_BEGIN_NAMESPACE |
8 | |
9 | /*! \internal |
10 | Convert an ascii char key value to a Qt Key value. |
11 | If the key is unknown a 0 is returned. |
12 | |
13 | Note: this may happen more than you like since not all known |
14 | ascii keys _are_ converted already. So feel free to add all the keys you need. |
15 | */ |
16 | Qt::Key QTest::asciiToKey(char ascii) |
17 | { |
18 | switch (static_cast<unsigned char>(ascii)) { |
19 | case 0x08: return Qt::Key_Backspace; |
20 | case 0x09: return Qt::Key_Tab; |
21 | case 0x0b: return Qt::Key_Backtab; |
22 | case 0x0d: return Qt::Key_Return; |
23 | case 0x1b: return Qt::Key_Escape; |
24 | case 0x13: return Qt::Key_Up; |
25 | case 0x15: return Qt::Key_Down; |
26 | case 0x20: return Qt::Key_Space; |
27 | case 0x21: return Qt::Key_Exclam; |
28 | case 0x22: return Qt::Key_QuoteDbl; |
29 | case 0x23: return Qt::Key_NumberSign; |
30 | case 0x24: return Qt::Key_Dollar; |
31 | case 0x25: return Qt::Key_Percent; |
32 | case 0x26: return Qt::Key_Ampersand; |
33 | case 0x27: return Qt::Key_Apostrophe; |
34 | case 0x28: return Qt::Key_ParenLeft; |
35 | case 0x29: return Qt::Key_ParenRight; |
36 | case 0x2a: return Qt::Key_Asterisk; |
37 | case 0x2b: return Qt::Key_Plus; |
38 | case 0x2c: return Qt::Key_Comma; |
39 | case 0x2d: return Qt::Key_Minus; |
40 | case 0x2e: return Qt::Key_Period; |
41 | case 0x2f: return Qt::Key_Slash; |
42 | case 0x30: return Qt::Key_0; |
43 | case 0x31: return Qt::Key_1; |
44 | case 0x32: return Qt::Key_2; |
45 | case 0x33: return Qt::Key_3; |
46 | case 0x34: return Qt::Key_4; |
47 | case 0x35: return Qt::Key_5; |
48 | case 0x36: return Qt::Key_6; |
49 | case 0x37: return Qt::Key_7; |
50 | case 0x38: return Qt::Key_8; |
51 | case 0x39: return Qt::Key_9; |
52 | case 0x3a: return Qt::Key_Colon; |
53 | case 0x3b: return Qt::Key_Semicolon; |
54 | case 0x3c: return Qt::Key_Less; |
55 | case 0x3d: return Qt::Key_Equal; |
56 | case 0x3e: return Qt::Key_Greater; |
57 | case 0x3f: return Qt::Key_Question; |
58 | case 0x40: return Qt::Key_At; |
59 | case 0x41: return Qt::Key_A; |
60 | case 0x42: return Qt::Key_B; |
61 | case 0x43: return Qt::Key_C; |
62 | case 0x44: return Qt::Key_D; |
63 | case 0x45: return Qt::Key_E; |
64 | case 0x46: return Qt::Key_F; |
65 | case 0x47: return Qt::Key_G; |
66 | case 0x48: return Qt::Key_H; |
67 | case 0x49: return Qt::Key_I; |
68 | case 0x4a: return Qt::Key_J; |
69 | case 0x4b: return Qt::Key_K; |
70 | case 0x4c: return Qt::Key_L; |
71 | case 0x4d: return Qt::Key_M; |
72 | case 0x4e: return Qt::Key_N; |
73 | case 0x4f: return Qt::Key_O; |
74 | case 0x50: return Qt::Key_P; |
75 | case 0x51: return Qt::Key_Q; |
76 | case 0x52: return Qt::Key_R; |
77 | case 0x53: return Qt::Key_S; |
78 | case 0x54: return Qt::Key_T; |
79 | case 0x55: return Qt::Key_U; |
80 | case 0x56: return Qt::Key_V; |
81 | case 0x57: return Qt::Key_W; |
82 | case 0x58: return Qt::Key_X; |
83 | case 0x59: return Qt::Key_Y; |
84 | case 0x5a: return Qt::Key_Z; |
85 | case 0x5b: return Qt::Key_BracketLeft; |
86 | case 0x5c: return Qt::Key_Backslash; |
87 | case 0x5d: return Qt::Key_BracketRight; |
88 | case 0x5e: return Qt::Key_AsciiCircum; |
89 | case 0x5f: return Qt::Key_Underscore; |
90 | case 0x60: return Qt::Key_QuoteLeft; |
91 | case 0x61: return Qt::Key_A; |
92 | case 0x62: return Qt::Key_B; |
93 | case 0x63: return Qt::Key_C; |
94 | case 0x64: return Qt::Key_D; |
95 | case 0x65: return Qt::Key_E; |
96 | case 0x66: return Qt::Key_F; |
97 | case 0x67: return Qt::Key_G; |
98 | case 0x68: return Qt::Key_H; |
99 | case 0x69: return Qt::Key_I; |
100 | case 0x6a: return Qt::Key_J; |
101 | case 0x6b: return Qt::Key_K; |
102 | case 0x6c: return Qt::Key_L; |
103 | case 0x6d: return Qt::Key_M; |
104 | case 0x6e: return Qt::Key_N; |
105 | case 0x6f: return Qt::Key_O; |
106 | case 0x70: return Qt::Key_P; |
107 | case 0x71: return Qt::Key_Q; |
108 | case 0x72: return Qt::Key_R; |
109 | case 0x73: return Qt::Key_S; |
110 | case 0x74: return Qt::Key_T; |
111 | case 0x75: return Qt::Key_U; |
112 | case 0x76: return Qt::Key_V; |
113 | case 0x77: return Qt::Key_W; |
114 | case 0x78: return Qt::Key_X; |
115 | case 0x79: return Qt::Key_Y; |
116 | case 0x7a: return Qt::Key_Z; |
117 | case 0x7b: return Qt::Key_BraceLeft; |
118 | case 0x7c: return Qt::Key_Bar; |
119 | case 0x7d: return Qt::Key_BraceRight; |
120 | case 0x7e: return Qt::Key_AsciiTilde; |
121 | |
122 | // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06 |
123 | case 0xa0: return Qt::Key_nobreakspace; |
124 | case 0xa1: return Qt::Key_exclamdown; |
125 | case 0xa2: return Qt::Key_cent; |
126 | case 0xa3: return Qt::Key_sterling; |
127 | case 0xa4: return Qt::Key_currency; |
128 | case 0xa5: return Qt::Key_yen; |
129 | case 0xa6: return Qt::Key_brokenbar; |
130 | case 0xa7: return Qt::Key_section; |
131 | case 0xa8: return Qt::Key_diaeresis; |
132 | case 0xa9: return Qt::Key_copyright; |
133 | case 0xaa: return Qt::Key_ordfeminine; |
134 | case 0xab: return Qt::Key_guillemotleft; |
135 | case 0xac: return Qt::Key_notsign; |
136 | case 0xad: return Qt::Key_hyphen; |
137 | case 0xae: return Qt::Key_registered; |
138 | case 0xaf: return Qt::Key_macron; |
139 | case 0xb0: return Qt::Key_degree; |
140 | case 0xb1: return Qt::Key_plusminus; |
141 | case 0xb2: return Qt::Key_twosuperior; |
142 | case 0xb3: return Qt::Key_threesuperior; |
143 | case 0xb4: return Qt::Key_acute; |
144 | case 0xb5: return Qt::Key_mu; |
145 | case 0xb6: return Qt::Key_paragraph; |
146 | case 0xb7: return Qt::Key_periodcentered; |
147 | case 0xb8: return Qt::Key_cedilla; |
148 | case 0xb9: return Qt::Key_onesuperior; |
149 | case 0xba: return Qt::Key_masculine; |
150 | case 0xbb: return Qt::Key_guillemotright; |
151 | case 0xbc: return Qt::Key_onequarter; |
152 | case 0xbd: return Qt::Key_onehalf; |
153 | case 0xbe: return Qt::Key_threequarters; |
154 | case 0xbf: return Qt::Key_questiondown; |
155 | case 0xc0: return Qt::Key_Agrave; |
156 | case 0xc1: return Qt::Key_Aacute; |
157 | case 0xc2: return Qt::Key_Acircumflex; |
158 | case 0xc3: return Qt::Key_Atilde; |
159 | case 0xc4: return Qt::Key_Adiaeresis; |
160 | case 0xc5: return Qt::Key_Aring; |
161 | case 0xc6: return Qt::Key_AE; |
162 | case 0xc7: return Qt::Key_Ccedilla; |
163 | case 0xc8: return Qt::Key_Egrave; |
164 | case 0xc9: return Qt::Key_Eacute; |
165 | case 0xca: return Qt::Key_Ecircumflex; |
166 | case 0xcb: return Qt::Key_Ediaeresis; |
167 | case 0xcc: return Qt::Key_Igrave; |
168 | case 0xcd: return Qt::Key_Iacute; |
169 | case 0xce: return Qt::Key_Icircumflex; |
170 | case 0xcf: return Qt::Key_Idiaeresis; |
171 | case 0xd0: return Qt::Key_ETH; |
172 | case 0xd1: return Qt::Key_Ntilde; |
173 | case 0xd2: return Qt::Key_Ograve; |
174 | case 0xd3: return Qt::Key_Oacute; |
175 | case 0xd4: return Qt::Key_Ocircumflex; |
176 | case 0xd5: return Qt::Key_Otilde; |
177 | case 0xd6: return Qt::Key_Odiaeresis; |
178 | case 0xd7: return Qt::Key_multiply; |
179 | case 0xd8: return Qt::Key_Ooblique; |
180 | case 0xd9: return Qt::Key_Ugrave; |
181 | case 0xda: return Qt::Key_Uacute; |
182 | case 0xdb: return Qt::Key_Ucircumflex; |
183 | case 0xdc: return Qt::Key_Udiaeresis; |
184 | case 0xdd: return Qt::Key_Yacute; |
185 | case 0xde: return Qt::Key_THORN; |
186 | case 0xdf: return Qt::Key_ssharp; |
187 | case 0xe5: return Qt::Key_Aring; |
188 | case 0xe6: return Qt::Key_AE; |
189 | case 0xf7: return Qt::Key_division; |
190 | case 0xf8: return Qt::Key_Ooblique; |
191 | case 0xff: return Qt::Key_ydiaeresis; |
192 | default: QTEST_ASSERT(false); return Qt::Key(0); |
193 | } |
194 | } |
195 | |
196 | /*! \internal |
197 | Convert a Qt Key to an ascii char value. |
198 | If the Qt key is unknown a 0 is returned. |
199 | |
200 | Note: this may happen more than you like since not all known |
201 | Qt keys _are_ converted already. So feel free to add all the keys you need. |
202 | */ |
203 | char QTest::keyToAscii(Qt::Key key) |
204 | { |
205 | switch (key) { |
206 | case Qt::Key_Backspace: return 0x8; //BS |
207 | case Qt::Key_Tab: return 0x09; // HT |
208 | case Qt::Key_Backtab: return 0x0b; // VT |
209 | case Qt::Key_Enter: |
210 | case Qt::Key_Return: return 0x0d; // CR |
211 | case Qt::Key_Escape: return 0x1b; // ESC |
212 | case Qt::Key_Space: return 0x20; // 7 bit printable ASCII |
213 | case Qt::Key_Exclam: return 0x21; |
214 | case Qt::Key_QuoteDbl: return 0x22; |
215 | case Qt::Key_NumberSign: return 0x23; |
216 | case Qt::Key_Dollar: return 0x24; |
217 | case Qt::Key_Percent: return 0x25; |
218 | case Qt::Key_Ampersand: return 0x26; |
219 | case Qt::Key_Apostrophe: return 0x27; |
220 | case Qt::Key_ParenLeft: return 0x28; |
221 | case Qt::Key_ParenRight: return 0x29; |
222 | case Qt::Key_Asterisk: return 0x2a; |
223 | case Qt::Key_Plus: return 0x2b; |
224 | case Qt::Key_Comma: return 0x2c; |
225 | case Qt::Key_Minus: return 0x2d; |
226 | case Qt::Key_Period: return 0x2e; |
227 | case Qt::Key_Slash: return 0x2f; |
228 | case Qt::Key_0: return 0x30; |
229 | case Qt::Key_1: return 0x31; |
230 | case Qt::Key_2: return 0x32; |
231 | case Qt::Key_3: return 0x33; |
232 | case Qt::Key_4: return 0x34; |
233 | case Qt::Key_5: return 0x35; |
234 | case Qt::Key_6: return 0x36; |
235 | case Qt::Key_7: return 0x37; |
236 | case Qt::Key_8: return 0x38; |
237 | case Qt::Key_9: return 0x39; |
238 | case Qt::Key_Colon: return 0x3a; |
239 | case Qt::Key_Semicolon: return 0x3b; |
240 | case Qt::Key_Less: return 0x3c; |
241 | case Qt::Key_Equal: return 0x3d; |
242 | case Qt::Key_Greater: return 0x3e; |
243 | case Qt::Key_Question: return 0x3f; |
244 | case Qt::Key_At: return 0x40; |
245 | case Qt::Key_A: return 0x61; // 0x41 == 'A', 0x61 == 'a' |
246 | case Qt::Key_B: return 0x62; |
247 | case Qt::Key_C: return 0x63; |
248 | case Qt::Key_D: return 0x64; |
249 | case Qt::Key_E: return 0x65; |
250 | case Qt::Key_F: return 0x66; |
251 | case Qt::Key_G: return 0x67; |
252 | case Qt::Key_H: return 0x68; |
253 | case Qt::Key_I: return 0x69; |
254 | case Qt::Key_J: return 0x6a; |
255 | case Qt::Key_K: return 0x6b; |
256 | case Qt::Key_L: return 0x6c; |
257 | case Qt::Key_M: return 0x6d; |
258 | case Qt::Key_N: return 0x6e; |
259 | case Qt::Key_O: return 0x6f; |
260 | case Qt::Key_P: return 0x70; |
261 | case Qt::Key_Q: return 0x71; |
262 | case Qt::Key_R: return 0x72; |
263 | case Qt::Key_S: return 0x73; |
264 | case Qt::Key_T: return 0x74; |
265 | case Qt::Key_U: return 0x75; |
266 | case Qt::Key_V: return 0x76; |
267 | case Qt::Key_W: return 0x77; |
268 | case Qt::Key_X: return 0x78; |
269 | case Qt::Key_Y: return 0x79; |
270 | case Qt::Key_Z: return 0x7a; |
271 | case Qt::Key_BracketLeft: return 0x5b; |
272 | case Qt::Key_Backslash: return 0x5c; |
273 | case Qt::Key_BracketRight: return 0x5d; |
274 | case Qt::Key_AsciiCircum: return 0x5e; |
275 | case Qt::Key_Underscore: return 0x5f; |
276 | case Qt::Key_QuoteLeft: return 0x60; |
277 | |
278 | case Qt::Key_BraceLeft: return 0x7b; |
279 | case Qt::Key_Bar: return 0x7c; |
280 | case Qt::Key_BraceRight: return 0x7d; |
281 | case Qt::Key_AsciiTilde: return 0x7e; |
282 | |
283 | case Qt::Key_Delete: return 0; |
284 | case Qt::Key_Insert: return 0; // = 0x1006, |
285 | case Qt::Key_Pause: return 0; // = 0x1008, |
286 | case Qt::Key_Print: return 0; // = 0x1009, |
287 | case Qt::Key_SysReq: return 0; // = 0x100a, |
288 | |
289 | case Qt::Key_Clear: return 0; // = 0x100b, |
290 | |
291 | case Qt::Key_Home: return 0; // = 0x1010, // cursor movement |
292 | case Qt::Key_End: return 0; // = 0x1011, |
293 | case Qt::Key_Left: return 0; // = 0x1012, |
294 | case Qt::Key_Up: return 0; // = 0x1013, |
295 | case Qt::Key_Right: return 0; // = 0x1014, |
296 | case Qt::Key_Down: return 0; // = 0x1015, |
297 | case Qt::Key_PageUp: return 0; // = 0x1016, |
298 | case Qt::Key_PageDown: return 0; // = 0x1017, |
299 | case Qt::Key_Shift: return 0; // = 0x1020, // modifiers |
300 | case Qt::Key_Control: return 0; // = 0x1021, |
301 | case Qt::Key_Meta: return 0; // = 0x1022, |
302 | case Qt::Key_Alt: return 0; // = 0x1023, |
303 | case Qt::Key_CapsLock: return 0; // = 0x1024, |
304 | case Qt::Key_NumLock: return 0; // = 0x1025, |
305 | case Qt::Key_ScrollLock: return 0; // = 0x1026, |
306 | case Qt::Key_F1: return 0; // = 0x1030, // function keys |
307 | case Qt::Key_F2: return 0; // = 0x1031, |
308 | case Qt::Key_F3: return 0; // = 0x1032, |
309 | case Qt::Key_F4: return 0; // = 0x1033, |
310 | case Qt::Key_F5: return 0; // = 0x1034, |
311 | case Qt::Key_F6: return 0; // = 0x1035, |
312 | case Qt::Key_F7: return 0; // = 0x1036, |
313 | case Qt::Key_F8: return 0; // = 0x1037, |
314 | case Qt::Key_F9: return 0; // = 0x1038, |
315 | case Qt::Key_F10: return 0; // = 0x1039, |
316 | case Qt::Key_F11: return 0; // = 0x103a, |
317 | case Qt::Key_F12: return 0; // = 0x103b, |
318 | case Qt::Key_F13: return 0; // = 0x103c, |
319 | case Qt::Key_F14: return 0; // = 0x103d, |
320 | case Qt::Key_F15: return 0; // = 0x103e, |
321 | case Qt::Key_F16: return 0; // = 0x103f, |
322 | case Qt::Key_F17: return 0; // = 0x1040, |
323 | case Qt::Key_F18: return 0; // = 0x1041, |
324 | case Qt::Key_F19: return 0; // = 0x1042, |
325 | case Qt::Key_F20: return 0; // = 0x1043, |
326 | case Qt::Key_F21: return 0; // = 0x1044, |
327 | case Qt::Key_F22: return 0; // = 0x1045, |
328 | case Qt::Key_F23: return 0; // = 0x1046, |
329 | case Qt::Key_F24: return 0; // = 0x1047, |
330 | case Qt::Key_F25: return 0; // = 0x1048, // F25 .. F35 only on X11 |
331 | case Qt::Key_F26: return 0; // = 0x1049, |
332 | case Qt::Key_F27: return 0; // = 0x104a, |
333 | case Qt::Key_F28: return 0; // = 0x104b, |
334 | case Qt::Key_F29: return 0; // = 0x104c, |
335 | case Qt::Key_F30: return 0; // = 0x104d, |
336 | case Qt::Key_F31: return 0; // = 0x104e, |
337 | case Qt::Key_F32: return 0; // = 0x104f, |
338 | case Qt::Key_F33: return 0; // = 0x1050, |
339 | case Qt::Key_F34: return 0; // = 0x1051, |
340 | case Qt::Key_F35: return 0; // = 0x1052, |
341 | case Qt::Key_Super_L: return 0; // = 0x1053, // extra keys |
342 | case Qt::Key_Super_R: return 0; // = 0x1054, |
343 | case Qt::Key_Menu: return 0; // = 0x1055, |
344 | case Qt::Key_Hyper_L: return 0; // = 0x1056, |
345 | case Qt::Key_Hyper_R: return 0; // = 0x1057, |
346 | case Qt::Key_Help: return 0; // = 0x1058, |
347 | case Qt::Key_Direction_L: return 0; // = 0x1059, |
348 | case Qt::Key_Direction_R: return 0; // = 0x1060, |
349 | |
350 | // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06 |
351 | case Qt::Key_nobreakspace: return char(0xa0); |
352 | case Qt::Key_exclamdown: return char(0xa1); |
353 | case Qt::Key_cent: return char(0xa2); |
354 | case Qt::Key_sterling: return char(0xa3); |
355 | case Qt::Key_currency: return char(0xa4); |
356 | case Qt::Key_yen: return char(0xa5); |
357 | case Qt::Key_brokenbar: return char(0xa6); |
358 | case Qt::Key_section: return char(0xa7); |
359 | case Qt::Key_diaeresis: return char(0xa8); |
360 | case Qt::Key_copyright: return char(0xa9); |
361 | case Qt::Key_ordfeminine: return char(0xaa); |
362 | case Qt::Key_guillemotleft: return char(0xab); // left angle quotation mar |
363 | case Qt::Key_notsign: return char(0xac); |
364 | case Qt::Key_hyphen: return char(0xad); |
365 | case Qt::Key_registered: return char(0xae); |
366 | case Qt::Key_macron: return char(0xaf); |
367 | case Qt::Key_degree: return char(0xb0); |
368 | case Qt::Key_plusminus: return char(0xb1); |
369 | case Qt::Key_twosuperior: return char(0xb2); |
370 | case Qt::Key_threesuperior: return char(0xb3); |
371 | case Qt::Key_acute: return char(0xb4); |
372 | case Qt::Key_mu: return char(0xb5); |
373 | case Qt::Key_paragraph: return char(0xb6); |
374 | case Qt::Key_periodcentered: return char(0xb7); |
375 | case Qt::Key_cedilla: return char(0xb8); |
376 | case Qt::Key_onesuperior: return char(0xb9); |
377 | case Qt::Key_masculine: return char(0xba); |
378 | case Qt::Key_guillemotright: return char(0xbb); // right angle quotation mar |
379 | case Qt::Key_onequarter: return char(0xbc); |
380 | case Qt::Key_onehalf: return char(0xbd); |
381 | case Qt::Key_threequarters: return char(0xbe); |
382 | case Qt::Key_questiondown: return char(0xbf); |
383 | case Qt::Key_Agrave: return char(0xc0); |
384 | case Qt::Key_Aacute: return char(0xc1); |
385 | case Qt::Key_Acircumflex: return char(0xc2); |
386 | case Qt::Key_Atilde: return char(0xc3); |
387 | case Qt::Key_Adiaeresis: return char(0xc4); |
388 | case Qt::Key_Aring: return char(0xe5); |
389 | case Qt::Key_AE: return char(0xe6); |
390 | case Qt::Key_Ccedilla: return char(0xc7); |
391 | case Qt::Key_Egrave: return char(0xc8); |
392 | case Qt::Key_Eacute: return char(0xc9); |
393 | case Qt::Key_Ecircumflex: return char(0xca); |
394 | case Qt::Key_Ediaeresis: return char(0xcb); |
395 | case Qt::Key_Igrave: return char(0xcc); |
396 | case Qt::Key_Iacute: return char(0xcd); |
397 | case Qt::Key_Icircumflex: return char(0xce); |
398 | case Qt::Key_Idiaeresis: return char(0xcf); |
399 | case Qt::Key_ETH: return char(0xd0); |
400 | case Qt::Key_Ntilde: return char(0xd1); |
401 | case Qt::Key_Ograve: return char(0xd2); |
402 | case Qt::Key_Oacute: return char(0xd3); |
403 | case Qt::Key_Ocircumflex: return char(0xd4); |
404 | case Qt::Key_Otilde: return char(0xd5); |
405 | case Qt::Key_Odiaeresis: return char(0xd6); |
406 | case Qt::Key_multiply: return char(0xd7); |
407 | case Qt::Key_Ooblique: return char(0xf8); |
408 | case Qt::Key_Ugrave: return char(0xd9); |
409 | case Qt::Key_Uacute: return char(0xda); |
410 | case Qt::Key_Ucircumflex: return char(0xdb); |
411 | case Qt::Key_Udiaeresis: return char(0xdc); |
412 | case Qt::Key_Yacute: return char(0xdd); |
413 | case Qt::Key_THORN: return char(0xde); |
414 | case Qt::Key_ssharp: return char(0xdf); |
415 | case Qt::Key_division: return char(0xf7); |
416 | case Qt::Key_ydiaeresis: return char(0xff); |
417 | |
418 | // multimedia/internet keys - ignored by default - see QKeyEvent c'tor |
419 | |
420 | case Qt::Key_Back : return 0; // = 0x1061, |
421 | case Qt::Key_Forward : return 0; // = 0x1062, |
422 | case Qt::Key_Stop : return 0; // = 0x1063, |
423 | case Qt::Key_Refresh : return 0; // = 0x1064, |
424 | |
425 | case Qt::Key_VolumeDown: return 0; // = 0x1070, |
426 | case Qt::Key_VolumeMute : return 0; // = 0x1071, |
427 | case Qt::Key_VolumeUp: return 0; // = 0x1072, |
428 | case Qt::Key_BassBoost: return 0; // = 0x1073, |
429 | case Qt::Key_BassUp: return 0; // = 0x1074, |
430 | case Qt::Key_BassDown: return 0; // = 0x1075, |
431 | case Qt::Key_TrebleUp: return 0; // = 0x1076, |
432 | case Qt::Key_TrebleDown: return 0; // = 0x1077, |
433 | |
434 | case Qt::Key_MediaPlay : return 0; // = 0x1080, |
435 | case Qt::Key_MediaStop : return 0; // = 0x1081, |
436 | case Qt::Key_MediaPrevious : return 0; // = 0x1082, |
437 | case Qt::Key_MediaNext : return 0; // = 0x1083, |
438 | case Qt::Key_MediaRecord: return 0; // = 0x1084, |
439 | |
440 | case Qt::Key_HomePage : return 0; // = 0x1090, |
441 | case Qt::Key_Favorites : return 0; // = 0x1091, |
442 | case Qt::Key_Search : return 0; // = 0x1092, |
443 | case Qt::Key_Standby: return 0; // = 0x1093, |
444 | case Qt::Key_OpenUrl: return 0; // = 0x1094, |
445 | |
446 | case Qt::Key_LaunchMail : return 0; // = 0x10a0, |
447 | case Qt::Key_LaunchMedia: return 0; // = 0x10a1, |
448 | case Qt::Key_Launch0 : return 0; // = 0x10a2, |
449 | case Qt::Key_Launch1 : return 0; // = 0x10a3, |
450 | case Qt::Key_Launch2 : return 0; // = 0x10a4, |
451 | case Qt::Key_Launch3 : return 0; // = 0x10a5, |
452 | case Qt::Key_Launch4 : return 0; // = 0x10a6, |
453 | case Qt::Key_Launch5 : return 0; // = 0x10a7, |
454 | case Qt::Key_Launch6 : return 0; // = 0x10a8, |
455 | case Qt::Key_Launch7 : return 0; // = 0x10a9, |
456 | case Qt::Key_Launch8 : return 0; // = 0x10aa, |
457 | case Qt::Key_Launch9 : return 0; // = 0x10ab, |
458 | case Qt::Key_LaunchA : return 0; // = 0x10ac, |
459 | case Qt::Key_LaunchB : return 0; // = 0x10ad, |
460 | case Qt::Key_LaunchC : return 0; // = 0x10ae, |
461 | case Qt::Key_LaunchD : return 0; // = 0x10af, |
462 | case Qt::Key_LaunchE : return 0; // = 0x10b0, |
463 | case Qt::Key_LaunchF : return 0; // = 0x10b1, |
464 | |
465 | // Keypad navigation keys |
466 | case Qt::Key_Select : return 0; // = 0x01010000 |
467 | case Qt::Key_Yes : return 0; // = 0x01010001 |
468 | case Qt::Key_No : return 0; // = 0x01010002 |
469 | |
470 | default: QTEST_ASSERT(false); return 0; |
471 | } |
472 | } |
473 | |
474 | QT_END_NAMESPACE |
475 | |