After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 554192 - double press on the "circumflex" dead key (standard french 105 keyboard) no longer produces the "^" character
double press on the "circumflex" dead key (standard french 105 keyboard) no l...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Input Methods
2.14.x
Other All
: Normal normal
: ---
Assigned To: Hidetoshi Tajima
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-09-28 16:21 UTC by Rémi Cardona
Modified: 2008-10-08 23:15 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Rémi Cardona 2008-09-28 16:21:30 UTC
Please describe the problem:
As noted in the summary, pressing twice on the circumflex key on a standard French keyboard no longer produces the ^ character like older Gnome could. Pressing "^" + "vowel" still produces the accented letters.

QT4 and tcl/tk apps are still able to do so, so I guess "gtk" is at fault here.

Here is the output produced by xev when pressing and releasing the aforementioned key.

==============
KeyPress event, serial 33, synthetic NO, window 0x2400001,
    root 0x6a, subw 0x0, time 24139226, (489,33), root:(494,77),
    state 0x0, keycode 0 (keysym 0x5e, asciicircum), same_screen YES,
    XKeysymToKeycode returns keycode: 18
    XLookupString gives 0 bytes: 
    XmbLookupString gives 1 bytes: (5e) "^"
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x2400001,
    root 0x6a, subw 0x0, time 24139306, (489,33), root:(494,77),
    state 0x0, keycode 34 (keysym 0xfe52, dead_circumflex), same_screen YES,
    XLookupString gives 1 bytes: (5e) "^"
    XFilterEvent returns: False
================

I don't really remember when it happened but I would say "in the last month". While this is not really a big deal for PC users (we have another key to create just the circumflex alone), users with mac keyboards lack this other key. And it's hard to write regexes without circumflexes ;)

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
xorg-server 1.5.0
xlib 1.1.5
gtk 2.14.3
glib 2.18.1
libxklavier 3.6
Comment 1 Rémi Cardona 2008-09-28 16:23:17 UTC
(In reply to comment #0)
> users with mac keyboards lack this other key.

I forgot to add that this bug was confirmed on a mac layout too.

Thanks
Comment 2 Baptiste Mille-Mathias 2008-09-28 16:27:08 UTC
My quick test seems to second this bug
glib 2.18.1
gtk 2.14.3
libxklavier 3.7
xlib 1.1
Comment 3 Christian Dywan 2008-09-29 14:15:45 UTC
Confirming, I saw this a few days ago for the first time but didn't find the time to investigate where it was coming from.

German keyboard here, I can still type accented letters but no single circumflex.

The ` shows the same behaviour, I can type letters with an accent aigu or grave but not an isolated single quote.
Comment 4 Christian Dywan 2008-09-29 14:23:11 UTC
Btw just a temporary workaround: If you use the X Input Method you can actually type the circumflex and single quote. It's not a replacement but possibly good enough for writing source code.
Comment 5 Rémi Cardona 2008-09-29 14:44:54 UTC
(In reply to comment #4)
> Btw just a temporary workaround: If you use the X Input Method you can actually
> type the circumflex and single quote.

How do I enable it? Right clicking in text boxes to change from "System" to "X Input Method" doesn't work (the radio stays on "System" and I still can't type circumflexes)

Thanks for your help nonetheless
Comment 6 Christian Dywan 2008-09-29 15:10:00 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Btw just a temporary workaround: If you use the X Input Method you can actually
> > type the circumflex and single quote.
> 
> How do I enable it? Right clicking in text boxes to change from "System" to "X
> Input Method" doesn't work (the radio stays on "System" and I still can't type
> circumflexes)

Hm... Gtk+ 14.2 here. And yes, that's how I activate it.
Comment 7 Matthias Clasen 2008-10-01 02:09:53 UTC

*** This bug has been marked as a duplicate of 554506 ***
Comment 8 Simos Xenitellis 2008-10-01 11:18:51 UTC
This bug can be fixed with the following patch

--- gtkimcontextsimple.c.DEFINE_PATCHED 2008-09-30 23:39:55.000000000 +0100
+++ gtkimcontextsimple.c        2008-10-01 12:08:46.000000000 +0100
@@ -927,11 +934,11 @@
           tmp_list = tmp_list->next;
         }

-      if (check_algorithmically (context_simple, n_compose))
-       return TRUE;
-
       if (check_compact_table (context_simple, &gtk_compose_table_compact, n_compose))
         return TRUE;
+
+      if (check_algorithmically (context_simple, n_compose))
+       return TRUE;
     }

   /* The current compose_buffer doesn't match anything */


That is, the order of check_algorithmically() and check_compact_table() needs to change, and put check_compact_table() first.

We put check_algorithmically() first so that any issues with messy upstream Compose tables take lower precedence. However, check_algorithmically() is too greedy for some compose sequences, and does not let check_compact_table() handle them.

I'll do some more tests on what we break if we put check_compact_table() first and report back.
Comment 9 Rémi Cardona 2008-10-01 11:53:42 UTC
What about the patch in bug #554506? Isn't that enough?

Thanks
Comment 10 Simos Xenitellis 2008-10-01 15:21:14 UTC
(In reply to comment #9)
> What about the patch in bug #554506? Isn't that enough?
> 

The two bugs look similar but the root cause is different. This is not a dup of bug #554506.
Comment 11 Rémi Cardona 2008-10-01 15:34:33 UTC
All I can confirm is that setting the gtk input module to xim indeed "fixes" the issue.

I'll try both patches tonight (separately and together).

Thanks :)
Comment 12 Rémi Cardona 2008-10-01 21:38:30 UTC
Confirming that the above patch is needed along with the patch from bug #554506 (so this bug is _definitely_ not a dupe of that bug).

Both patches are being pushed to Gentoo.

Thanks for your help
Comment 13 Simos Xenitellis 2008-10-01 22:00:01 UTC
Matthias, is there a further stable version of GTK+ 2.14.3 to be released?

If so, I should be sorting this bug ASAP.
Comment 14 Matthias Clasen 2008-10-02 04:55:07 UTC
Simos: yes, I'll release the next stable 2.14.x version in a few weeks

So please, commit to trunk and gtk-2-14
Comment 15 Simos Xenitellis 2008-10-02 23:26:50 UTC
The above patch (that simply puts first check_table()) triggers an issue in Greek Polytonic where two dead keys do not work.
Thus, Rémi, there should be an additional patch coming soon. 
Comment 16 Simos Xenitellis 2008-10-08 22:57:21 UTC
I went through Greek Polytonic and the above patch is actually OK with the current version of gtkimcontextsimpleseqs.h.

Thus, I am committing now to trunk and gtk-2-24.
Comment 17 Simos Xenitellis 2008-10-08 23:14:34 UTC
Committed to trunk, gtk-2-14:

        Bug 554192 – double press on the "circumflex" dead key
        (standard french 105 keyboard) no longer produces the "^" character

        * gtk/gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress):
        Changed the order, put  check_compact_table() first, then
        check_algorithmically().

http://svn.gnome.org/viewvc/gtk%2B/trunk/gtk/gtkimcontextsimple.c?r1=21613&r2=21612&pathrev=21613
http://svn.gnome.org/viewvc/gtk%2B/branches/gtk-2-14/gtk/gtkimcontextsimple.c?r1=21614&r2=21613&pathrev=21614
Comment 18 Simos Xenitellis 2008-10-08 23:15:13 UTC
And closing as FIXED.