diff options
author | Eduardo Lima (Etrunko) <eduardo.lima@intel.com> | 2013-10-02 12:16:37 -0300 |
---|---|---|
committer | Eduardo Lima (Etrunko) <eduardo.lima@intel.com> | 2013-10-02 12:16:37 -0300 |
commit | bed426c7632bf1e2df82ebf8e7a3e24f9ba7282e (patch) | |
tree | 0096c6c416e26ee6796500d1dc44e07b5332867a | |
parent | bb0e7c542f1ad6c44c7bdd1e81bf38526de54922 (diff) | |
download | weekeyboard-bed426c7632bf1e2df82ebf8e7a3e24f9ba7282e.tar.gz weekeyboard-bed426c7632bf1e2df82ebf8e7a3e24f9ba7282e.tar.bz2 weekeyboard-bed426c7632bf1e2df82ebf8e7a3e24f9ba7282e.zip |
Fix handling of backspace key press
Change-Id: I5f3aca27d1e03636dfcda1d5204abd9c7a4b0ed9
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
-rw-r--r-- | src/wkb-main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wkb-main.c b/src/wkb-main.c index d3b1b19..9509cd4 100644 --- a/src/wkb-main.c +++ b/src/wkb-main.c @@ -177,7 +177,10 @@ _cb_wkb_on_key_down(void *data, Evas_Object *obj, const char *emission EINA_UNUS else if (strcmp(key, "backspace") == 0) { if (strlen(wkb->preedit_str) == 0) + { wl_input_method_context_delete_surrounding_text(wkb->im_ctx, -1, 1); + wl_input_method_context_commit_string(wkb->im_ctx, wkb->serial, ""); + } else { wkb->preedit_str[strlen(wkb->preedit_str) - 1] = '\0'; @@ -189,7 +192,7 @@ _cb_wkb_on_key_down(void *data, Evas_Object *obj, const char *emission EINA_UNUS else if (strcmp(key, "enter") == 0) { _wkb_commit_preedit_str(wkb); - wl_input_method_context_keysym(wkb->im_ctx, wkb->serial, time, + wl_input_method_context_keysym(wkb->im_ctx, wkb->serial, 0, XKB_KEY_Return, WL_KEYBOARD_KEY_STATE_PRESSED, 0); goto end; |