Back to index

im-sdk  12.3.91
Enumerations | Functions
IIIMGdkEventKey.h File Reference
#include <iiimcf.h>
#include <gdk/gdk.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  IIIMF_MODIFIERS {
  IIIMF_SHIFT_MODIFIER = 1, IIIMF_CONTROL_MODIFIER = 2, IIIMF_META_MODIFIER = 4, IIIMF_ALT_MODIFIER = 8,
  IIIMF_ALT_GRAPH_MODIFIER = 32, IIIMF_SHIFT_MODIFIER = 1, IIIMF_CONTROL_MODIFIER = 2, IIIMF_META_MODIFIER = 4,
  IIIMF_ALT_MODIFIER = 8, IIIMF_ALT_GRAPH_MODIFIER = 32, IIIMF_SHIFT_MODIFIER = 1, IIIMF_CONTROL_MODIFIER = 2,
  IIIMF_META_MODIFIER = 4, IIIMF_ALT_MODIFIER = 8
}

Functions

IIIMF_status convert_GdkEventKey_to_IIIMCF_keyevent (GdkEventKey *e, IIIMCF_keyevent *pkev)
IIIMF_status convert_IIIMCF_keyevent_to_GdkEventKey (IIIMCF_keyevent *pkev, GdkEventKey *e)
int g2icode (guint)

Enumeration Type Documentation

Enumerator:
IIIMF_SHIFT_MODIFIER 
IIIMF_CONTROL_MODIFIER 
IIIMF_META_MODIFIER 
IIIMF_ALT_MODIFIER 
IIIMF_ALT_GRAPH_MODIFIER 
IIIMF_SHIFT_MODIFIER 
IIIMF_CONTROL_MODIFIER 
IIIMF_META_MODIFIER 
IIIMF_ALT_MODIFIER 
IIIMF_ALT_GRAPH_MODIFIER 
IIIMF_SHIFT_MODIFIER 
IIIMF_CONTROL_MODIFIER 
IIIMF_META_MODIFIER 
IIIMF_ALT_MODIFIER 

Definition at line 38 of file IIIMGdkEventKey.h.


Function Documentation

Definition at line 825 of file IIIMGdkEventKey.c.

{
  int c;
  guint keyval;
  int key_release;

  key_release = ((e->type == GDK_KEY_PRESS) ? 0 : 0x80000000);

#if    USE_KANA_TABLE
  gint kanaflag;
  gint i;

  kanaflag = get_kana_flag(e);
  if (kanaflag >= 0)
    {
      if (e->keyval == GDK_Hiragana_Katakana)
        toggle_kana_flag(e);
    }

  if (kanaflag == 1)
    {
      if (e->state & GDK_SHIFT_MASK)
        {
          /* check kana_shift_keymapTable first is ShiftMask */
          for (i = 0; kana_shift_keymapTable[i].iiimf_keycode != 0; i++)
            {
              if (kana_shift_keymapTable[i].hardware_keycode == e->hardware_keycode)
                {
                  pkev->keycode = kana_shift_keymapTable[i].iiimf_keycode;
                  pkev->keychar = kana_shift_keymapTable[i].iiimf_keychar;
                  if (pkev->keycode)
                    {
                      pkev->modifier = (modifier (e->state) | key_release);
                      pkev->time_stamp = e->time;
                      return IIIMF_STATUS_SUCCESS;
                    }
                  break;
                }
            }
        }

      for (i = 0; kana_normal_keymapTable[i].iiimf_keycode != 0; i++)
        {
          if (kana_normal_keymapTable[i].hardware_keycode == e->hardware_keycode)
            {
              pkev->keycode = kana_normal_keymapTable[i].iiimf_keycode;
              pkev->keychar = kana_normal_keymapTable[i].iiimf_keychar;
              if (pkev->keycode)
                {
                  pkev->modifier = (modifier (e->state) | key_release);
                  pkev->time_stamp = e->time;
                  return IIIMF_STATUS_SUCCESS;
                }
              break;
            }
        }

      for (i = 0; kana_shift_keymapTable[i].iiimf_keycode != 0; i++)
        {
          if (kana_shift_keymapTable[i].hardware_keycode == e->hardware_keycode)
            {
              pkev->keycode = kana_shift_keymapTable[i].iiimf_keycode;
              pkev->keychar = kana_shift_keymapTable[i].iiimf_keychar;
              if (pkev->keycode)
                {
                  pkev->modifier = (modifier (e->state) | key_release);
                  pkev->time_stamp = e->time;
                  return IIIMF_STATUS_SUCCESS;
                }
              break;
            }
        }
    }
  else
    {
      for (i = 0; kana_normal_keymapTable[i].iiimf_keycode != 0; i++)
        {
          if (kana_normal_keymapTable[i].gdk_keysym == e->keyval)
            {
              pkev->keycode = kana_normal_keymapTable[i].iiimf_keycode;
              pkev->keychar = kana_normal_keymapTable[i].iiimf_keychar;
              if (pkev->keycode)
                {
                  pkev->modifier = (modifier (e->state) | key_release);
                  pkev->time_stamp = e->time;
                  return IIIMF_STATUS_SUCCESS;
                }
              break;
            }
        }

      for (i = 0; kana_shift_keymapTable[i].iiimf_keycode != 0; i++)
        {
          if (kana_shift_keymapTable[i].gdk_keysym == e->keyval)
            {
              pkev->keycode = kana_normal_keymapTable[i].iiimf_keycode;
              pkev->keychar = kana_normal_keymapTable[i].iiimf_keychar;
              if (pkev->keycode)
                {
                  pkev->modifier = (modifier (e->state) | key_release);
                  pkev->time_stamp = e->time;
                  return IIIMF_STATUS_SUCCESS;
                }
              break;
            }
        }
    }
#endif /* USE_KANA_TABLE */

  /* first, try to get keycode from KeySym */
  c = g2icode (e->keyval);
  if (c == 0)
    {
      GdkKeymap *keymap;
#if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 2
      keymap =
       gdk_keymap_get_for_display (gdk_drawable_get_display (e->window));
#else
      keymap = gdk_keymap_get_default ();
#endif
      /* 
       * Cannot get IIIMF keycode from keysym.
       * So, we genarate base keysym by ignoring mod mask from hardware keycode.
       */
      if (!gdk_keymap_translate_keyboard_state (keymap, e->hardware_keycode,
                                          0, 0, &keyval, NULL, NULL,
                                          NULL))
       return IIIMF_STATUS_FAIL;


      /* retry */
      c = g2icode (keyval);

      if (c == 0)
       return IIIMF_STATUS_FAIL;
    }
  if (c < 0)
    {
      pkev->keychar = 0;
      pkev->keycode = -c;
    }
  else
    {
      pkev->keychar = gdk_keyval_to_unicode (e->keyval);
      pkev->keycode = c;
    }
  pkev->modifier = (modifier (e->state) | key_release);

  pkev->time_stamp = e->time;

  return IIIMF_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1388 of file IIIMGdkEventKey.c.

{
  guint c;
  GdkKeymap *keymap;
  GdkKeymapKey *keys;
  gint n_keys;

#if    USE_KANA_TABLE
  gint i;

  for (i = 0; kana_normal_keymapTable[i].iiimf_keycode != 0; i++)
    {
      if (kana_normal_keymapTable[i].iiimf_keychar == pkev->keychar)
        {
          e->keyval = kana_normal_keymapTable[i].gdk_keysym;
          goto FINDKEYVAL;

          break;
        }
    }

  for (i = 0; kana_shift_keymapTable[i].iiimf_keycode != 0; i++)
    {
      if (kana_shift_keymapTable[i].iiimf_keychar == pkev->keychar)
        {
          e->keyval = kana_shift_keymapTable[i].gdk_keysym;
          goto FINDKEYVAL;

          break;
        }
    }
#endif /* USE_KANA_TABLE */

  if (pkev->keychar)
    {
      e->keyval = gdk_unicode_to_keyval (pkev->keychar);
    }
  else
    {
      c = i2gcode (pkev->keycode, pkev->keychar);
      if (c == 0)
       return IIIMF_STATUS_FAIL;
      e->keyval = c;
    }

#if    USE_KANA_TABLE
FINDKEYVAL:
#endif /* USE_KANA_TABLE */

#if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 2
  keymap = gdk_keymap_get_for_display (gdk_drawable_get_display (e->window));
#else
  keymap = gdk_keymap_get_default ();
#endif


  e->state = i2gmodifier (pkev->modifier);

  if (!gdk_keymap_get_entries_for_keyval (keymap, e->keyval, &keys, &n_keys))
    return IIIMF_STATUS_FAIL;

  if (n_keys)
    {
      e->hardware_keycode = keys[0].keycode;
      g_free (keys);
    }

  e->time = pkev->time_stamp;

  return IIIMF_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int g2icode ( guint  )

Definition at line 323 of file IIIMGdkEventKey.c.

{
  switch (kv)
    {
    case GDK_VoidSymbol:
      return 0;
    case GDK_BackSpace:
      return IIIMF_KEYCODE_BACK_SPACE;
    case GDK_Tab:
      return IIIMF_KEYCODE_TAB;
    case GDK_Linefeed:
      return IIIMF_KEYCODE_ENTER;
    case GDK_Clear:
      return -IIIMF_KEYCODE_CLEAR;
    case GDK_Return:
      return IIIMF_KEYCODE_ENTER;
    case GDK_Pause:
      return IIIMF_KEYCODE_PAUSE;
    case GDK_Scroll_Lock:
      return -IIIMF_KEYCODE_SCROLL_LOCK;
    case GDK_Sys_Req:
      return 0;
    case GDK_Escape:
      return IIIMF_KEYCODE_ESCAPE;
    case GDK_Delete:
      return IIIMF_KEYCODE_DELETE;
    case GDK_Multi_key:
      return IIIMF_KEYCODE_COMPOSE;
    case GDK_Codeinput:
      return -IIIMF_KEYCODE_CODE_INPUT;
    case GDK_SingleCandidate:
    case GDK_MultipleCandidate:
      return 0;
    case GDK_PreviousCandidate:
      return -IIIMF_KEYCODE_PREVIOUS_CANDIDATE;
    case GDK_Kanji:
#ifdef linux
      return -IIIMF_KEYCODE_KANJI;
#else
      return -IIIMF_KEYCODE_CONVERT;
#endif
    case GDK_Muhenkan:
    case GDK_Execute:
      return -IIIMF_KEYCODE_NONCONVERT;
    case GDK_Henkan_Mode:
      /* case GDK_Henkan: */
#ifdef linux
      return -IIIMF_KEYCODE_CONVERT;
#else
      return -IIIMF_KEYCODE_KANJI;
#endif
    case GDK_Romaji:
      return -IIIMF_KEYCODE_ROMAN_CHARACTERS;
    case GDK_Hiragana:
      return -IIIMF_KEYCODE_HIRAGANA;
    case GDK_Katakana:
      return -IIIMF_KEYCODE_KATAKANA;
    case GDK_Hiragana_Katakana:
      return 0;
    case GDK_Zenkaku:
      return -IIIMF_KEYCODE_FULL_WIDTH;
    case GDK_Hankaku:
      return -IIIMF_KEYCODE_HALF_WIDTH;
    case GDK_Kana_Lock:
      return -IIIMF_KEYCODE_KANA_LOCK;
    case GDK_Home:
      return -IIIMF_KEYCODE_HOME;
    case GDK_Left:
      return -IIIMF_KEYCODE_LEFT;
    case GDK_Up:
      return -IIIMF_KEYCODE_UP;
    case GDK_Right:
      return -IIIMF_KEYCODE_RIGHT;
    case GDK_Down:
      return -IIIMF_KEYCODE_DOWN;
    case GDK_Page_Up:
      return -IIIMF_KEYCODE_PAGE_UP;
    case GDK_Page_Down:
      return -IIIMF_KEYCODE_PAGE_DOWN;
    case GDK_End:
      return -IIIMF_KEYCODE_END;
    case GDK_Print:
      return -IIIMF_KEYCODE_PRINTSCREEN;
    case GDK_Insert:
      return IIIMF_KEYCODE_INSERT;
    case GDK_Undo:
      return -IIIMF_KEYCODE_UNDO;
    case GDK_Find:
      return -IIIMF_KEYCODE_FIND;
    case GDK_Cancel:
      return -IIIMF_KEYCODE_CANCEL;
    case GDK_Help:
      return -IIIMF_KEYCODE_HELP;
    case GDK_Mode_switch:
      /* case GDK_script_switch: */
      return -IIIMF_KEYCODE_MODECHANGE;
    case GDK_Num_Lock:
      return -IIIMF_KEYCODE_NUM_LOCK;
    case GDK_KP_Space:
      return IIIMF_KEYCODE_SPACE;
    case GDK_KP_Tab:
      return IIIMF_KEYCODE_TAB;
    case GDK_KP_Enter:
      return IIIMF_KEYCODE_ENTER;
    case GDK_KP_F1:
      return -IIIMF_KEYCODE_F1;
    case GDK_KP_F2:
      return -IIIMF_KEYCODE_F2;
    case GDK_KP_F3:
      return -IIIMF_KEYCODE_F3;
    case GDK_KP_F4:
      return -IIIMF_KEYCODE_F4;
    case GDK_KP_Home:
      return -IIIMF_KEYCODE_HOME;
    case GDK_KP_Left:
      return -IIIMF_KEYCODE_LEFT;
    case GDK_KP_Up:
      return -IIIMF_KEYCODE_UP;
    case GDK_KP_Right:
      return -IIIMF_KEYCODE_RIGHT;
    case GDK_KP_Down:
      return -IIIMF_KEYCODE_DOWN;
    case GDK_KP_Page_Up:
      return -IIIMF_KEYCODE_PAGE_UP;
    case GDK_KP_Page_Down:
      return -IIIMF_KEYCODE_PAGE_DOWN;
    case GDK_KP_End:
      return -IIIMF_KEYCODE_END;
    case GDK_KP_Insert:
      return IIIMF_KEYCODE_INSERT;
    case GDK_KP_Delete:
      return IIIMF_KEYCODE_DELETE;
    case GDK_KP_Equal:
      return IIIMF_KEYCODE_EQUALS;
    case GDK_KP_Multiply:
      return IIIMF_KEYCODE_MULTIPLY;
    case GDK_KP_Add:
      return IIIMF_KEYCODE_ADD;
    case GDK_KP_Separator:
      return IIIMF_KEYCODE_SEPARATOR;
    case GDK_KP_Subtract:
      return IIIMF_KEYCODE_SUBTRACT;
    case GDK_KP_Decimal:
      return IIIMF_KEYCODE_DECIMAL;
    case GDK_KP_Divide:
      return IIIMF_KEYCODE_DIVIDE;
    case GDK_KP_0:
      return IIIMF_KEYCODE_NUMPAD0;
    case GDK_KP_1:
      return IIIMF_KEYCODE_NUMPAD1;
    case GDK_KP_2:
      return IIIMF_KEYCODE_NUMPAD2;
    case GDK_KP_3:
      return IIIMF_KEYCODE_NUMPAD3;
    case GDK_KP_4:
      return IIIMF_KEYCODE_NUMPAD4;
    case GDK_KP_5:
      return IIIMF_KEYCODE_NUMPAD5;
    case GDK_KP_6:
      return IIIMF_KEYCODE_NUMPAD6;
    case GDK_KP_7:
      return IIIMF_KEYCODE_NUMPAD7;
    case GDK_KP_8:
      return IIIMF_KEYCODE_NUMPAD8;
    case GDK_KP_9:
      return IIIMF_KEYCODE_NUMPAD9;
    case GDK_F1:
      return -IIIMF_KEYCODE_F1;
    case GDK_F2:
      return -IIIMF_KEYCODE_F2;
    case GDK_F3:
      return -IIIMF_KEYCODE_F3;
    case GDK_F4:
      return -IIIMF_KEYCODE_F4;
    case GDK_F5:
      return -IIIMF_KEYCODE_F5;
    case GDK_F6:
      return -IIIMF_KEYCODE_F6;
    case GDK_F7:
      return -IIIMF_KEYCODE_F7;
    case GDK_F8:
      return -IIIMF_KEYCODE_F8;
    case GDK_F9:
      return -IIIMF_KEYCODE_F9;
    case GDK_F10:
      return -IIIMF_KEYCODE_F10;
#if defined(SunXK_F36)
    case SunXK_F36:
#endif /* SunXK_F36 */
    case GDK_F11:
      /*case GDK_L1: */
      return -IIIMF_KEYCODE_F11;
#if defined(SunXK_F37)
    case SunXK_F37:
#endif /* SunXK_F37 */
    case GDK_F12:
      /* case GDK_L2: */
      return -IIIMF_KEYCODE_F12;
    case GDK_F13:
      /* case GDK_L3: */
      return -IIIMF_KEYCODE_F13;
    case GDK_F14:
      /* case GDK_L4: */
      return -IIIMF_KEYCODE_F14;
    case GDK_F15:
      /* case GDK_L5: */
      return -IIIMF_KEYCODE_F15;
    case GDK_F16:
      /* case GDK_L6: */
      return -IIIMF_KEYCODE_F16;
    case GDK_F17:
      /* case GDK_L7: */
      return -IIIMF_KEYCODE_F17;
    case GDK_F18:
      /* case GDK_L8: */
      return -IIIMF_KEYCODE_F18;
    case GDK_F19:
      /* case GDK_L9: */
      return -IIIMF_KEYCODE_F19;
    case GDK_F20:
      /* case GDK_L10: */
      return -IIIMF_KEYCODE_F20;
    case GDK_F21:
      /* case GDK_R1: */
      return -IIIMF_KEYCODE_F21;
    case GDK_F22:
      /* case GDK_R2: */
      return -IIIMF_KEYCODE_F22;
    case GDK_F23:
      /* case GDK_R3: */
      return -IIIMF_KEYCODE_F23;
    case GDK_F24:
      /* case GDK_R4: */
      return -IIIMF_KEYCODE_F24;
    case GDK_Shift_L:
    case GDK_Shift_R:
      return -IIIMF_KEYCODE_SHIFT;
    case GDK_Control_L:
    case GDK_Control_R:
      return -IIIMF_KEYCODE_CONTROL;
    case GDK_Caps_Lock:
      return -IIIMF_KEYCODE_CAPS_LOCK;
    case GDK_Meta_L:
    case GDK_Meta_R:
      return -IIIMF_KEYCODE_META;
    case GDK_Alt_L:
    case GDK_Alt_R:
      return -IIIMF_KEYCODE_ALT;
    case GDK_dead_grave:
      return IIIMF_KEYCODE_DEAD_GRAVE;
    case GDK_dead_acute:
      return IIIMF_KEYCODE_DEAD_ACUTE;
    case GDK_dead_circumflex:
      return IIIMF_KEYCODE_DEAD_CIRCUMFLEX;
    case GDK_dead_tilde:
      return IIIMF_KEYCODE_DEAD_TILDE;
    case GDK_dead_macron:
      return IIIMF_KEYCODE_DEAD_MACRON;
    case GDK_dead_breve:
      return IIIMF_KEYCODE_DEAD_BREVE;
    case GDK_dead_abovedot:
      return IIIMF_KEYCODE_DEAD_ABOVEDOT;
    case GDK_dead_diaeresis:
      return IIIMF_KEYCODE_DEAD_DIAERESIS;
    case GDK_dead_abovering:
      return IIIMF_KEYCODE_DEAD_ABOVERING;
    case GDK_dead_doubleacute:
      return IIIMF_KEYCODE_DEAD_DOUBLEACUTE;
    case GDK_dead_caron:
      return IIIMF_KEYCODE_DEAD_CARON;
    case GDK_dead_cedilla:
      return IIIMF_KEYCODE_DEAD_CEDILLA;
    case GDK_dead_ogonek:
      return IIIMF_KEYCODE_DEAD_OGONEK;
    case GDK_dead_iota:
      return IIIMF_KEYCODE_DEAD_IOTA;
    case GDK_dead_voiced_sound:
      return IIIMF_KEYCODE_DEAD_VOICED_SOUND;
    case GDK_dead_semivoiced_sound:
      return IIIMF_KEYCODE_DEAD_SEMIVOICED_SOUND;

    case GDK_space:
      return IIIMF_KEYCODE_SPACE;
    case GDK_exclam:
      return IIIMF_KEYCODE_EXCLAMATION_MARK;
    case GDK_quotedbl:
      return IIIMF_KEYCODE_QUOTEDBL;
    case GDK_numbersign:
      return IIIMF_KEYCODE_NUMBER_SIGN;
    case GDK_dollar:
      return IIIMF_KEYCODE_DOLLAR;
    case GDK_ampersand:
      return IIIMF_KEYCODE_AMPERSAND;
    case GDK_apostrophe:
      /* case GDK_quoteright: */
      return IIIMF_KEYCODE_QUOTE;
    case GDK_parenleft:
      return IIIMF_KEYCODE_LEFT_PARENTHESIS;
    case GDK_parenright:
      return IIIMF_KEYCODE_RIGHT_PARENTHESIS;
    case GDK_asterisk:
      return IIIMF_KEYCODE_ASTERISK;
    case GDK_plus:
      return IIIMF_KEYCODE_PLUS;
    case GDK_comma:
      return IIIMF_KEYCODE_COMMA;
    case GDK_minus:
      return IIIMF_KEYCODE_MINUS;
    case GDK_period:
      return IIIMF_KEYCODE_PERIOD;
    case GDK_slash:
      return IIIMF_KEYCODE_SLASH;
    case GDK_0:
      return IIIMF_KEYCODE_0;
    case GDK_1:
      return IIIMF_KEYCODE_1;
    case GDK_2:
      return IIIMF_KEYCODE_2;
    case GDK_3:
      return IIIMF_KEYCODE_3;
    case GDK_4:
      return IIIMF_KEYCODE_4;
    case GDK_5:
      return IIIMF_KEYCODE_5;
    case GDK_6:
      return IIIMF_KEYCODE_6;
    case GDK_7:
      return IIIMF_KEYCODE_7;
    case GDK_8:
      return IIIMF_KEYCODE_8;
    case GDK_9:
      return IIIMF_KEYCODE_9;
    case GDK_colon:
      return IIIMF_KEYCODE_COLON;
    case GDK_semicolon:
      return IIIMF_KEYCODE_SEMICOLON;
    case GDK_less:
      return IIIMF_KEYCODE_LESS;
    case GDK_equal:
      return IIIMF_KEYCODE_EQUALS;
    case GDK_greater:
      return IIIMF_KEYCODE_GREATER;
    case GDK_at:
      return IIIMF_KEYCODE_AT;
    case GDK_A:
      return IIIMF_KEYCODE_A;
    case GDK_B:
      return IIIMF_KEYCODE_B;
    case GDK_C:
      return IIIMF_KEYCODE_C;
    case GDK_D:
      return IIIMF_KEYCODE_D;
    case GDK_E:
      return IIIMF_KEYCODE_E;
    case GDK_F:
      return IIIMF_KEYCODE_F;
    case GDK_G:
      return IIIMF_KEYCODE_G;
    case GDK_H:
      return IIIMF_KEYCODE_H;
    case GDK_I:
      return IIIMF_KEYCODE_I;
    case GDK_J:
      return IIIMF_KEYCODE_J;
    case GDK_K:
      return IIIMF_KEYCODE_K;
    case GDK_L:
      return IIIMF_KEYCODE_L;
    case GDK_M:
      return IIIMF_KEYCODE_M;
    case GDK_N:
      return IIIMF_KEYCODE_N;
    case GDK_O:
      return IIIMF_KEYCODE_O;
    case GDK_P:
      return IIIMF_KEYCODE_P;
    case GDK_Q:
      return IIIMF_KEYCODE_Q;
    case GDK_R:
      return IIIMF_KEYCODE_R;
    case GDK_S:
      return IIIMF_KEYCODE_S;
    case GDK_T:
      return IIIMF_KEYCODE_T;
    case GDK_U:
      return IIIMF_KEYCODE_U;
    case GDK_V:
      return IIIMF_KEYCODE_V;
    case GDK_W:
      return IIIMF_KEYCODE_W;
    case GDK_X:
      return IIIMF_KEYCODE_X;
    case GDK_Y:
      return IIIMF_KEYCODE_Y;
    case GDK_Z:
      return IIIMF_KEYCODE_Z;

    case GDK_bracketleft:
      return IIIMF_KEYCODE_OPEN_BRACKET;
    case GDK_backslash:
      return IIIMF_KEYCODE_BACK_SLASH;
    case GDK_bracketright:
      return IIIMF_KEYCODE_CLOSE_BRACKET;
    case GDK_asciicircum:
      return IIIMF_KEYCODE_CIRCUMFLEX;
    case GDK_underscore:
      return IIIMF_KEYCODE_UNDERSCORE;
    case GDK_grave:
      /* case GDK_quoteleft: */
      return IIIMF_KEYCODE_BACK_QUOTE;

    case GDK_a:
      return IIIMF_KEYCODE_A;
    case GDK_b:
      return IIIMF_KEYCODE_B;
    case GDK_c:
      return IIIMF_KEYCODE_C;
    case GDK_d:
      return IIIMF_KEYCODE_D;
    case GDK_e:
      return IIIMF_KEYCODE_E;
    case GDK_f:
      return IIIMF_KEYCODE_F;
    case GDK_g:
      return IIIMF_KEYCODE_G;
    case GDK_h:
      return IIIMF_KEYCODE_H;
    case GDK_i:
      return IIIMF_KEYCODE_I;
    case GDK_j:
      return IIIMF_KEYCODE_J;
    case GDK_k:
      return IIIMF_KEYCODE_K;
    case GDK_l:
      return IIIMF_KEYCODE_L;
    case GDK_m:
      return IIIMF_KEYCODE_M;
    case GDK_n:
      return IIIMF_KEYCODE_N;
    case GDK_o:
      return IIIMF_KEYCODE_O;
    case GDK_p:
      return IIIMF_KEYCODE_P;
    case GDK_q:
      return IIIMF_KEYCODE_Q;
    case GDK_r:
      return IIIMF_KEYCODE_R;
    case GDK_s:
      return IIIMF_KEYCODE_S;
    case GDK_t:
      return IIIMF_KEYCODE_T;
    case GDK_u:
      return IIIMF_KEYCODE_U;
    case GDK_v:
      return IIIMF_KEYCODE_V;
    case GDK_w:
      return IIIMF_KEYCODE_W;
    case GDK_x:
      return IIIMF_KEYCODE_X;
    case GDK_y:
      return IIIMF_KEYCODE_Y;
    case GDK_z:
      return IIIMF_KEYCODE_Z;
    case GDK_braceleft:
      return IIIMF_KEYCODE_BRACELEFT;
    case GDK_braceright:
      return IIIMF_KEYCODE_BRACERIGHT;

    case GDK_exclamdown:
      return IIIMF_KEYCODE_INVERTED_EXCLAMATION_MARK;

    case GDK_EuroSign:
      return IIIMF_KEYCODE_EURO_SIGN;

    case GDK_Zenkaku_Hankaku:
      return IIIMF_KEYCODE_KANJI;

    default:
      return 0;
    }

  return 0;
}

Here is the caller graph for this function: