Permalink
Browse files

add the last esc key. all common keys should be implemented

  • Loading branch information...
1 parent cc435c5 commit b7afa89dbc6f8fe541765602aac8bb4fccb94272 Your Name committed Jan 1, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/eim.c
View
@@ -122,6 +122,9 @@ INPUT_RETURN_VALUE FcitxChewingDoInput(void* arg, FcitxKeySym sym, unsigned int
else if (FcitxHotkeyIsHotKey(sym, state, FCITX_SPACE)) {
chewing_handle_Space(c);
}
+ else if (FcitxHotkeyIsHotKey(sym, state, FCITX_ESCAPE)) {
+ chewing_handle_Esc(c);
+ }
else if (FcitxHotkeyIsHotKey(sym, state, FCITX_CHEWING_UP)) {
chewing_handle_Up(c);
}
@@ -135,7 +138,7 @@ INPUT_RETURN_VALUE FcitxChewingDoInput(void* arg, FcitxKeySym sym, unsigned int
chewing_handle_Left(c);
}
else if (FcitxHotkeyIsHotKey(sym, state, FCITX_ENTER)) {
- chewing_handle_Enter(c);
+ chewing_handle_Enter(c);
}
else {
// to do: more chewing_handle
@@ -221,11 +224,10 @@ INPUT_RETURN_VALUE FcitxChewingGetCandWords(void* arg)
FcitxLog(INFO, "buf len: %d, cur: %d", buf_len, cur);
int rcur = FcitxChewingGetRawCursorPos(buf_str, cur);
FcitxInputStateSetCursorPos(input, rcur);
-
// insert zuin in the middle
char * half1 = strndup(buf_str, rcur);
- char * half2 = strdup(buf_str+rcur);
+ char * half2 = strdup(buf_str + rcur);
FcitxMessagesAddMessageAtLast(msgPreedit, MSG_INPUT, "%s%s%s", half1, zuin_str, half2);
chewing_free(buf_str); chewing_free(zuin_str);

1 comment on commit b7afa89

Contributor

wengxt commented on b7afa89 Jan 2, 2012

Check your git user.name and user.email

Please sign in to comment.