Back to index

im-sdk  12.3.91
keymapper.cpp
Go to the documentation of this file.
00001 /*
00002   keymapper.cpp
00003   Copyright (C) 2003 Free Standards Group
00004 
00005   Permission is hereby granted, free of charge, to any person obtaining a
00006   copy of this software and associated documentation files (the
00007   "Software"), to deal in the Software without restriction, including
00008   without limitation the rights to use, copy, modify, merge, publish,
00009   distribute, sublicense, and/or sell copies of the Software, and to
00010   permit persons to whom the Software is furnished to do so, subject to
00011   the following conditions: The above copyright notice and this
00012   permission notice shall be included in all copies or substantial
00013   portions of the Software.
00014 
00015   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00016   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00017   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00018   IN NO EVENT SHALL OPENI18N WG OR FREE STANDARDS GROUP. BE LIABLE
00019   FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
00020   CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
00021   THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF
00022   ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
00023 
00024   Except as contained in this notice, the names of OpenI18N WG and/or
00025   Free Standards Group shall not be used in advertising or otherwise to
00026   promote the sale, use or other dealings in this Software without prior
00027   written authorization from OpenI18N WG and/or Free Standards Group
00028   as applicable.
00029 
00030   Author: ILGYOUNG PARK <Karl.Park@Sun.COM>
00031          TuBo <Gavin.Tu@Sun.COM>
00032 
00033 */
00034 #include <qnamespace.h>
00035 #include <iiimcf.h>
00036 
00037 #include "keymapper.h"
00038 #include "debug.h"
00039 
00040 
00041 KeyMapper::KeyMapper ()
00042 {
00043 }
00044 
00045 int
00046 KeyMapper::q2i (int keycode)
00047 {
00048   switch (keycode){
00049   case Qt::Key_Escape : /* = 0x1000, */          // misc keys
00050     return IIIMF_KEYCODE_ESCAPE;
00051   case Qt::Key_Tab : /* = 0x1001, */
00052     return IIIMF_KEYCODE_TAB;
00053 
00054   case Qt::Key_Backspace : /* = 0x1003, */
00055   //case Qt::Key_BackSpace : /* = case Key_Backspace, : */
00056     return IIIMF_KEYCODE_BACK_SPACE;
00057   case Qt::Key_Return : /* = 0x1004, */
00058   case Qt::Key_Enter : /* = 0x1005, */
00059     return IIIMF_KEYCODE_ENTER;
00060   case Qt::Key_Insert : /* = 0x1006, */
00061     return IIIMF_KEYCODE_INSERT;
00062   case Qt::Key_Delete : /* = 0x1007, */
00063     return IIIMF_KEYCODE_DELETE;
00064   case Qt::Key_Pause : /* = 0x1008, */
00065     return IIIMF_KEYCODE_PAUSE;
00066   case Qt::Key_Print : /* = 0x1009, */
00067     return IIIMF_KEYCODE_PRINTSCREEN;
00068   case Qt::Key_Clear : /* = 0x100b, */
00069     return IIIMF_KEYCODE_CLEAR;
00070   case Qt::Key_Home : /* = 0x1010, */            // cursor movement
00071     return IIIMF_KEYCODE_HOME;
00072   case Qt::Key_End : /* = 0x1011, */
00073     return IIIMF_KEYCODE_END;
00074   case Qt::Key_Left : /* = 0x1012, */
00075     return IIIMF_KEYCODE_LEFT;
00076     return IIIMF_KEYCODE_KP_LEFT;
00077   case Qt::Key_Up : /* = 0x1013, */
00078     return IIIMF_KEYCODE_UP; /* = IIIMF_KEYCODE_KP_UP */
00079   case Qt::Key_Right : /* = 0x1014, */
00080     return IIIMF_KEYCODE_RIGHT; /* = IIIMF_KEYCODE_KP_RIGHT */
00081 
00082   case Qt::Key_Down : /* = 0x1015, */
00083     return IIIMF_KEYCODE_DOWN;
00084     return IIIMF_KEYCODE_KP_DOWN;
00085   case Qt::Key_PageUp : /* = case Key_Prior, : */
00086     return IIIMF_KEYCODE_PAGE_UP;
00087   case Qt::Key_PageDown : /* = case Key_Next, : */
00088     return IIIMF_KEYCODE_PAGE_DOWN;
00089   case Qt::Key_Shift : /* = 0x1020, */           // modifiers
00090     return IIIMF_KEYCODE_SHIFT;
00091   case Qt::Key_Control : /* = 0x1021, */
00092     return IIIMF_KEYCODE_CONTROL;
00093   case Qt::Key_Meta : /* = 0x1022, */
00094     return IIIMF_KEYCODE_META;
00095   case Qt::Key_Alt : /* = 0x1023, */
00096     return IIIMF_KEYCODE_ALT;
00097   case Qt::Key_CapsLock : /* = 0x1024, */
00098     return IIIMF_KEYCODE_CAPS_LOCK;
00099   case Qt::Key_NumLock : /* = 0x1025, */
00100     return IIIMF_KEYCODE_NUM_LOCK;
00101   case Qt::Key_ScrollLock : /* = 0x1026, */
00102     return IIIMF_KEYCODE_SCROLL_LOCK;
00103     
00104     // function keys
00105   case Qt::Key_F1 : /* = 0x1030, */
00106     return IIIMF_KEYCODE_F1;
00107   case Qt::Key_F2 : /* = 0x1031, */
00108     return IIIMF_KEYCODE_F2;
00109   case Qt::Key_F3 : /* = 0x1032, */
00110     return IIIMF_KEYCODE_F3;
00111   case Qt::Key_F4 : /* = 0x1033, */
00112     return IIIMF_KEYCODE_F4;
00113   case Qt::Key_F5 : /* = 0x1034, */
00114     return IIIMF_KEYCODE_F5;
00115   case Qt::Key_F6 : /* = 0x1035, */
00116     return IIIMF_KEYCODE_F6;
00117   case Qt::Key_F7 : /* = 0x1036, */
00118     return IIIMF_KEYCODE_F7;
00119   case Qt::Key_F8 : /* = 0x1037, */
00120     return IIIMF_KEYCODE_F8;
00121   case Qt::Key_F9 : /* = 0x1038, */
00122     return IIIMF_KEYCODE_F9;
00123   case Qt::Key_F10 : /* = 0x1039, */
00124     return IIIMF_KEYCODE_F10;
00125   case Qt::Key_F11 : /* = 0x103a, */
00126     return IIIMF_KEYCODE_F11;
00127   case Qt::Key_F12 : /* = 0x103b, */
00128     return IIIMF_KEYCODE_F12;
00129   case Qt::Key_F13 : /* = 0x103c, */
00130         return IIIMF_KEYCODE_F13;
00131   case Qt::Key_F14 : /* = 0x103d, */
00132         return IIIMF_KEYCODE_F14;
00133   case Qt::Key_F15 : /* = 0x103e, */
00134         return IIIMF_KEYCODE_F15;
00135   case Qt::Key_F16 : /* = 0x103f, */
00136         return IIIMF_KEYCODE_F16;
00137   case Qt::Key_F17 : /* = 0x1040, */
00138     return IIIMF_KEYCODE_F17;
00139   case Qt::Key_F18 : /* = 0x1041, */
00140         return IIIMF_KEYCODE_F18;
00141   case Qt::Key_F19 : /* = 0x1042, */
00142         return IIIMF_KEYCODE_F19;
00143   case Qt::Key_F20 : /* = 0x1043, */
00144         return IIIMF_KEYCODE_F20;
00145   case Qt::Key_F21 : /* = 0x1044, */
00146         return IIIMF_KEYCODE_F21;
00147   case Qt::Key_F22 : /* = 0x1045, */
00148         return IIIMF_KEYCODE_F22;
00149   case Qt::Key_F23 : /* = 0x1046, */
00150         return IIIMF_KEYCODE_F23;
00151   case Qt::Key_F24 : /* = 0x1047, */
00152         return IIIMF_KEYCODE_F24;
00153        
00154 #if 0
00155   case Qt::Key_F25 : /* = 0x1048, */             // F25 .. F35 only on X11
00156   case Qt::Key_F26 : /* = 0x1049, */
00157   case Qt::Key_F27 : /* = 0x104a, */
00158   case Qt::Key_F28 : /* = 0x104b, */
00159   case Qt::Key_F29 : /* = 0x104c, */
00160   case Qt::Key_F30 : /* = 0x104d, */
00161   case Qt::Key_F31 : /* = 0x104e, */
00162   case Qt::Key_F32 : /* = 0x104f, */
00163   case Qt::Key_F33 : /* = 0x1050, */
00164   case Qt::Key_F34 : /* = 0x1051, */
00165   case Qt::Key_F35 : /* = 0x1052, */
00166 #endif
00167 
00168   case Qt::Key_Help : /* = 0x1058, */
00169     return IIIMF_KEYCODE_HELP;
00170     // Misc Functions
00171   case Qt::Key_Mode_switch :         /* = 0x117e, */  // Character set switch
00172     //case Key_script_switch :       /* = 0x117e, */  // Alias for mode_switch
00173     return IIIMF_KEYCODE_MODECHANGE;
00174 
00175 
00176     // Japanese keyboard support
00177   case Qt::Key_Kanji :               /* = 0x1121, */  // Kanji, Kanji convert
00178   case Qt::Key_Muhenkan :            /* = 0x1122, */  // Cancel Conversion
00179     //case Key_Henkan_Mode :         /* = 0x1123, */  // Start/Stop Conversion
00180   case Qt::Key_Henkan :              /* = 0x1123, */  // Alias for Henkan_Mode
00181   case Qt::Key_Romaji :              /* = 0x1124, */  // to Romaji
00182   case Qt::Key_Hiragana :            /* = 0x1125, */  // to Hiragana
00183   case Qt::Key_Katakana :            /* = 0x1126, */  // to Katakana
00184   case Qt::Key_Hiragana_Katakana :   /* = 0x1127, */  // Hiragana/Katakana toggle
00185   case Qt::Key_Zenkaku :             /* = 0x1128, */  // to Zenkaku
00186   case Qt::Key_Hankaku :             /* = 0x1129, */  // to Hankaku
00187   case Qt::Key_Zenkaku_Hankaku :     /* = 0x112a, */  // Zenkaku/Hankaku toggle
00188   case Qt::Key_Touroku :             /* = 0x112b, */  // Add to Dictionary
00189   case Qt::Key_Massyo :              /* = 0x112c, */  // Delete from Dictionary
00190   case Qt::Key_Kana_Lock :           /* = 0x112d, */  // Kana Lock
00191   case Qt::Key_Kana_Shift :          /* = 0x112e, */  // Kana Shift
00192   case Qt::Key_Eisu_Shift :          /* = 0x112f, */  // Alphanumeric Shift
00193   case Qt::Key_Eisu_toggle :         /* = 0x1130, */  // Alphanumeric toggle
00194     //case Key_Kanji_Bangou :        /* = 0x1137, */  // Codeinput
00195     //case Key_Zen_Koho :            /* = 0x113d, */  // Multiple/All Candidate(s)
00196     //case Key_Mae_Koho :            /* = 0x113e, */  // Previous Candidate
00197 
00198     // Korean support
00199   case Qt::Key_Hangul :              /* = 0x1131, */  // Hangul start/stop(toggle)
00200   case Qt::Key_Hangul_Start :        /* = 0x1132, */  // Hangul start
00201   case Qt::Key_Hangul_End :          /* = 0x1133, */  // Hangul end, English start
00202   case Qt::Key_Hangul_Hanja :        /* = 0x1134, */  // Start Hangul->Hanja Conversion
00203   case Qt::Key_Hangul_Jamo :         /* = 0x1135, */  // Hangul Jamo mode
00204   case Qt::Key_Hangul_Romaja :       /* = 0x1136, */  // Hangul Romaja mode
00205     //case Qt::Key_Hangul_Codeinput :    /* = 0x1137, */  // Hangul code input mode
00206   case Qt::Key_Hangul_Jeonja :       /* = 0x1138, */  // Jeonja mode
00207   case Qt::Key_Hangul_Banja :        /* = 0x1139, */  // Banja mode
00208   case Qt::Key_Hangul_PreHanja :     /* = 0x113a, */  // Pre Hanja conversion
00209   case Qt::Key_Hangul_PostHanja :    /* = 0x113b, */  // Post Hanja conversion
00210     //case Qt::Key_Hangul_SingleCandidate :   /* = 0x113c, */  // Single candidate
00211     //case Qt::Key_Hangul_MultipleCandidate : /* = 0x113d, */  // Multiple candidate
00212     //case Qt::Key_Hangul_PreviousCandidate : /* = 0x113e, */  // Previous candidate
00213   case Qt::Key_Hangul_Special :      /* = 0x113f, */  // Special symbols
00214     //case Key_Hangul_switch :       /* = 0x117e, */  // Alias for mode_switch
00215     return IIIMF_KEYCODE_HANGUL;
00216     //return IIIMF_KEYCODE_HANJA;
00217     
00218   case Qt::Key_Space : /* = 0x20, */             // 7 bit printable ASCII
00219     //case Key_Any : /* = case Key_Space, : */
00220     return IIIMF_KEYCODE_SPACE;
00221 
00222   case Qt::Key_Exclam : /* = 0x21, */
00223     return IIIMF_KEYCODE_EXCLAMATION_MARK;
00224   case Qt::Key_QuoteDbl : /* = 0x22, */
00225     return IIIMF_KEYCODE_QUOTEDBL;
00226   case Qt::Key_NumberSign : /* = 0x23, */
00227     return IIIMF_KEYCODE_NUMBER_SIGN;
00228   case Qt::Key_Dollar : /* = 0x24, */
00229     return IIIMF_KEYCODE_DOLLAR;
00230   case Qt::Key_Percent : /* = 0x25, */
00231   case Qt::Key_Ampersand : /* = 0x26, */
00232   case Qt::Key_Apostrophe : /* = 0x27, */
00233   case Qt::Key_ParenLeft : /* = 0x28, */
00234     return IIIMF_KEYCODE_LEFT_PARENTHESIS;
00235   case Qt::Key_ParenRight : /* = 0x29, */
00236     return IIIMF_KEYCODE_RIGHT_PARENTHESIS;
00237   case Qt::Key_Asterisk : /* = 0x2a, */
00238     return IIIMF_KEYCODE_ASTERISK;
00239   case Qt::Key_Plus : /* = 0x2b, */
00240     return IIIMF_KEYCODE_PLUS;
00241   case Qt::Key_Comma : /* = 0x2c, */
00242     return IIIMF_KEYCODE_COMMA;
00243   case Qt::Key_Minus : /* = 0x2d, */
00244     return IIIMF_KEYCODE_MINUS;
00245   case Qt::Key_Period : /* = 0x2e, */
00246     return IIIMF_KEYCODE_PERIOD;
00247   case Qt::Key_Slash : /* = 0x2f, */
00248     return IIIMF_KEYCODE_SLASH;
00249   case Qt::Key_0 : /* = 0x30, */
00250     return IIIMF_KEYCODE_0;
00251   case Qt::Key_1 : /* = 0x31, */
00252     return IIIMF_KEYCODE_1;
00253   case Qt::Key_2 : /* = 0x32, */
00254     return IIIMF_KEYCODE_2;
00255   case Qt::Key_3 : /* = 0x33, */
00256     return IIIMF_KEYCODE_3;
00257   case Qt::Key_4 : /* = 0x34, */
00258     return IIIMF_KEYCODE_4;
00259   case Qt::Key_5 : /* = 0x35, */
00260     return IIIMF_KEYCODE_5;
00261   case Qt::Key_6 : /* = 0x36, */
00262     return IIIMF_KEYCODE_6;
00263   case Qt::Key_7 : /* = 0x37, */
00264     return IIIMF_KEYCODE_7;
00265   case Qt::Key_8 : /* = 0x38, */
00266     return IIIMF_KEYCODE_8;
00267   case Qt::Key_9 : /* = 0x39, */
00268     return IIIMF_KEYCODE_9;    
00269   case Qt::Key_Colon : /* = 0x3a, */
00270     return IIIMF_KEYCODE_COLON;
00271   case Qt::Key_Semicolon : /* = 0x3b, */
00272     return IIIMF_KEYCODE_SEMICOLON;
00273   case Qt::Key_Less : /* = 0x3c, */
00274     return IIIMF_KEYCODE_LESS;
00275   case Qt::Key_Equal : /* = 0x3d, */
00276     return IIIMF_KEYCODE_EQUALS;
00277   case Qt::Key_Greater : /* = 0x3e, */
00278     return IIIMF_KEYCODE_GREATER;
00279   case Qt::Key_Question : /* = 0x3f, */
00280     
00281   case Qt::Key_At : /* = 0x40, */
00282     return IIIMF_KEYCODE_AT;
00283   case Qt::Key_A : /* = 0x41, */
00284         return IIIMF_KEYCODE_A;
00285   case Qt::Key_B : /* = 0x42, */
00286         return IIIMF_KEYCODE_B;
00287   case Qt::Key_C : /* = 0x43, */
00288     return IIIMF_KEYCODE_C;
00289   case Qt::Key_D : /* = 0x44, */
00290     return IIIMF_KEYCODE_D;
00291   case Qt::Key_E : /* = 0x45, */
00292     return IIIMF_KEYCODE_E;
00293   case Qt::Key_F : /* = 0x46, */
00294     return IIIMF_KEYCODE_F;
00295   case Qt::Key_G : /* = 0x47, */
00296     return IIIMF_KEYCODE_G;
00297   case Qt::Key_H : /* = 0x48, */
00298     return IIIMF_KEYCODE_H;
00299   case Qt::Key_I : /* = 0x49, */
00300     return IIIMF_KEYCODE_I;
00301   case Qt::Key_J : /* = 0x4a, */
00302     return IIIMF_KEYCODE_J;
00303   case Qt::Key_K : /* = 0x4b, */
00304     return IIIMF_KEYCODE_K;
00305   case Qt::Key_L : /* = 0x4c, */
00306     return IIIMF_KEYCODE_L;
00307   case Qt::Key_M : /* = 0x4d, */
00308     return IIIMF_KEYCODE_M;
00309   case Qt::Key_N : /* = 0x4e, */
00310     return IIIMF_KEYCODE_N;
00311   case Qt::Key_O : /* = 0x4f, */
00312     return IIIMF_KEYCODE_O;
00313   case Qt::Key_P : /* = 0x50, */
00314     return IIIMF_KEYCODE_P;
00315   case Qt::Key_Q : /* = 0x51, */
00316     return IIIMF_KEYCODE_Q;
00317   case Qt::Key_R : /* = 0x52, */
00318     return IIIMF_KEYCODE_R;
00319   case Qt::Key_S : /* = 0x53, */
00320     return IIIMF_KEYCODE_S;
00321   case Qt::Key_T : /* = 0x54, */
00322     return IIIMF_KEYCODE_T;
00323   case Qt::Key_U : /* = 0x55, */
00324     return IIIMF_KEYCODE_U;
00325   case Qt::Key_V : /* = 0x56, */
00326     return IIIMF_KEYCODE_V;
00327   case Qt::Key_W : /* = 0x57, */
00328     return IIIMF_KEYCODE_W;
00329   case Qt::Key_X : /* = 0x58, */
00330     return IIIMF_KEYCODE_X;
00331   case Qt::Key_Y : /* = 0x59, */
00332     return IIIMF_KEYCODE_Y;
00333   case Qt::Key_Z : /* = 0x5a, */
00334     return IIIMF_KEYCODE_Z;
00335   case Qt::Key_BracketLeft : /* = 0x5b, */
00336     return IIIMF_KEYCODE_OPEN_BRACKET;
00337   case Qt::Key_Backslash : /* = 0x5c, */
00338     return IIIMF_KEYCODE_BACK_SLASH;
00339   case Qt::Key_BracketRight : /* = 0x5d, */
00340     return IIIMF_KEYCODE_CLOSE_BRACKET;
00341     
00342   case Qt::Key_AsciiCircum : /* = 0x5e, */
00343     
00344   case Qt::Key_Underscore : /* = 0x5f, */
00345     return IIIMF_KEYCODE_UNDERSCORE;
00346   case Qt::Key_QuoteLeft : /* = 0x60, */
00347     return IIIMF_KEYCODE_BACK_QUOTE;
00348   case Qt::Key_BraceLeft : /* = 0x7b, */
00349     return IIIMF_KEYCODE_BRACELEFT;
00350   case Qt::Key_Bar : /* = 0x7c, */
00351   case Qt::Key_BraceRight : /* = 0x7d, */
00352     return IIIMF_KEYCODE_BRACERIGHT;
00353   case Qt::Key_AsciiTilde : /* = 0x7e, */
00354     return IIIMF_KEYCODE_UNDEFINED;
00355     // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
00356 
00357   case Qt::Key_nobreakspace : /* = 0x0a0, */
00358     return IIIMF_KEYCODE_UNDEFINED;
00359   case Qt::Key_exclamdown : /* = 0x0a1, */
00360     return IIIMF_KEYCODE_INVERTED_EXCLAMATION_MARK;
00361     
00362   case Qt::Key_cent : /* = 0x0a2, */
00363   case Qt::Key_sterling : /* = 0x0a3, */
00364   case Qt::Key_currency : /* = 0x0a4, */
00365   case Qt::Key_yen : /* = 0x0a5, */
00366   case Qt::Key_brokenbar : /* = 0x0a6, */
00367   case Qt::Key_section : /* = 0x0a7, */
00368   case Qt::Key_diaeresis : /* = 0x0a8, */
00369   case Qt::Key_copyright : /* = 0x0a9, */
00370   case Qt::Key_ordfeminine : /* = 0x0aa, */
00371   case Qt::Key_guillemotleft : /* = 0x0ab, */    // left angle quotation mark
00372   case Qt::Key_notsign : /* = 0x0ac, */
00373   case Qt::Key_hyphen : /* = 0x0ad, */
00374   case Qt::Key_registered : /* = 0x0ae, */
00375   case Qt::Key_macron : /* = 0x0af, */
00376   case Qt::Key_degree : /* = 0x0b0, */
00377   case Qt::Key_plusminus : /* = 0x0b1, */
00378   case Qt::Key_twosuperior : /* = 0x0b2, */
00379   case Qt::Key_threesuperior : /* = 0x0b3, */
00380   case Qt::Key_acute : /* = 0x0b4, */
00381   case Qt::Key_mu : /* = 0x0b5, */
00382   case Qt::Key_paragraph : /* = 0x0b6, */
00383   case Qt::Key_periodcentered : /* = 0x0b7, */
00384   case Qt::Key_cedilla : /* = 0x0b8, */
00385   case Qt::Key_onesuperior : /* = 0x0b9, */
00386   case Qt::Key_masculine : /* = 0x0ba, */
00387   case Qt::Key_guillemotright : /* = 0x0bb, */   // right angle quotation mark
00388   case Qt::Key_onequarter : /* = 0x0bc, */
00389   case Qt::Key_onehalf : /* = 0x0bd, */
00390   case Qt::Key_threequarters : /* = 0x0be, */
00391   case Qt::Key_questiondown : /* = 0x0bf, */
00392   case Qt::Key_Agrave : /* = 0x0c0, */
00393   case Qt::Key_Aacute : /* = 0x0c1, */
00394   case Qt::Key_Acircumflex : /* = 0x0c2, */
00395   case Qt::Key_Atilde : /* = 0x0c3, */
00396   case Qt::Key_Adiaeresis : /* = 0x0c4, */
00397   case Qt::Key_Aring : /* = 0x0c5, */
00398   case Qt::Key_AE : /* = 0x0c6, */
00399   case Qt::Key_Ccedilla : /* = 0x0c7, */
00400   case Qt::Key_Egrave : /* = 0x0c8, */
00401   case Qt::Key_Eacute : /* = 0x0c9, */
00402   case Qt::Key_Ecircumflex : /* = 0x0ca, */
00403   case Qt::Key_Ediaeresis : /* = 0x0cb, */
00404   case Qt::Key_Igrave : /* = 0x0cc, */
00405   case Qt::Key_Iacute : /* = 0x0cd, */
00406   case Qt::Key_Icircumflex : /* = 0x0ce, */
00407   case Qt::Key_Idiaeresis : /* = 0x0cf, */
00408   case Qt::Key_ETH : /* = 0x0d0, */
00409   case Qt::Key_Ntilde : /* = 0x0d1, */
00410   case Qt::Key_Ograve : /* = 0x0d2, */
00411   case Qt::Key_Oacute : /* = 0x0d3, */
00412   case Qt::Key_Ocircumflex : /* = 0x0d4, */
00413   case Qt::Key_Otilde : /* = 0x0d5, */
00414   case Qt::Key_Odiaeresis : /* = 0x0d6, */
00415   case Qt::Key_multiply : /* = 0x0d7, */
00416   case Qt::Key_Ooblique : /* = 0x0d8, */
00417   case Qt::Key_Ugrave : /* = 0x0d9, */
00418   case Qt::Key_Uacute : /* = 0x0da, */
00419   case Qt::Key_Ucircumflex : /* = 0x0db, */
00420   case Qt::Key_Udiaeresis : /* = 0x0dc, */
00421   case Qt::Key_Yacute : /* = 0x0dd, */
00422   case Qt::Key_THORN : /* = 0x0de, */
00423   case Qt::Key_ssharp : /* = 0x0df, */
00424   case Qt::Key_agrave : /* = 0x0e0, */
00425   case Qt::Key_aacute : /* = 0x0e1, */
00426   case Qt::Key_acircumflex : /* = 0x0e2, */
00427   case Qt::Key_atilde : /* = 0x0e3, */
00428   case Qt::Key_adiaeresis : /* = 0x0e4, */
00429   case Qt::Key_aring : /* = 0x0e5, */
00430   case Qt::Key_ae : /* = 0x0e6, */
00431   case Qt::Key_ccedilla : /* = 0x0e7, */
00432   case Qt::Key_egrave : /* = 0x0e8, */
00433   case Qt::Key_eacute : /* = 0x0e9, */
00434   case Qt::Key_ecircumflex : /* = 0x0ea, */
00435   case Qt::Key_ediaeresis : /* = 0x0eb, */
00436   case Qt::Key_igrave : /* = 0x0ec, */
00437   case Qt::Key_iacute : /* = 0x0ed, */
00438   case Qt::Key_icircumflex : /* = 0x0ee, */
00439   case Qt::Key_idiaeresis : /* = 0x0ef, */
00440   case Qt::Key_eth : /* = 0x0f0, */
00441   case Qt::Key_ntilde : /* = 0x0f1, */
00442   case Qt::Key_ograve : /* = 0x0f2, */
00443   case Qt::Key_oacute : /* = 0x0f3, */
00444   case Qt::Key_ocircumflex : /* = 0x0f4, */
00445   case Qt::Key_otilde : /* = 0x0f5, */
00446   case Qt::Key_odiaeresis : /* = 0x0f6, */
00447   case Qt::Key_division : /* = 0x0f7, */
00448   case Qt::Key_oslash : /* = 0x0f8, */
00449   case Qt::Key_ugrave : /* = 0x0f9, */
00450   case Qt::Key_uacute : /* = 0x0fa, */
00451   case Qt::Key_ucircumflex : /* = 0x0fb, */
00452   case Qt::Key_udiaeresis : /* = 0x0fc, */
00453   case Qt::Key_yacute : /* = 0x0fd, */
00454   case Qt::Key_thorn : /* = 0x0fe, */
00455   case Qt::Key_ydiaeresis : /* = 0x0ff, */
00456 
00457     // multimedia/internet keys - ignored by default - see QKeyEvent c'tor
00458 
00459   case Qt::Key_Back :  /* = 0x1061, */
00460   case Qt::Key_Forward :  /* = 0x1062, */
00461   case Qt::Key_Stop :  /* = 0x1063, */
00462   case Qt::Key_Refresh :  /* = 0x1064, */
00463 
00464   case Qt::Key_VolumeDown : /* = 0x1070, */
00465   case Qt::Key_VolumeMute :  /* = 0x1071, */
00466   case Qt::Key_VolumeUp : /* = 0x1072, */
00467   case Qt::Key_BassBoost : /* = 0x1073, */
00468   case Qt::Key_BassUp : /* = 0x1074, */
00469   case Qt::Key_BassDown : /* = 0x1075, */
00470   case Qt::Key_TrebleUp : /* = 0x1076, */
00471   case Qt::Key_TrebleDown : /* = 0x1077, */
00472 
00473   case Qt::Key_MediaPlay :  /* = 0x1080, */
00474   case Qt::Key_MediaStop :  /* = 0x1081, */
00475   case Qt::Key_MediaPrev :  /* = 0x1082, */
00476   case Qt::Key_MediaNext :  /* = 0x1083, */
00477   case Qt::Key_MediaRecord : /* = 0x1084, */
00478     
00479   case Qt::Key_HomePage :  /* = 0x1090, */
00480   case Qt::Key_Favorites :  /* = 0x1091, */
00481   case Qt::Key_Search :  /* = 0x1092, */
00482   case Qt::Key_Standby : /* = 0x1093, */
00483   case Qt::Key_OpenUrl : /* = 0x1094, */
00484   case Qt::Key_LaunchMail :  /* = 0x10a0, */
00485   case Qt::Key_LaunchMedia : /* = 0x10a1, */
00486   case Qt::Key_Launch0 :  /* = 0x10a2, */
00487   case Qt::Key_Launch1 :  /* = 0x10a3, */
00488   case Qt::Key_Launch2 :  /* = 0x10a4, */
00489   case Qt::Key_Launch3 :  /* = 0x10a5, */
00490   case Qt::Key_Launch4 :  /* = 0x10a6, */
00491   case Qt::Key_Launch5 :  /* = 0x10a7, */
00492   case Qt::Key_Launch6 :  /* = 0x10a8, */
00493   case Qt::Key_Launch7 :  /* = 0x10a9, */
00494   case Qt::Key_Launch8 :  /* = 0x10aa, */
00495   case Qt::Key_Launch9 :  /* = 0x10ab, */
00496   case Qt::Key_LaunchA :  /* = 0x10ac, */
00497   case Qt::Key_LaunchB :  /* = 0x10ad, */
00498   case Qt::Key_LaunchC :  /* = 0x10ae, */
00499   case Qt::Key_LaunchD :  /* = 0x10af, */
00500   case Qt::Key_LaunchE :  /* = 0x10b0, */
00501   case Qt::Key_LaunchF :  /* = 0x10b1, */
00502 
00503   case Qt::Key_MediaLast : /* = 0x1fff, */
00504   case Qt::Key_Backtab : /* = 0x1002, */
00505     //case Qt::Key_BackTab : /* = case Key_Backtab, : */
00506   case Qt::Key_SysReq : /* = 0x100a, */
00507     //case Qt::Key_Prior : /* = 0x1016, */
00508     //case Qt::Key_Next : /* = 0x1017, */
00509   case Qt::Key_Super_L : /* = 0x1053, */         // extra keys
00510   case Qt::Key_Super_R : /* = 0x1054, */
00511   case Qt::Key_Menu : /* = 0x1055, */
00512   case Qt::Key_Hyper_L : /* = 0x1056, */
00513   case Qt::Key_Hyper_R : /* = 0x1057, */
00514   case Qt::Key_Direction_L : /* = 0x1059, */
00515   case Qt::Key_Direction_R : /* = 0x1060, */
00516   case Qt::Key_Multi_key :   /* = 0x1120, */  // Multi-key character compose
00517 
00518     // International input method support (X keycode - 0xEE00)
00519     // Only interesting if you are writing your own input method
00520 
00521     // International & multi-key character composition
00522 #if 0
00523   case Qt::Key_Codeinput :           /* = 0x1137, */
00524     return IIIMF_KEYCODE_UNDEFINED;
00525 
00526   case Qt::Key_SingleCandidate :     /* = 0x113c, */
00527     return IIIMF_KEYCODE_UNDEFINED;
00528 
00529   case Qt::Key_MultipleCandidate :   /* = 0x113d, */
00530     return IIIMF_KEYCODE_UNDEFINED;
00531   case Qt::Key_PreviousCandidate :   /* = 0x113e, */
00532     return IIIMF_KEYCODE_UNDEFINED;
00533 #endif
00534   case Qt::Key_unknown :/* = 0xffff*/
00535     return IIIMF_KEYCODE_UNDEFINED;
00536   default:
00537     return IIIMF_KEYCODE_UNDEFINED;
00538   }
00539 }
00540 
00541 
00542 int
00543 KeyMapper::modifier (Qt::ButtonState st)
00544 {
00545   int mod = 0;
00546   
00547   if (st & Qt::ShiftButton) {
00548     DEBUG_DO(qDebug ("**IIIMQCF: modifier():Shift button pressed"));
00549     mod |= IIIMF_SHIFT_MODIFIER;
00550   }
00551   if (st & Qt::ControlButton) {
00552     DEBUG_DO(qDebug ("**IIIMQCF: modifier():Control button pressed"));
00553     mod |= IIIMF_CONTROL_MODIFIER;
00554   }
00555   if (st & Qt::MetaButton) {
00556     DEBUG_DO(qDebug ("**IIIMQCF: modifier():Meta button pressed"));
00557     mod |= IIIMF_META_MODIFIER;
00558   }
00559   /*
00560   if (st & GDK_MOD1_MASK)    {
00561     mod |= IIIMF_ALT_MODIFIER;
00562   }
00563   */
00564 
00565   return mod;
00566 }
00567 #if 0
00568 int
00569 KeyMapper::i2q (int kv, int kc)
00570 #endif
00571 int
00572 KeyMapper::i2q (int kv)
00573 {
00574 #if 0
00575   /* treat special case */
00576   switch (kc)    {
00577   case '?':
00578     return Qt::Key_Question;
00579   case '%':
00580     return GDK_percent;
00581   default:
00582     break;
00583   }
00584 #endif
00585   
00586   switch (kv){
00587     /* case IIIMF_KEYCODE_UNDEFINED */
00588 #if 0
00589   case IIIMF_KEYCODE_CANCEL:
00590     return GDK_Cancel;
00591 #endif
00592   case IIIMF_KEYCODE_BACK_SPACE:
00593     return Qt::Key_Backspace;
00594   case IIIMF_KEYCODE_TAB:
00595     return Qt::Key_Tab;
00596   case IIIMF_KEYCODE_ENTER:
00597     return Qt::Key_Enter;
00598 #if 0
00599   case IIIMF_KEYCODE_CLEAR:
00600     return GDK_Clear;
00601 #endif
00602   case IIIMF_KEYCODE_SHIFT:
00603     return Qt::Key_Shift;   /* ... */
00604   case IIIMF_KEYCODE_CONTROL:
00605     return Qt::Key_Control; /* ... */
00606   case IIIMF_KEYCODE_ALT:
00607     return Qt::Key_Alt;
00608   case IIIMF_KEYCODE_PAUSE:
00609     return Qt::Key_Pause;
00610   case IIIMF_KEYCODE_CAPS_LOCK:
00611     return Qt::Key_CapsLock;
00612 #if 0
00613   case IIIMF_KEYCODE_KANJI:
00614     return GDK_Kanji;
00615 #endif
00616 
00617   case IIIMF_KEYCODE_ESCAPE:
00618     return Qt::Key_Escape;
00619 #if 0
00620   case IIIMF_KEYCODE_CONVERT:
00621     return GDK_Henkan_Mode;
00622 
00623   case IIIMF_KEYCODE_NONCONVERT:
00624     return GDK_Muhenkan;
00625     /* case IIIMF_KEYCODE_ACCEPT */
00626   case IIIMF_KEYCODE_MODECHANGE:
00627     return GDK_Mode_switch;
00628 #endif
00629   case IIIMF_KEYCODE_SPACE:
00630     return Qt::Key_Space;
00631   case IIIMF_KEYCODE_PAGE_UP:
00632     return Qt::Key_PageUp;
00633   case IIIMF_KEYCODE_PAGE_DOWN:
00634     return Qt::Key_PageDown;;
00635   case IIIMF_KEYCODE_END:
00636     return Qt::Key_End;
00637   case IIIMF_KEYCODE_HOME:
00638     return Qt::Key_Home;
00639   case IIIMF_KEYCODE_LEFT:
00640     return Qt::Key_Left;
00641   case IIIMF_KEYCODE_UP:
00642     return Qt::Key_Up;
00643   case IIIMF_KEYCODE_RIGHT:
00644     return Qt::Key_Right;
00645   case IIIMF_KEYCODE_DOWN:
00646     return Qt::Key_Down;
00647   case IIIMF_KEYCODE_COMMA:
00648     return Qt::Key_Comma;
00649   case IIIMF_KEYCODE_MINUS:
00650     return Qt::Key_Minus;
00651   case IIIMF_KEYCODE_PERIOD:
00652     return Qt::Key_Period;
00653   case IIIMF_KEYCODE_SLASH:
00654     return Qt::Key_Slash;
00655     
00656   case IIIMF_KEYCODE_0:
00657   case IIIMF_KEYCODE_NUMPAD0:
00658     return Qt::Key_0;
00659     
00660   case IIIMF_KEYCODE_1:
00661   case IIIMF_KEYCODE_NUMPAD1:
00662     return Qt::Key_1;
00663   case IIIMF_KEYCODE_2:
00664   case IIIMF_KEYCODE_NUMPAD2:
00665     return Qt::Key_2;
00666   case IIIMF_KEYCODE_3:
00667   case IIIMF_KEYCODE_NUMPAD3:
00668     return Qt::Key_3;
00669   case IIIMF_KEYCODE_4:
00670   case IIIMF_KEYCODE_NUMPAD4:
00671     return Qt::Key_4;
00672   case IIIMF_KEYCODE_5:
00673   case IIIMF_KEYCODE_NUMPAD5:
00674     return Qt::Key_5;
00675   case IIIMF_KEYCODE_6:
00676   case IIIMF_KEYCODE_NUMPAD6:
00677     return Qt::Key_6;
00678   case IIIMF_KEYCODE_7:
00679   case IIIMF_KEYCODE_NUMPAD7:
00680     return Qt::Key_7;
00681   case IIIMF_KEYCODE_8:
00682   case IIIMF_KEYCODE_NUMPAD8:
00683     return Qt::Key_8;
00684   case IIIMF_KEYCODE_9:
00685   case IIIMF_KEYCODE_NUMPAD9:
00686     return Qt::Key_9;
00687     
00688   case IIIMF_KEYCODE_SEMICOLON:
00689     return Qt::Key_Semicolon;
00690   case IIIMF_KEYCODE_EQUALS:
00691     return Qt::Key_Equal;
00692   case IIIMF_KEYCODE_A:
00693     return Qt::Key_A;
00694   case IIIMF_KEYCODE_B:
00695     return Qt::Key_B;
00696   case IIIMF_KEYCODE_C:
00697     return Qt::Key_C;
00698   case IIIMF_KEYCODE_D:
00699     return Qt::Key_D;
00700   case IIIMF_KEYCODE_E:
00701     return Qt::Key_E;
00702   case IIIMF_KEYCODE_F:
00703     return Qt::Key_F;
00704   case IIIMF_KEYCODE_G:
00705     return Qt::Key_G;
00706   case IIIMF_KEYCODE_H:
00707     return Qt::Key_H;
00708   case IIIMF_KEYCODE_I:
00709     return Qt::Key_I;
00710   case IIIMF_KEYCODE_J:
00711     return Qt::Key_J;
00712   case IIIMF_KEYCODE_K:
00713     return Qt::Key_K;
00714   case IIIMF_KEYCODE_L:
00715     return Qt::Key_L;
00716   case IIIMF_KEYCODE_M:
00717     return Qt::Key_M;
00718   case IIIMF_KEYCODE_N:
00719     return Qt::Key_N;
00720   case IIIMF_KEYCODE_O:
00721     return Qt::Key_O;
00722   case IIIMF_KEYCODE_P:
00723     return Qt::Key_P;
00724   case IIIMF_KEYCODE_Q:
00725     return Qt::Key_Q;
00726   case IIIMF_KEYCODE_R:
00727     return Qt::Key_R;
00728   case IIIMF_KEYCODE_S:
00729     return Qt::Key_S;
00730   case IIIMF_KEYCODE_T:
00731     return Qt::Key_T;
00732   case IIIMF_KEYCODE_U:
00733     return Qt::Key_U;
00734   case IIIMF_KEYCODE_V:
00735     return Qt::Key_V;
00736   case IIIMF_KEYCODE_W:
00737     return Qt::Key_W;
00738   case IIIMF_KEYCODE_X:
00739     return Qt::Key_X;
00740   case IIIMF_KEYCODE_Y:
00741     return Qt::Key_Y;
00742   case IIIMF_KEYCODE_Z:
00743     return Qt::Key_Z;
00744   case IIIMF_KEYCODE_OPEN_BRACKET:
00745     return Qt::Key_BracketLeft;
00746   case IIIMF_KEYCODE_BACK_SLASH:
00747     return Qt::Key_Backslash;
00748   case IIIMF_KEYCODE_CLOSE_BRACKET:
00749     return Qt::Key_BracketRight;
00750   case IIIMF_KEYCODE_MULTIPLY:
00751     return Qt::Key_multiply;
00752 #if 0
00753   case IIIMF_KEYCODE_ADD:
00754     return GDK_KP_Add;
00755   case IIIMF_KEYCODE_SEPARATOR:
00756     return GDK_KP_Separator;
00757   case IIIMF_KEYCODE_SUBTRACT:
00758     return GDK_KP_Subtract;
00759   case IIIMF_KEYCODE_DECIMAL:
00760     return GDK_KP_Decimal;
00761   case IIIMF_KEYCODE_DIVIDE:
00762     return GDK_KP_Divide;
00763 #endif
00764   case IIIMF_KEYCODE_F1:
00765     return Qt::Key_F1;
00766   case IIIMF_KEYCODE_F2:
00767     return Qt::Key_F2;
00768   case IIIMF_KEYCODE_F3:
00769     return Qt::Key_F3;
00770   case IIIMF_KEYCODE_F4:
00771     return Qt::Key_F4;
00772   case IIIMF_KEYCODE_F5:
00773     return Qt::Key_F5;
00774   case IIIMF_KEYCODE_F6:
00775     return Qt::Key_F6;
00776   case IIIMF_KEYCODE_F7:
00777     return Qt::Key_F7;
00778   case IIIMF_KEYCODE_F8:
00779     return Qt::Key_F8;
00780   case IIIMF_KEYCODE_F9:
00781     return Qt::Key_F9;
00782   case IIIMF_KEYCODE_F10:
00783     return Qt::Key_F10;
00784   case IIIMF_KEYCODE_F11:
00785     return Qt::Key_F11;
00786   case IIIMF_KEYCODE_F12:
00787     return Qt::Key_F12;
00788   case IIIMF_KEYCODE_DELETE:
00789     return Qt::Key_Delete;
00790 #if 0
00791   case IIIMF_KEYCODE_DEAD_GRAVE:
00792     return GDK_dead_grave;
00793   case IIIMF_KEYCODE_DEAD_ACUTE:
00794     return GDK_dead_acute;
00795   case IIIMF_KEYCODE_DEAD_CIRCUMFLEX:
00796     return GDK_dead_circumflex;
00797 
00798   case IIIMF_KEYCODE_DEAD_TILDE:
00799     return GDK_dead_tilde;
00800   case IIIMF_KEYCODE_DEAD_MACRON:
00801     return GDK_dead_macron;
00802   case IIIMF_KEYCODE_DEAD_BREVE:
00803     return GDK_dead_breve;
00804   case IIIMF_KEYCODE_DEAD_ABOVEDOT:
00805     return GDK_dead_abovedot;
00806   case IIIMF_KEYCODE_DEAD_DIAERESIS:
00807     return GDK_dead_diaeresis;
00808   case IIIMF_KEYCODE_DEAD_ABOVERING:
00809     return GDK_dead_abovering;
00810   case IIIMF_KEYCODE_DEAD_DOUBLEACUTE:
00811     return GDK_dead_doubleacute;
00812   case IIIMF_KEYCODE_DEAD_CARON:
00813     return GDK_dead_caron;
00814   case IIIMF_KEYCODE_DEAD_CEDILLA:
00815     return GDK_dead_cedilla;
00816   case IIIMF_KEYCODE_DEAD_OGONEK:
00817     return GDK_dead_ogonek;
00818   case IIIMF_KEYCODE_DEAD_IOTA:
00819     return GDK_dead_iota;
00820   case IIIMF_KEYCODE_DEAD_VOICED_SOUND:
00821     return GDK_dead_voiced_sound;
00822   case IIIMF_KEYCODE_DEAD_SEMIVOICED_SOUND:
00823     return GDK_dead_semivoiced_sound;
00824 #endif
00825   case IIIMF_KEYCODE_NUM_LOCK:
00826     return Qt::Key_NumLock;
00827   case IIIMF_KEYCODE_SCROLL_LOCK:
00828     return Qt::Key_ScrollLock;
00829   case IIIMF_KEYCODE_AMPERSAND:
00830     return Qt::Key_Ampersand;
00831   case IIIMF_KEYCODE_ASTERISK:
00832     return Qt::Key_Asterisk;
00833   case IIIMF_KEYCODE_QUOTEDBL:
00834     return Qt::Key_QuoteDbl;
00835 #if 0
00836   case IIIMF_KEYCODE_LESS:
00837     return GDK_less;
00838   case IIIMF_KEYCODE_PRINTSCREEN:
00839     return GDK_Print;
00840   case IIIMF_KEYCODE_INSERT:
00841     return GDK_Insert;
00842   case IIIMF_KEYCODE_HELP:
00843     return GDK_Help;
00844   case IIIMF_KEYCODE_META:
00845     return GDK_Meta_L;
00846   case IIIMF_KEYCODE_GREATER:
00847     return GDK_greater;
00848   case IIIMF_KEYCODE_BRACELEFT:
00849     return GDK_braceleft;
00850   case IIIMF_KEYCODE_BRACERIGHT:
00851     return GDK_braceright;
00852   case IIIMF_KEYCODE_BACK_QUOTE:
00853     return GDK_grave;
00854   case IIIMF_KEYCODE_QUOTE:
00855     return GDK_apostrophe;
00856   case IIIMF_KEYCODE_KP_UP:
00857     return GDK_KP_Up;
00858   case IIIMF_KEYCODE_KP_DOWN:
00859     return GDK_KP_Down;
00860   case IIIMF_KEYCODE_KP_LEFT:
00861     return GDK_KP_Left;
00862   case IIIMF_KEYCODE_KP_RIGHT:
00863     return GDK_KP_Right;
00864     /* case IIIMF_KEYCODE_ALPHANUMERIC */
00865   case IIIMF_KEYCODE_KATAKANA:
00866     return GDK_Katakana;
00867   case IIIMF_KEYCODE_HIRAGANA:
00868     return GDK_Hiragana;
00869   case IIIMF_KEYCODE_FULL_WIDTH:
00870     return GDK_Zenkaku;
00871   case IIIMF_KEYCODE_HALF_WIDTH:
00872     return GDK_Hankaku;
00873   case IIIMF_KEYCODE_ROMAN_CHARACTERS:
00874     return GDK_Romaji;
00875     /* case IIIMF_KEYCODE_ALL_CANDIDATES */
00876   case IIIMF_KEYCODE_PREVIOUS_CANDIDATE:
00877     return GDK_PreviousCandidate;
00878   case IIIMF_KEYCODE_CODE_INPUT:
00879     return GDK_Codeinput;
00880   case IIIMF_KEYCODE_JAPANESE_KATAKANA:
00881     return GDK_Katakana;
00882   case IIIMF_KEYCODE_JAPANESE_HIRAGANA:
00883     return GDK_Hiragana;
00884     /* case IIIMF_KEYCODE_JAPANESE_ROMAN */
00885   case IIIMF_KEYCODE_KANA_LOCK:
00886     return GDK_Kana_Lock;
00887     /* case IIIMF_KEYCODE_INPUT_METHOD_ON_OFF */
00888   case IIIMF_KEYCODE_AT:
00889     return GDK_at;
00890   case IIIMF_KEYCODE_COLON:
00891     return GDK_colon;
00892   case IIIMF_KEYCODE_CIRCUMFLEX:
00893     return GDK_asciicircum;
00894   case IIIMF_KEYCODE_DOLLAR:
00895     return GDK_dollar;
00896   case IIIMF_KEYCODE_EURO_SIGN:
00897     return GDK_EuroSign;
00898   case IIIMF_KEYCODE_EXCLAMATION_MARK:
00899     return GDK_exclam;
00900   case IIIMF_KEYCODE_INVERTED_EXCLAMATION_MARK:
00901     return GDK_exclamdown;
00902   case IIIMF_KEYCODE_LEFT_PARENTHESIS:
00903     return GDK_parenleft;
00904   case IIIMF_KEYCODE_NUMBER_SIGN:
00905     return GDK_numbersign;
00906   case IIIMF_KEYCODE_PLUS:
00907     return GDK_plus;
00908   case IIIMF_KEYCODE_RIGHT_PARENTHESIS:
00909     return GDK_parenright;
00910   case IIIMF_KEYCODE_UNDERSCORE:
00911     return GDK_underscore;
00912   case IIIMF_KEYCODE_F13:
00913     return GDK_F13;
00914   case IIIMF_KEYCODE_F14:
00915     return GDK_F14;
00916   case IIIMF_KEYCODE_F15:
00917     return GDK_F15;
00918   case IIIMF_KEYCODE_F16:
00919     return GDK_F16;
00920   case IIIMF_KEYCODE_F17:
00921     return GDK_F17;
00922   case IIIMF_KEYCODE_F18:
00923     return GDK_F18;
00924   case IIIMF_KEYCODE_F19:
00925     return GDK_F19;
00926   case IIIMF_KEYCODE_F20:
00927     return GDK_F20;
00928   case IIIMF_KEYCODE_F21:
00929     return GDK_F21;
00930   case IIIMF_KEYCODE_F22:
00931     return GDK_F22;
00932   case IIIMF_KEYCODE_F23:
00933     return GDK_F23;
00934   case IIIMF_KEYCODE_F24:
00935     return GDK_F24;
00936     /*
00937       case IIIMF_KEYCODE_COMPOSE:
00938       case IIIMF_KEYCODE_ALT_GRAPH
00939       case IIIMF_KEYCODE_STOP
00940       case IIIMF_KEYCODE_AGAIN
00941       case IIIMF_KEYCODE_PROPS
00942     */
00943   case IIIMF_KEYCODE_UNDO:
00944     return GDK_Undo;
00945     /*
00946       case IIIMF_KEYCODE_COPY
00947       case IIIMF_KEYCODE_PASTE
00948     */
00949   case IIIMF_KEYCODE_FIND:
00950     return GDK_Find;
00951     /* case IIIMF_KEYCODE_CUT */
00952   default:
00953     return (guint) (kv & 0xff);
00954 #endif
00955   default:
00956     return 0;
00957 
00958   }
00959   return 0;
00960 }