Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Disable transient symbols for compose and dead keys in GTK programs

+3
−0

An article in the GTK blog explains the situation very well, but here is my go at it.

In my keyboard layout, accents are handled as dead keys, so to insert "ë", first I type ¨ and then e. Nothing happens on the screen until the very last step, at which point ë is inserted.

That, however, recently changed in all my GTK3 programs: An underlined meta-character is displayed when a dead key is pressed. E.g., when I type ¨, I see an underlined diaeresis:
Meta-character displayed when pressing ¨

Of course, that transient character goes away once I complete the sequence by pressing e, but I find the new behavior confusing because for years I have been used not to see any character until after the key sequence was complete. Now it just looks like I have fat-fingered — not to mention some misbehavior that may occur in some programs when backspacing.

The same happens when using a compose sequences.

Thus the question: How can I disable transient symbols for compose and dead keys and revert back to the good, old behavior?

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+3
−0

This is originally Ibus' (an input method) behavior. It provides some facilities to extend the basic "input by typing". Examples:

Now, to complicate matters, GTK has its own input method too, which is inspired in Ibus, and overrules the native X Window System method and perhaps (it's not clear to me) even other third-party input methods.

An user with basic needs, who doesn't do much beyond dead keys or compose, which the native X Input Method supports, can do away with all that extra functionality.

So first uninstall Ibus, or, if unsure, just kill it:

pkill ibus

Then, use GTK_IM_MODULE=xim environment variable to tell GTK you don't want its input method, but X's.

As an aside, the available modules can be listed with `/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0` in Debian systems or in a similar path in others.

To verify if it works, launch the GTK application (here, Firefox) with

GTK_IM_MODULE=xim firefox

Once satisfied with the selected input method, put that variable in a initialization file so that you don't have to type it by hand every time. The right file depends on your system; Since I always start my session at a login shell, I find .profile ideal, but others to consider are .xinitrc and .xsession. Note that .bashrc may not be good enough if you log-in via a display manager and want to keep using launchers to start your programs.

Conclusion

  1. Uninstall Ibus.

  2. Add this line to ~/.profile and reboot.

    export GTK_IM_MODULE=xim
    

It might be that only one of those is needed depending on your set up.

Additional references

History
Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

Outdated (1 comment)

Sign up to answer this question »