Skip to content

Type in Chinese, Japanese, Korean, or Vietnamese

Typing in Chinese, Japanese, Korean, and Vietnamese requires the use of an “input method” that translates physical key-presses into the right characters on the screen. This page describes how to set up the popular “Fcitx 5” input method and use it.

Installation

First, install Fcitx 5 using Discover.

While on that the page for Fcitx5 in Discover, Click the Add-Ons button in the toolbar, and install the required add-on for the language you want to use. For example:

Configuration

Launch System Settings. Navigate to Keyboard > Virtual Keyboard > click “Fcitx 5” > click Apply.

At this point, a keyboard icon has appeared in the System Tray. Right-click it, and then click Input Method Settings.

In the window that appears, select the input method plug-in for the desired language, plus a matching keyboard layout. After selecting each one, click the arrow pointing towards the list on the left to move the selected option into that list.

  • For Chinese, add “Keyboard - Chinese” first, then add any of the options listed under “Chinese (China)” or Chinese (Taiwan)”.
  • For Japanese, add “Keyboard - Japanese” first, then add “Mozc”.
  • For Korean, add “Keyboard - Korean” first, then add “Hangul”.
  • For Vietnamese, add “Keyboard - Vietnamese” first, then add “Unikey”.

If you are prompted to change your system layout to match the input method, click Yes.

Use

Type as expected.

To type Latin characters instead of using the input method and, press Ctrl+Space while a text field is focused, or click the symbol for the active input method in the System Tray. Do the same thing a second time to return to using the input method.

Fixing compatibility issues

Fcitx 5 works with almost all applications. However, manual steps may be needed to make it work with older software using the XWayland compatibility layer, such as Steam, Krita, and JetBrains IDEs.

Such apps need special environment variables set in order to use Fcitx. Here’s how to do this for an app in which Fcitx 5 isn’t working:

Graphical

  1. Launch System Settings.
  2. In the sidebar on the left, scroll down and navigate to Application Permissions.
  3. Select the app for which Fcitx 5 isn’t working.
  4. Click “Flatpak Settings” in the top-right corner.
  5. Scroll down and click the arrow next to the section header text “Advanced Permissions”.
  6. Scroll down to the “Environment” group.
  7. Click the “Add New…” button.
  8. In the “Name” field, enter XMODIFIERS.
  9. In the “Value” field, enter @im=fcitx.

Now repeat steps 7-9 for the following additional environment variables:

  • name: GTK_IM_MODULE; value: xim
  • name: QT_IM_MODULE; value: xim
  • name: QT_IM_MODULES; value: wayland;fcitx;ibus

Command-line

Find the ID of the app you want to add environment variables to using flatpak list or System Settings > Application Permissions > [the app] > Flatpak Settings in the top-right corner > [In the right-most column, find the ID under its name].

Then apply the necessary overrides:

flatpak override --env=XMODIFIERS=@im=fcitx [app id]
flatpak override --env=GTK_IM_MODULE=xim [app id]
flatpak override --env=QT_IM_MODULE=xim [app id]
flatpak override --env=QT_IM_MODULES='wayland;fcitx;ibus' [app id]

(replace [app id] with the actual ID of the app, e.g. com.valvesoftware.Steam)


Article contributed by under the CC-BY-4.0 license.