Fcitx
Fcitx (Flexible Context-aware Input Tool with eXtension support) [ˈfaɪtɪks] 是 一个支持扩展的输入法框架,它支持许多种语言和脚本。
Fcitx (Flexible Context-aware Input Tool with eXtension support) [ˈfaɪtɪks] is an input method framework with support for many languages and scripts.
安装
USE 标记
USE flags for app-i18n/fcitx Fcitx (Flexible Context-aware Input Tool with eXtension) input method framework
X
|
Add support for X11 |
autostart
|
Enable XDG-compatible autostart of Fcitx |
cairo
|
Enable support for the cairo graphics library |
debug
|
Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces |
enchant
|
Enable Enchant backend (using app-text/enchant) for spelling hinting |
gtk2
|
Install input method module for GTK+ 2 |
gtk3
|
Install input method module for GTK+ 3 |
introspection
|
Add support for GObject based introspection |
lua
|
Enable Lua scripting support |
nls
|
Add Native Language Support (using gettext - GNU locale utilities) |
opencc
|
Enable OpenCC engine (using app-i18n/opencc) for converter between Simplified Chinese and Traditional Chinese |
pango
|
Enable support for x11-libs/pango |
table
|
Install table input methods for Simplified Chinese |
test
|
Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently) |
xkb
|
Enable support for XKB (required for fcitx-xkb, fcitx-xkbdbus, part of fcitx-keyboard) |
强烈建议在安装使用这些工具包的应用程序时添加
gtk2
或gtk3
USE标记。Emerge
root #
emerge --ask app-i18n/fcitx
使用 Fcitx
为了在X中使用Fcitx,必须在启动文件中添加以下环境变量:
如果在安装时使用gtk2
或gtk3
USE标记,<module>
(如下面的示例中)应是fcitx
,否则应是xim
。
~/.xprofile
export XMODIFIERS="@im=fcitx" export QT_IM_MODULE=<module> export GTK_IM_MODULE=<module>
请记住,只有使用startx或SLiM启动X服务时,才能使~/.xinitrc看起来像下面的示例:
~/.xinitrc
export XMODIFIERS="@im=fcitx" export QT_IM_MODULE=<module> export GTK_IM_MODULE=<module>
KDE Plasma: If these environment variables are not getting loaded either from ~/.xprofile nor ~/.xinitrc, try adding them to a Plasma startup script, such as ~/.config/plasma-workspace/env/fcitx.sh.
建议在Fcitx启动前启动D-Bus会话总线。将这些添加到X启动文件的开头(~/.xprofile或~/.xinitrc):
~/.xprofile or ~/.xinitrc
eval "$(dbus-launch --sh-syntax --exit-with-session)"
~/.xinitrc
eval "$(dbus-launch --sh-syntax --exit-with-session)"
当希望在X中使用Fcitx时,系统的locale 不能 是 C 或P OSIX。
配置
编辑Fcitx的配置文件 ~/.config/fcitx/config
此外,还有GUI工具来配置Fcitx。安装app-i18n/fcitx-configtool(基于GTK2或GTK3)或app-i18n/kcm-fcitx(基于KDE)来使用它们。
前端
除了内置的经典UI之外,还有一个前端集成到KDE中,称为Kimpanel(包含在kde-plasma/kdeplasma-addons中)。必须启用dbus
标志才能使用Kimpanel。安装完成后,将kimpanel plasmoid添加到plasma面板上,fcitx将自动切换。
特定的语言支持
中文
Fcitx本身具有内置拼音支持。启用table
USE标志将提供多个基于表的输入法,如WuBi和Ziranma。
安装app-i18n/fcitx-cloudpinyin以获得更好的候选词列表。
内置拼音使用简单算法,还有其他拼音输入法使用其他算法。 安装app-i18n/fcitx-sunpinyin,app-i18n/fcitx-libpinyin 或 app-i18n/fcitx-rime即可使用它们。
可以安装app-i18n/fcitx-chewing或app-i18n/fcitx-libpinyin以支持Bopomofo。
安装app-i18n/fcitx-table-extra以支持Cangjie或Boshiamy。
日文
See also: How to read and write in Japanese
root #
emerge --ask app-i18n/fcitx-anthy
韩文
root #
emerge --ask app-i18n/fcitx-hangul
越南文
root #
emerge --ask app-i18n/fcitx-unikey