Terminology: fix tab hotkey with UIM-XIM

Tab switch hotkeys are broken when using UIM-XIM.
Ctrl-1 displays "1" and doesn't switch tab as the control code is
supposedly handled by the IMF (even if it is not by configuration).

Note: not sure what the behaviour should be if UIM is configured to
catch Ctrl-1 sequences?

Setup UIM-XIM if possible.
Export ECORE_IMF_MODULE=xim.
Open terminology, create tab, press Ctrl-1. Should switch tab and not
display "1".
This commit is contained in:
Carsten Haitzler 2013-05-08 12:30:37 +09:00
parent a1a3abe525
commit 2ab6290839
1 changed files with 18 additions and 18 deletions

View File

@ -1899,24 +1899,6 @@ _smart_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
sd = evas_object_smart_data_get(data);
if (!sd) return;
if (sd->imf)
{
// EXCEPTION. Don't filter modifiers alt+shift -> breaks emacs
// and jed (alt+shift+5 for search/replace for example)
// Don't filter modifiers alt, is used by shells
if (!evas_key_modifier_is_set(ev->modifiers, "Alt"))
{
Ecore_IMF_Event_Key_Down imf_ev;
ecore_imf_evas_event_key_down_wrap(ev, &imf_ev);
if (!sd->composing)
{
if (ecore_imf_context_filter_event
(sd->imf, ECORE_IMF_EVENT_KEY_DOWN, (Ecore_IMF_Event *)&imf_ev))
goto end;
}
}
}
if ((!evas_key_modifier_is_set(ev->modifiers, "Alt")) &&
(evas_key_modifier_is_set(ev->modifiers, "Control")) &&
(!evas_key_modifier_is_set(ev->modifiers, "Shift")))
@ -2060,6 +2042,24 @@ _smart_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
goto end;
}
}
if (sd->imf)
{
// EXCEPTION. Don't filter modifiers alt+shift -> breaks emacs
// and jed (alt+shift+5 for search/replace for example)
// Don't filter modifiers alt, is used by shells
if (!evas_key_modifier_is_set(ev->modifiers, "Alt"))
{
Ecore_IMF_Event_Key_Down imf_ev;
ecore_imf_evas_event_key_down_wrap(ev, &imf_ev);
if (!sd->composing)
{
if (ecore_imf_context_filter_event
(sd->imf, ECORE_IMF_EVENT_KEY_DOWN, (Ecore_IMF_Event *)&imf_ev))
goto end;
}
}
}
if ((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
(ev->keyname))
{