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