From 86f018c6a7a4187ed810163cfce290368b755ee3 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 11 Sep 2017 11:17:41 -0400 Subject: Fix a corner-case for emoji input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As reported in https://github.com/ibus/ibus/issues/1944, typing u201e while holding Ctrl+Shift used to give a „ when letting go of Ctrl+Shift. This broke when we introduced Ctrl+Shift+e to start Emoji sequences. Fix this by only looking for Ctrl+Shift+e if we are not already in a hex sequence. --- gtk/gtkimcontextsimple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gtk/gtkimcontextsimple.c') diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c index a27cb57507..031417c872 100644 --- a/gtk/gtkimcontextsimple.c +++ b/gtk/gtkimcontextsimple.c @@ -1220,7 +1220,7 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context, else have_hex_mods = (event->state & (hex_mod_mask)) == hex_mod_mask; is_hex_start = event->keyval == GDK_KEY_U; - is_emoji_start = event->keyval == GDK_KEY_E; + is_emoji_start = (event->keyval == GDK_KEY_E) && !priv->in_hex_sequence; is_end = (event->keyval == GDK_KEY_space || event->keyval == GDK_KEY_KP_Space || event->keyval == GDK_KEY_Return || -- cgit v1.2.1