Can I dump the GTK+ Compose-key table to a file?

Hi all!

I’m a heavy user of the Compose key and have several entries in my ~/.config/gtk-{3,4}.0/Compose files.

Sometimes when I’m writing a new sequence it doesn’t resolve properly but is rather waiting for more input. This is likely because of some conflict with a default Compose sequence.

It would be helpful to be able to dump the full Compose table as GTK sees it. Is that possible somehow? If no: would it be possible to hack together? If yes: any hints of where I should look would be helpful!

Kind regards,
Mattias

1 Like

As it might be useful, here’s my current ~/.config/gtk-3.0/Compose: .config/Compose at master · mattiasb/.config · GitHub

And here are the new entries I’m trying to add:

# Characters
<Multi_key> <a> <o>                                        : "å" U00E5
<Multi_key> <A> <o>                                        : "Å" U00C5
<Multi_key> <a> <colon>                                    : "ä" U00E4
<Multi_key> <A> <colon>                                    : "Ä" U00C5
<Multi_key> <o> <colon>                                    : "ö" U00F6
<Multi_key> <O> <colon>                                    : "Ö" U00D6
1 Like

And if it can’t be done, where is the default sequence stored? Or is it buried
somewhere in the GTK library?

Looking at https://gitlab.gnome.org/GNOME/gtk/-/blob/4bb79decf34d0ef5290afa96cb6402694e5122fc/gtk/gtkimcontextsimple.c#L325

It will be in somewhere like /usr/share/X11/locale/en_US.UTF-8/Compose.

See https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/compose/README.md

2 Likes

Maybe it’s an oddity on my end but that link gives a 500 server error. The file exists though.

This goes to the same info: gtk/compose · main · GNOME / gtk · GitLab

Oh I missed the replies. Thanks a lot @matthiasc and @jtojnar I think I have the data that I need!

(The issue with that README.md file not being accessible via /-/blob/... is certainly weird though.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.