Compatibility with CJKV input method frameworks

This topic discusses the compatibility of a graphical user interface snap with the input method frameworks broadly used by the Chinese, Japanese, Korean, and Vietnamese etc.(CJKV) users. If your snap has a graphical interface and is expected to receive text input from these users, you should check it out.

TL; DR

User-oriented

  • Currently(as of 2025/4/3), the compatibility of the following input method frameworks is implemented in snapd:
    • fcitx
    • gcin
    • ibus
    • mozc
  • There’s also work that needs to be done by the snap packager in order for a snap to support input method frameworks, if a certain snap isn’t compatible with the supported input methods, contact the snap maintainer to do an update or package rebuild.

Packager-oriented

To make the snap compatible with the input method frameworks, you must connect the snap to the following security confinement interfaces(if not already done in a Snapcraft extension):

Preface

Unlike most European text input which only requires the keys on the keyboard, CJKV text input requires composing a character via a series of US layout keyboard keystrokes, for example, in order to input “中文” string using the phonetic, or zhu-yin(注音) input method with a 大千style layout keyboard one must type in 5, j, /, and <space> sequentially to compose “中”(and every Chinese character that has the same pronunciation with “中”, which is usually selected via a number keystroke), and j, p, and 6 for “文”.

This is accomplished via the help of the input method frameworks, like the Intelligent Input Bus for Linux/Unix(IBus), Fcitx, and many, many others. Due to the security confinement of snapd additional effort must be made to allow snapped applications communicate with the input method framework running on the host to allow proper text input from CJKV users. Failure of doing so will cause great frustration to these users.

Currently supported input method frameworks

  • IBus
  • Fcitx

Known issues

Qt5 application can’t communicate with IBus input method framework

Electron-based applications

Currently known has problems using the input methods:

Binary compatibility issues

Currently, it’s been known that snaps shipping Gtk immodules may not work in hosts that use newer Gtk libraries.

How to Help

References

3 Likes

Fcitx support are now fixed.

Please rebuild vscode snap package to support this awesome fix!

Snap package are directly managed by its maintainers, please refer the issue tracker of the vscode snap.