键入中文、日语、朝鲜语或越南语
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.
In KDE Linux, the popular “Fcitx 5” input method is pre-installed. Here’s how to set it up and use it:
配置
启动 系统设置 。导航到 键盘 > 虚拟键盘 > 点击 “Fcitx 5” > 点击 应用。
此时,键盘图标出现在 系统托盘 中。右键单击它,然后点击 输入法设置。
在出现的窗口中,选择所需语言的输入法插件,以及匹配的键盘布局。 在选择每个选项后,单击指向左列表的箭头将选中的选项移动到左侧列表。
- 对于 中文,请先添加“键盘 - 汉语”,再添加“汉语 (中国)”或“汉语 (台湾)”下方的任意一个选项。
- 对于 日文,请先添加“键盘 - 日语”,再添加“Mozc”。
- 对于 朝鲜语,请先添加“键盘 - 朝鲜语”,再添加“韩文”。
- 对于 越南语,请先添加“键盘 - 越南语”,再添加“Unikey”。
如果您被提示更改您的系统布局以匹配输入方法,请点击 是 。
使用
Type as you normally would; completions will appear near the text you’re typing.
要键入拉丁字母而不使用输入法,在输入区域已聚焦时按下 Ctrl+Space ,或在 系统托盘 中点击活动输入法的符号。当要重新开始使用输入法时也请这么做。
Extending it in the future
Basic support for CJKV input is pre-installed. If you require additional support:
- Visit the page for Fcitx 5 in Discover.
- Click Add-ons in the toolbar.
- Install whatever add-on are required for the language you want to use.
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:
图形化方式
- Launch System Settings.
- In the sidebar on the left, scroll down and navigate to Application Permissions.
- Select the app for which Fcitx 5 isn’t working.
- Click “Flatpak Settings” in the top-right corner.
- Scroll down and click the arrow next to the section header text “Advanced Permissions”.
- Scroll down to the “Environment” group.
- Click the “Add New…” button.
- In the “Name” field, enter
XMODIFIERS. - 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
命令行方式
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)
文章作者:Nate Graham,使用 CC-BY-4.0 许可证发布。