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';
else if (strcmp(key, "enter") == 0)
{
_wkb_commit_preedit_str(wkb);
- /* wl_input_method_context_keysym(wkb->im_ctx, wkb->serial, time, XKB_KEY_Return, key_state, mod_mask); */
+ wl_input_method_context_keysym(wkb->im_ctx, wkb->serial, 0,
+ XKB_KEY_Return, WL_KEYBOARD_KEY_STATE_PRESSED,
+ 0);
goto end;
}
else if (strcmp(key, "space") == 0)