Deadkeys and composed characters not working with Flatpak applications ? (à è î ô ù)

Here’s how to enable deadkeys and composed characters for your Flatpak applications. Not all Flatpak applications have this problem, so we’ll only target the problematic ones.

Let’s take the Letters Flatpak for example.

  1. Install Flatseal (from Flathub)
  2. Launch Flatseal
  3. Select Letters
  4. Go to “Environment”
  5. Add this variable: GTK_IM_MODULE=gtk-im-context-simple
  6. Close and re-open Letters.

Et voilà ! Now you can type composed characters such as: à â è ê î ô ù À Â…

:warning: Potential Limitations

  • No support for complex Asian languages ​​(Chinese, Japanese, Korean, Arabic with contextual forms)
  • No advanced Input Method Editor (IME)
  • May not support some very specific or rare word compositions
1 Like

For the past few weeks, I have the same issue with GTK apps (e.g. Dino, Gajim) installed as a normal Arch package, so it seems this is not Flatpak-specific.

I wonder what went wrong.

I did a bit of digging around, and it seems this is a GTK issue:

As of GTK 4.20, GTK no longer falls back to handling compose keys and dead key behaviors by itself only when using Wayland, and when an input method isn’t present. I can only guess that the reasoning behind this is because a graphical toolkit rightfully shouldn’t concern itself with a compose key implementation, and it should be the responsibility of the input method.

[…]

The reason why this seemingly only impacts non-GNOME users, is that GNOME Shell bundles IBus by default, which has been handling compose keys and dead keys on GNOME unless explicitly opted out otherwise. There’s, again, nothing that individual compositors need to do.

Following the tips in the above-linked comment, I managed to fix it by:

  1. installing Fcitx5 (installing IBus instead should be another option, but as I understand, Fcitx5 integrates better with KDE)
  2. (optionally) installing the KCM module for Fcitx5 (called e.g. fcitx5-configtool)
  3. going to System SettingsInput & OutputKeyboardVirtual Keyboard and selecting “Fcitx 5” there.
  4. (optionally) adding/changing the layouts in System SettingsLanguage & TimeInput Method

More info: