4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS
19 #include <qnamespace.h>
23 * Return true if the key event is a modifier.
25 bool q_is_modifier(int qkey)
38 // AltGr becomes Key_unknown on at least one keyboard
47 * Return the numeric Qt Key corresponding to the
50 int string_to_qkey(string const & str)
54 if (str == "Escape") return Qt::Key_Escape;
55 if (str == "Tab") return Qt::Key_Tab;
56 if (str == "BackSpace") return Qt::Key_BackSpace;
57 if (str == "Return") return Qt::Key_Return;
58 if (str == "KP_Enter") return Qt::Key_Enter; // correct ?
59 if (str == "Insert") return Qt::Key_Insert;
60 if (str == "KP_Insert") return Qt::Key_Insert;
61 if (str == "Delete") return Qt::Key_Delete;
62 if (str == "KP_Delete") return Qt::Key_Delete;
63 if (str == "Pause") return Qt::Key_Pause;
64 if (str == "Print") return Qt::Key_Print;
65 if (str == "Sys_Req") return Qt::Key_SysReq;
66 if (str == "Home") return Qt::Key_Home;
67 if (str == "End") return Qt::Key_End;
68 if (str == "Left") return Qt::Key_Left;
69 if (str == "Up") return Qt::Key_Up;
70 if (str == "Right") return Qt::Key_Right;
71 if (str == "Down") return Qt::Key_Down;
72 if (str == "Prior") return Qt::Key_Prior;
73 if (str == "Next") return Qt::Key_Next;
74 if (str == "KP_Home") return Qt::Key_Home;
75 if (str == "KP_End") return Qt::Key_End;
76 if (str == "KP_Left") return Qt::Key_Left;
77 if (str == "KP_Up") return Qt::Key_Up;
78 if (str == "KP_Right") return Qt::Key_Right;
79 if (str == "KP_Down") return Qt::Key_Down;
80 if (str == "KP_Prior") return Qt::Key_Prior;
81 if (str == "KP_Next") return Qt::Key_Next;
82 if (str == "Shift_L") return Qt::Key_Shift;
83 if (str == "Control_L") return Qt::Key_Control;
84 if (str == "Alt_L") return Qt::Key_Meta; // correct ?
85 if (str == "Alt_R") return Qt::Key_Alt;
86 if (str == "Caps_Lock") return Qt::Key_CapsLock;
87 if (str == "Num_Lock") return Qt::Key_NumLock;
88 if (str == "Scroll_Lock") return Qt::Key_ScrollLock;
89 if (str == "F1") return Qt::Key_F1;
90 if (str == "F2") return Qt::Key_F2;
91 if (str == "F3") return Qt::Key_F3;
92 if (str == "F4") return Qt::Key_F4;
93 if (str == "F5") return Qt::Key_F5;
94 if (str == "F6") return Qt::Key_F6;
95 if (str == "F7") return Qt::Key_F7;
96 if (str == "F8") return Qt::Key_F8;
97 if (str == "F9") return Qt::Key_F9;
98 if (str == "F10") return Qt::Key_F10;
99 if (str == "F11") return Qt::Key_F11;
100 if (str == "F12") return Qt::Key_F12;
101 if (str == "F13") return Qt::Key_F13;
102 if (str == "F14") return Qt::Key_F14;
103 if (str == "F15") return Qt::Key_F15;
104 if (str == "F16") return Qt::Key_F16;
105 if (str == "F17") return Qt::Key_F17;
106 if (str == "F18") return Qt::Key_F18;
107 if (str == "F19") return Qt::Key_F19;
108 if (str == "F20") return Qt::Key_F20;
109 if (str == "F21") return Qt::Key_F21;
110 if (str == "F22") return Qt::Key_F22;
111 if (str == "F23") return Qt::Key_F23;
112 if (str == "F24") return Qt::Key_F24;
113 if (str == "F25") return Qt::Key_F25;
114 if (str == "F26") return Qt::Key_F26;
115 if (str == "F27") return Qt::Key_F27;
116 if (str == "F28") return Qt::Key_F28;
117 if (str == "F29") return Qt::Key_F29;
118 if (str == "F30") return Qt::Key_F30;
119 if (str == "F31") return Qt::Key_F31;
120 if (str == "F32") return Qt::Key_F32;
121 if (str == "F33") return Qt::Key_F33;
122 if (str == "F34") return Qt::Key_F34;
123 if (str == "F35") return Qt::Key_F35;
124 if (str == "0") return Qt::Key_0;
125 if (str == "1") return Qt::Key_1;
126 if (str == "2") return Qt::Key_2;
127 if (str == "3") return Qt::Key_3;
128 if (str == "4") return Qt::Key_4;
129 if (str == "5") return Qt::Key_5;
130 if (str == "6") return Qt::Key_6;
131 if (str == "7") return Qt::Key_7;
132 if (str == "8") return Qt::Key_8;
133 if (str == "9") return Qt::Key_9;
134 if (str == "colon") return Qt::Key_Colon;
135 if (str == "semicolon") return Qt::Key_Semicolon;
136 if (str == "less") return Qt::Key_Less;
137 if (str == "equal") return Qt::Key_Equal;
138 if (str == "greater") return Qt::Key_Greater;
139 if (str == "question") return Qt::Key_Question;
140 if (str == "at") return Qt::Key_At;
141 if (str == "A") return Qt::Key_A;
142 if (str == "B") return Qt::Key_B;
143 if (str == "C") return Qt::Key_C;
144 if (str == "D") return Qt::Key_D;
145 if (str == "E") return Qt::Key_E;
146 if (str == "F") return Qt::Key_F;
147 if (str == "G") return Qt::Key_G;
148 if (str == "H") return Qt::Key_H;
149 if (str == "I") return Qt::Key_I;
150 if (str == "J") return Qt::Key_J;
151 if (str == "K") return Qt::Key_K;
152 if (str == "L") return Qt::Key_L;
153 if (str == "M") return Qt::Key_M;
154 if (str == "N") return Qt::Key_N;
155 if (str == "O") return Qt::Key_O;
156 if (str == "P") return Qt::Key_P;
157 if (str == "Q") return Qt::Key_Q;
158 if (str == "R") return Qt::Key_R;
159 if (str == "S") return Qt::Key_S;
160 if (str == "T") return Qt::Key_T;
161 if (str == "U") return Qt::Key_U;
162 if (str == "V") return Qt::Key_V;
163 if (str == "W") return Qt::Key_W;
164 if (str == "X") return Qt::Key_X;
165 if (str == "Y") return Qt::Key_Y;
166 if (str == "Z") return Qt::Key_Z;
167 if (str == "a") return Qt::Key_A;
168 if (str == "b") return Qt::Key_B;
169 if (str == "c") return Qt::Key_C;
170 if (str == "d") return Qt::Key_D;
171 if (str == "e") return Qt::Key_E;
172 if (str == "f") return Qt::Key_F;
173 if (str == "g") return Qt::Key_G;
174 if (str == "h") return Qt::Key_H;
175 if (str == "i") return Qt::Key_I;
176 if (str == "j") return Qt::Key_J;
177 if (str == "k") return Qt::Key_K;
178 if (str == "l") return Qt::Key_L;
179 if (str == "m") return Qt::Key_M;
180 if (str == "n") return Qt::Key_N;
181 if (str == "o") return Qt::Key_O;
182 if (str == "p") return Qt::Key_P;
183 if (str == "q") return Qt::Key_Q;
184 if (str == "r") return Qt::Key_R;
185 if (str == "s") return Qt::Key_S;
186 if (str == "t") return Qt::Key_T;
187 if (str == "u") return Qt::Key_U;
188 if (str == "v") return Qt::Key_V;
189 if (str == "w") return Qt::Key_W;
190 if (str == "x") return Qt::Key_X;
191 if (str == "y") return Qt::Key_Y;
192 if (str == "z") return Qt::Key_Z;
193 if (str == "bracketleft") return Qt::Key_BracketLeft;
194 if (str == "backslash") return Qt::Key_Backslash;
195 if (str == "bracketright") return Qt::Key_BracketRight;
196 if (str == "underscore") return Qt::Key_Underscore;
197 if (str == "space") return Qt::Key_Space;
198 if (str == "parenleft") return Qt::Key_ParenLeft;
199 if (str == "parenright") return Qt::Key_ParenRight;
200 if (str == "quotedbl") return Qt::Key_QuoteDbl;
201 if (str == "exclam") return Qt::Key_Exclam;
202 if (str == "numbersign") return Qt::Key_NumberSign;
203 if (str == "asciicircum") return Qt::Key_AsciiCircum;
204 if (str == "dollar") return Qt::Key_Dollar;
205 if (str == "percent") return Qt::Key_Percent;
206 if (str == "ampersand") return Qt::Key_Ampersand;
207 if (str == "asterisk") return Qt::Key_Asterisk;
208 if (str == "apostrophe") return Qt::Key_Apostrophe;
209 if (str == "plus") return Qt::Key_Plus;
210 if (str == "minus") return Qt::Key_Minus;
211 if (str == "comma") return Qt::Key_Comma;
212 if (str == "period") return Qt::Key_Period;
213 if (str == "slash") return Qt::Key_Slash;
214 if (str == "asciitilde") return Qt::Key_AsciiTilde;
215 if (str == "braceleft") return Qt::Key_BraceLeft;
216 if (str == "braceright") return Qt::Key_BraceRight;
217 if (str == "grave") return Qt::Key_QuoteLeft; // ???
218 if (str == "notsign") return Qt::Key_notsign;
219 if (str == "nobreakspace") return Qt::Key_nobreakspace;
220 if (str == "exclamdown") return Qt::Key_exclamdown;
221 if (str == "cent") return Qt::Key_cent;
222 if (str == "sterling") return Qt::Key_sterling;
223 if (str == "currency") return Qt::Key_currency;
224 if (str == "yen") return Qt::Key_yen;
225 if (str == "brokenbar") return Qt::Key_brokenbar;
226 if (str == "section") return Qt::Key_section;
227 if (str == "diaeresis") return Qt::Key_diaeresis;
228 if (str == "copyright") return Qt::Key_copyright;
229 if (str == "ordfeminine") return Qt::Key_ordfeminine;
230 if (str == "guillemotleft") return Qt::Key_guillemotleft;
231 if (str == "hyphen") return Qt::Key_hyphen;
232 if (str == "registered") return Qt::Key_registered;
233 if (str == "macron") return Qt::Key_macron;
234 if (str == "degree") return Qt::Key_degree;
235 if (str == "plusminus") return Qt::Key_plusminus;
236 if (str == "twosuperior") return Qt::Key_twosuperior;
237 if (str == "threesuperior") return Qt::Key_threesuperior;
238 if (str == "acute") return Qt::Key_acute;
239 if (str == "mu") return Qt::Key_mu;
240 if (str == "paragraph") return Qt::Key_paragraph;
241 if (str == "periodcentered") return Qt::Key_periodcentered;
242 if (str == "cedilla") return Qt::Key_cedilla;
243 if (str == "onesuperior") return Qt::Key_onesuperior;
244 if (str == "masculine") return Qt::Key_masculine;
245 if (str == "guillemotright") return Qt::Key_guillemotright;
246 if (str == "onequarter") return Qt::Key_onequarter;
247 if (str == "onehalf") return Qt::Key_onehalf;
248 if (str == "threequarters") return Qt::Key_threequarters;
249 if (str == "questiondown") return Qt::Key_questiondown;
250 if (str == "Agrave") return Qt::Key_Agrave;
251 if (str == "Aacute") return Qt::Key_Aacute;
252 if (str == "Acircumflex") return Qt::Key_Acircumflex;
253 if (str == "Atilde") return Qt::Key_Atilde;
254 if (str == "Adiaeresis") return Qt::Key_Adiaeresis;
255 if (str == "Aring") return Qt::Key_Aring;
256 if (str == "AE") return Qt::Key_AE;
257 if (str == "Ccedilla") return Qt::Key_Ccedilla;
258 if (str == "Egrave") return Qt::Key_Egrave;
259 if (str == "Eacute") return Qt::Key_Eacute;
260 if (str == "Ecircumflex") return Qt::Key_Ecircumflex;
261 if (str == "Ediaeresis") return Qt::Key_Ediaeresis;
262 if (str == "Igrave") return Qt::Key_Igrave;
263 if (str == "Iacute") return Qt::Key_Iacute;
264 if (str == "Icircumflex") return Qt::Key_Icircumflex;
265 if (str == "Idiaeresis") return Qt::Key_Idiaeresis;
266 if (str == "ETH") return Qt::Key_ETH;
267 if (str == "Ntilde") return Qt::Key_Ntilde;
268 if (str == "Ograve") return Qt::Key_Ograve;
269 if (str == "Oacute") return Qt::Key_Oacute;
270 if (str == "Ocircumflex") return Qt::Key_Ocircumflex;
271 if (str == "Otilde") return Qt::Key_Otilde;
272 if (str == "Odiaeresis") return Qt::Key_Odiaeresis;
273 if (str == "multiply") return Qt::Key_multiply;
274 if (str == "Ooblique") return Qt::Key_Ooblique;
275 if (str == "Ugrave") return Qt::Key_Ugrave;
276 if (str == "Uacute") return Qt::Key_Uacute;
277 if (str == "Ucircumflex") return Qt::Key_Ucircumflex;
278 if (str == "Udiaeresis") return Qt::Key_Udiaeresis;
279 if (str == "Yacute") return Qt::Key_Yacute;
280 if (str == "THORN") return Qt::Key_THORN;
281 if (str == "ssharp") return Qt::Key_ssharp;
282 if (str == "agrave") return Qt::Key_agrave;
283 if (str == "aacute") return Qt::Key_aacute;
284 if (str == "acircumflex") return Qt::Key_acircumflex;
285 if (str == "atilde") return Qt::Key_atilde;
286 if (str == "adiaeresis") return Qt::Key_adiaeresis;
287 if (str == "aring") return Qt::Key_aring;
288 if (str == "ae") return Qt::Key_ae;
289 if (str == "ccedilla") return Qt::Key_ccedilla;
290 if (str == "egrave") return Qt::Key_egrave;
291 if (str == "eacute") return Qt::Key_eacute;
292 if (str == "ecircumflex") return Qt::Key_ecircumflex;
293 if (str == "ediaeresis") return Qt::Key_ediaeresis;
294 if (str == "igrave") return Qt::Key_igrave;
295 if (str == "iacute") return Qt::Key_iacute;
296 if (str == "icircumflex") return Qt::Key_icircumflex;
297 if (str == "idiaeresis") return Qt::Key_idiaeresis;
298 if (str == "eth") return Qt::Key_eth;
299 if (str == "ntilde") return Qt::Key_ntilde;
300 if (str == "ograve") return Qt::Key_ograve;
301 if (str == "oacute") return Qt::Key_oacute;
302 if (str == "ocircumflex") return Qt::Key_ocircumflex;
303 if (str == "otilde") return Qt::Key_otilde;
304 if (str == "odiaeresis") return Qt::Key_odiaeresis;
305 if (str == "division") return Qt::Key_division;
306 if (str == "oslash") return Qt::Key_oslash;
307 if (str == "ugrave") return Qt::Key_ugrave;
308 if (str == "uacute") return Qt::Key_uacute;
309 if (str == "ucircumflex") return Qt::Key_ucircumflex;
310 if (str == "udiaeresis") return Qt::Key_udiaeresis;
311 if (str == "yacute") return Qt::Key_yacute;
312 if (str == "thorn") return Qt::Key_thorn;
313 if (str == "ydiaeresis") return Qt::Key_ydiaeresis;
315 // FIXME, correct for all these ?
316 if (str == "Super_L") return Qt::Key_Super_L;
317 if (str == "Super_R") return Qt::Key_Super_R;
318 if (str == "Menu") return Qt::Key_Menu;
319 if (str == "Hyper_L") return Qt::Key_Hyper_L;
320 if (str == "Hyper_R") return Qt::Key_Hyper_R;
321 if (str == "Help") return Qt::Key_Help;
322 if (str == "Bar") return Qt::Key_Bar;
323 if (str == "BackTab") return Qt::Key_Backtab;
325 return Qt::Key_unknown;
330 * qkey_to_string - convert Qt keypress into LyX
332 * Convert the Qt keypress into a string understandable
333 * by the LyX core (same as XKeysymToString).
335 string const qkey_to_string(int lkey)
338 case Qt::Key_Escape: return "Escape";
339 case Qt::Key_BackSpace: return "BackSpace";
340 case Qt::Key_Insert: return "Insert";
341 case Qt::Key_Delete: return "Delete";
342 case Qt::Key_Pause: return "Pause";
343 case Qt::Key_Print: return "Print";
344 case Qt::Key_SysReq: return "Sys_Req";
345 case Qt::Key_Home: return "Home";
346 case Qt::Key_End: return "End";
347 case Qt::Key_Left: return "Left";
348 case Qt::Key_Up: return "Up";
349 case Qt::Key_Right: return "Right";
350 case Qt::Key_Down: return "Down";
351 case Qt::Key_Prior: return "Prior";
352 case Qt::Key_Next: return "Next";
353 case Qt::Key_Shift: return "Shift_L";
354 case Qt::Key_Control: return "Control_L";
355 case Qt::Key_Meta: return "Alt_L"; // correct ?
356 case Qt::Key_Alt: return "Alt_R";
357 case Qt::Key_CapsLock: return "Caps_Lock";
358 case Qt::Key_NumLock: return "Num_Lock";
359 case Qt::Key_ScrollLock: return "Scroll_Lock";
360 case Qt::Key_F1: return "F1";
361 case Qt::Key_F2: return "F2";
362 case Qt::Key_F3: return "F3";
363 case Qt::Key_F4: return "F4";
364 case Qt::Key_F5: return "F5";
365 case Qt::Key_F6: return "F6";
366 case Qt::Key_F7: return "F7";
367 case Qt::Key_F8: return "F8";
368 case Qt::Key_F9: return "F9";
369 case Qt::Key_F10: return "F10";
370 case Qt::Key_F11: return "F11";
371 case Qt::Key_F12: return "F12";
372 case Qt::Key_F13: return "F13";
373 case Qt::Key_F14: return "F14";
374 case Qt::Key_F15: return "F15";
375 case Qt::Key_F16: return "F16";
376 case Qt::Key_F17: return "F17";
377 case Qt::Key_F18: return "F18";
378 case Qt::Key_F19: return "F19";
379 case Qt::Key_F20: return "F20";
380 case Qt::Key_F21: return "F21";
381 case Qt::Key_F22: return "F22";
382 case Qt::Key_F23: return "F23";
383 case Qt::Key_F24: return "F24";
384 case Qt::Key_F25: return "F25";
385 case Qt::Key_F26: return "F26";
386 case Qt::Key_F27: return "F27";
387 case Qt::Key_F28: return "F28";
388 case Qt::Key_F29: return "F29";
389 case Qt::Key_F30: return "F30";
390 case Qt::Key_F31: return "F31";
391 case Qt::Key_F32: return "F32";
392 case Qt::Key_F33: return "F33";
393 case Qt::Key_F34: return "F34";
394 case Qt::Key_F35: return "F35";
395 case Qt::Key_Colon: return "colon";
396 case Qt::Key_Semicolon: return "semicolon";
397 case Qt::Key_Less: return "less";
398 case Qt::Key_Equal: return "equal";
399 case Qt::Key_Greater: return "greater";
400 case Qt::Key_Question: return "question";
401 case Qt::Key_At: return "at";
402 case Qt::Key_BracketLeft: return "bracketleft";
403 case Qt::Key_Backslash: return "backslash";
404 case Qt::Key_BracketRight: return "bracketright";
405 case Qt::Key_Underscore: return "underscore";
406 case Qt::Key_Space: return "space";
407 case Qt::Key_ParenLeft: return "parenleft";
408 case Qt::Key_ParenRight: return "parenright";
409 case Qt::Key_QuoteDbl: return "quotedbl";
410 case Qt::Key_Exclam: return "exclam";
411 case Qt::Key_NumberSign: return "numbersign";
412 case Qt::Key_AsciiCircum: return "asciicircum";
413 case Qt::Key_Dollar: return "dollar";
414 case Qt::Key_Percent: return "percent";
415 case Qt::Key_Ampersand: return "ampersand";
416 case Qt::Key_Asterisk: return "asterisk";
417 case Qt::Key_Apostrophe: return "apostrophe";
418 case Qt::Key_Plus: return "plus";
419 case Qt::Key_Minus: return "minus";
420 case Qt::Key_Comma: return "comma";
421 case Qt::Key_Period: return "period";
422 case Qt::Key_Slash: return "slash";
423 case Qt::Key_AsciiTilde: return "asciitilde";
424 case Qt::Key_BraceLeft: return "braceleft";
425 case Qt::Key_BraceRight: return "braceright";
426 case Qt::Key_QuoteLeft: return "grave"; // ???
427 case Qt::Key_notsign: return "notsign";
428 case Qt::Key_nobreakspace: return "nobreakspace";
429 case Qt::Key_exclamdown: return "exclamdown";
430 case Qt::Key_cent: return "cent";
431 case Qt::Key_sterling: return "sterling";
432 case Qt::Key_currency: return "currency";
433 case Qt::Key_yen: return "yen";
434 case Qt::Key_brokenbar: return "brokenbar";
435 case Qt::Key_section: return "section";
436 case Qt::Key_diaeresis: return "diaeresis";
437 case Qt::Key_copyright: return "copyright";
438 case Qt::Key_ordfeminine: return "ordfeminine";
439 case Qt::Key_guillemotleft: return "guillemotleft";
440 case Qt::Key_hyphen: return "hyphen";
441 case Qt::Key_registered: return "registered";
442 case Qt::Key_macron: return "macron";
443 case Qt::Key_degree: return "degree";
444 case Qt::Key_plusminus: return "plusminus";
445 case Qt::Key_twosuperior: return "twosuperior";
446 case Qt::Key_threesuperior: return "threesuperior";
447 case Qt::Key_acute: return "acute";
448 case Qt::Key_mu: return "mu";
449 case Qt::Key_paragraph: return "paragraph";
450 case Qt::Key_periodcentered: return "periodcentered";
451 case Qt::Key_cedilla: return "cedilla";
452 case Qt::Key_onesuperior: return "onesuperior";
453 case Qt::Key_masculine: return "masculine";
454 case Qt::Key_guillemotright: return "guillemotright";
455 case Qt::Key_onequarter: return "onequarter";
456 case Qt::Key_onehalf: return "onehalf";
457 case Qt::Key_threequarters: return "threequarters";
458 case Qt::Key_questiondown: return "questiondown";
459 case Qt::Key_Agrave: return "Agrave";
460 case Qt::Key_Aacute: return "Aacute";
461 case Qt::Key_Acircumflex: return "Acircumflex";
462 case Qt::Key_Atilde: return "Atilde";
463 case Qt::Key_Adiaeresis: return "Adiaeresis";
464 case Qt::Key_Aring: return "Aring";
465 case Qt::Key_AE: return "AE";
466 case Qt::Key_Ccedilla: return "Ccedilla";
467 case Qt::Key_Egrave: return "Egrave";
468 case Qt::Key_Eacute: return "Eacute";
469 case Qt::Key_Ecircumflex: return "Ecircumflex";
470 case Qt::Key_Ediaeresis: return "Ediaeresis";
471 case Qt::Key_Igrave: return "Igrave";
472 case Qt::Key_Iacute: return "Iacute";
473 case Qt::Key_Icircumflex: return "Icircumflex";
474 case Qt::Key_Idiaeresis: return "Idiaeresis";
475 case Qt::Key_ETH: return "ETH";
476 case Qt::Key_Ntilde: return "Ntilde";
477 case Qt::Key_Ograve: return "Ograve";
478 case Qt::Key_Oacute: return "Oacute";
479 case Qt::Key_Ocircumflex: return "Ocircumflex";
480 case Qt::Key_Otilde: return "Otilde";
481 case Qt::Key_Odiaeresis: return "Odiaeresis";
482 case Qt::Key_multiply: return "multiply";
483 case Qt::Key_Ooblique: return "Ooblique";
484 case Qt::Key_Ugrave: return "Ugrave";
485 case Qt::Key_Uacute: return "Uacute";
486 case Qt::Key_Ucircumflex: return "Ucircumflex";
487 case Qt::Key_Udiaeresis: return "Udiaeresis";
488 case Qt::Key_Yacute: return "Yacute";
489 case Qt::Key_THORN: return "THORN";
490 case Qt::Key_ssharp: return "ssharp";
491 case Qt::Key_agrave: return "agrave";
492 case Qt::Key_aacute: return "aacute";
493 case Qt::Key_acircumflex: return "acircumflex";
494 case Qt::Key_atilde: return "atilde";
495 case Qt::Key_adiaeresis: return "adiaeresis";
496 case Qt::Key_aring: return "aring";
497 case Qt::Key_ae: return "ae";
498 case Qt::Key_ccedilla: return "ccedilla";
499 case Qt::Key_egrave: return "egrave";
500 case Qt::Key_eacute: return "eacute";
501 case Qt::Key_ecircumflex: return "ecircumflex";
502 case Qt::Key_ediaeresis: return "ediaeresis";
503 case Qt::Key_igrave: return "igrave";
504 case Qt::Key_iacute: return "iacute";
505 case Qt::Key_icircumflex: return "icircumflex";
506 case Qt::Key_idiaeresis: return "idiaeresis";
507 case Qt::Key_eth: return "eth";
508 case Qt::Key_ntilde: return "ntilde";
509 case Qt::Key_ograve: return "ograve";
510 case Qt::Key_oacute: return "oacute";
511 case Qt::Key_ocircumflex: return "ocircumflex";
512 case Qt::Key_otilde: return "otilde";
513 case Qt::Key_odiaeresis: return "odiaeresis";
514 case Qt::Key_division: return "division";
515 case Qt::Key_oslash: return "oslash";
516 case Qt::Key_ugrave: return "ugrave";
517 case Qt::Key_uacute: return "uacute";
518 case Qt::Key_ucircumflex: return "ucircumflex";
519 case Qt::Key_udiaeresis: return "udiaeresis";
520 case Qt::Key_yacute: return "yacute";
521 case Qt::Key_thorn: return "thorn";
522 case Qt::Key_ydiaeresis: return "ydiaeresis";
524 // FIXME: these ones I don't know the names of ... help !
525 // what's here is basically guesses ...
526 case Qt::Key_Super_L: return "Super_L";
527 case Qt::Key_Super_R: return "Super_R";
528 case Qt::Key_Menu: return "Menu";
529 case Qt::Key_Hyper_L: return "Hyper_L";
530 case Qt::Key_Hyper_R: return "Hyper_R";
531 case Qt::Key_Help: return "Help";
532 case Qt::Key_Bar: return "Bar";
533 case Qt::Key_Backtab: return "BackTab";
536 case Qt::Key_unknown: return "";