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