if (context_hangul->choseong != 0 || context_hangul->jungseong != 0 || context_hangul->jongseong != 0) { im_hangul_commit(context_hangul);
if (im_hangul_commit(context_hangul))
im_hangul_filter_keypress(GtkIMContext *context, GdkEventKey *key){  GtkIMContextHangul *context_hangul = GTK_IM_CONTEXT_HANGUL(context);  /* ignore key release */  if (key->type == GDK_KEY_RELEASE) {    return FALSE;  }  /* some keys are ignored */  if (im_hangul_is_ignore_key(key->keyval)) {    return FALSE;  }  /* handle direct mode */  if (input_mode == MODE_DIRECT) {    return im_hangul_handle_direct_mode(context_hangul, key);  }  /* handle Escape key: automaticaly change to direct mode */  if (key->keyval == GDK_Escape) {    if (context_hangul->choseong != 0 ||	context_hangul->jungseong != 0 ||	context_hangul->jongseong != 0) {      im_hangul_commit(context_hangul);      g_signal_emit_by_name (context_hangul, "preedit_changed");    }    im_hangul_mode_direct(context_hangul);    return FALSE;  }  /* modifiler key */  if (im_hangul_is_modifier(key->state)) {    if (context_hangul->choseong != 0 ||	context_hangul->jungseong != 0 ||	context_hangul->jongseong != 0) {      im_hangul_commit(context_hangul);      g_signal_emit_by_name (context_hangul, "preedit_changed");    }    return FALSE;  }  /* hanja key */  if (key->keyval == GDK_F9 || key->keyval == GDK_Hangul_Hanja) {    popup_hanja_window(context_hangul);    return TRUE;  }  /* here we must hangul mode, so set STATE_HANGUL   * static variable input_mode is not yet applied so we change it   * below line must not removed */  if (context_hangul->state == STATE_DIRECT)    context_hangul->state = STATE_HANGUL;  if (context_hangul->automata)    return context_hangul->automata(context_hangul, key);  else    return FALSE;}