For the past years I have used GTK_IM_MODULE=xim, mostly for the compose key functionality and ~/.XCompose. Unfortunately the latest stable Eclipse release does not work at all using xim: It will run out of SWT handles (see [1, 2]; as it turns out, xim was unsupported by Eclipse for a while before).

It appears that people have been recommending setting GTK_IM_METHOD to xim for compose key functionally in the past, because otherwise GTK would not respect ~/.XCompose. But I assume that this has changed in recent GTK versions as

GTK_IM_MODULE=gtk-im-context-simple evince

allows be to use my compose key. But unfortunately once I set GTK_IM_MODULE to gtk-im-context-simple I can no longer type an underscore using shift+<hypen>.

I have tried to debug the issue by starting evince with --gtk-debug keybindings, which yields the following output:

On keypress 'hypen':

Gtk-Message: 00:38:01.808: Looking up keycode = 20, modifiers = 0x0001,
    keyval = 95, group = 0, level = 1, consumed_modifiers = 0x6003

On keypress 'underscore' (shift+<hypen>):

Gtk-Message: 00:38:01.862: Looking up keycode = 50, modifiers = 0x0001,
    keyval = 65505, group = 0, level = 0, consumed_modifiers = 0x6002

Note the "keyval = 65505". I assume that means that some mapping is off. Unfortunately I do not know how to debug further from here.

Why can I no longer write underscores (and potentially other keysyms) once I use gtk-im-context-simple? What do I need to do in order to be able to write underscores again?

This was previously posted to https://discourse.gnome.org/t/can-no-longer-type-underscore-using-shift-hyphen-once-gtk-im-module-is-set-to-gtk-im-context-simple/1060

1: https://bugs.eclipse.org/bugs/show_bug.cgi?id=542675#c9

2: https://bugs.eclipse.org/bugs/show_bug.cgi?id=517671

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.