Difference between revisions of "FAQ/zh-hans"

From Fcitx
Jump to navigation Jump to search
(Created page with "* 如果菜单中确实有Fcitx,但是还是无法正常工作,请先尝试重新启动Fcitx,如果这次就可以工作了,那么请检查你的DBus设置,或者延...")
(Created page with "* 如果Fcitx没有默认选中,那么请先尝试选中它,并且立刻试试可否输入。如果不行,请参见上面一条。为了永久性的修复这个问题(...")
Line 19: Line 19:
 
* 如果菜单中确实有Fcitx,但是还是无法正常工作,请先尝试重新启动Fcitx,如果这次就可以工作了,那么请检查你的DBus设置,或者延长Fcitx的启动时间。如果你使用自定义的启动脚本,你可以参考[[Special:MyLanguage/Configure (Other)|配置 (其他)]]
 
* 如果菜单中确实有Fcitx,但是还是无法正常工作,请先尝试重新启动Fcitx,如果这次就可以工作了,那么请检查你的DBus设置,或者延长Fcitx的启动时间。如果你使用自定义的启动脚本,你可以参考[[Special:MyLanguage/Configure (Other)|配置 (其他)]]
  
* If there is Fcitx but not being choosed by default, and please select it and you can immediately try again in this app. If not works, please read the entry above. For permanent fix (To use Fcitx by default), please read Configure part in [[Special:MyLanguage/Install And Configure|Install And Configure]].
+
* 如果Fcitx没有默认选中,那么请先尝试选中它,并且立刻试试可否输入。如果不行,请参见上面一条。为了永久性的修复这个问题(默认选中 Fcitx ),请阅读[[Special:MyLanguage/Install and Configure|安装和配置]]中的配置部分。
  
 
* If there is no Fcitx, you should check your install first. Usually, the package name contains fcitx and gtk. If you [[Special:MyLanguage/Compile from source|compile fcitx from source]], please make sure you have enable GTK{2,3}_IM_MODULE option. If you're sure about this, please read [[Special:MyLanguage/Input method related environment variables|Input method related environment variables]] for how to update some cached file for gtk.
 
* If there is no Fcitx, you should check your install first. Usually, the package name contains fcitx and gtk. If you [[Special:MyLanguage/Compile from source|compile fcitx from source]], please make sure you have enable GTK{2,3}_IM_MODULE option. If you're sure about this, please read [[Special:MyLanguage/Input method related environment variables|Input method related environment variables]] for how to update some cached file for gtk.

Revision as of 23:33, 2 February 2016

Other languages:
English • ‎中文(简体)‎

当你抱怨输入法无法正常工作前,请先阅读这个页面。

从 4.2.7 开始,Fcitx 提供了一个 fcitx-diagnose 的命令,它可以检测一些常见的问题并且给出一些建议。

Linux 输入法支持耻辱堂

使用 Ctrl + Space 时无法激活 Fcitx

检查你所输入的程序。

这是唯一一个有问题的程序吗?

    • 最可能的原因是某个快捷键占用了 Ctrl Space,请修改另一个快捷键并重试。这常见于编辑器中,因为很多集成开发环境默认使用 Ctrl+Space 作为补全的快捷键。

所有 Gtk 程序都有问题?

  • 请打开一个传统意义上的Gtk程序(所谓传统,就是它不应该是Firefox,Libreoffice这种仅仅是是使用Gtk样式作为界面的程序)。Gedit是一个不错的选择。右键点击输入框,将会弹出一个“输入法”菜单,请确认“Fcitx”被选中。
  • 如果菜单中确实有Fcitx,但是还是无法正常工作,请先尝试重新启动Fcitx,如果这次就可以工作了,那么请检查你的DBus设置,或者延长Fcitx的启动时间。如果你使用自定义的启动脚本,你可以参考配置 (其他)
  • 如果Fcitx没有默认选中,那么请先尝试选中它,并且立刻试试可否输入。如果不行,请参见上面一条。为了永久性的修复这个问题(默认选中 Fcitx ),请阅读安装和配置中的配置部分。
  • If you are using Ubuntu and upgrade to 12.04 recently, or something werid happens to your system (Due to packager careless, or buggy package manager which can not do upgrade in correct order, for example, pacman), you might notice that gtk.immodules related files doesn't generate correctly during upgrade. Try uninstall fcitx-frontend-gtk2, fcitx-frontend-gtk3 or coressponding package on your system and re-install them to trigger the file generate. Then recheck the input method menu to see whether it have "Fcitx" in the menu or not.

All Qt Apps have problem?

  • Run qtconfig (might have different name on your distribution, it might be qtconfig-qt4), and go to the third tab, make sure fcitx is in the "Default Input Method" combo-box. If not, please check your install.
  • Above solution can also applies if you want use XIM, but still we highly recommend you to use im module. See Also Input method related environment variables.

Is it Java, Xterm, wine, or some other non-Gtk/Qt Application?

There are also some very rare case, that you're using a embedded linux or mini-linux distro, in which you must use XIM, the X server might missing some locale file. The file is usually needed to be under /usr/share/X11/locale/.

And When you must use XIM, please make sure, your locale must NOT be C or POSIX and need to be a valid locale (no matter which language), and need to be generated if you are using glibc (locale-gen). When you are using im module, there is no such limitation.

Emacs

Try

LC_CTYPE=zh_CN.UTF-8 emacs

Don't forget to check your locale -a contains that. See also Input method related environment variables.

Emacs will use `-*-*-*-r-normal--14-*-*-*-*-*-*-*' as basefont(in src/xfns.c), if you do not have one matched(like terminus、or 75dpi things, you can look the output of `xlsfonts'), XIM can not be activated.

Problem in Firefox and Google Docs

You might want to toggle preedit off temporarily, which is Ctrl+Alt+P.

Cannot use Fcitx in flash

Please read Hall of Shame for Linux IME Support, and use im module.

Cannot type English after updating to fcitx newer than 4.2.4

Make sure you have add "Keyboard" to the input method list. You can use Configuration tool.

And you may want to move "Keyboard" to the first one.

Unexpected keyboard layout change

Use Configuration tool, to bind specific keyboard layout to the specific input method.

xmodmap settings being overwritten

Fcitx now control keyboard layout and when switch layout, xmodmap setting will be overwritten. So fcitx-xkb provides an option to specify the xmodmap script and let fcitx loads it for you whenever keyboard layout changes. Or disable fcitx-xkb addon is also a solution for you, or if your requirement is simply, for example, switching Caps Lock and Esc, which is provided by xkb option, you can just set it with your desktop keyboard configuration tool (Gnome and KDE all support such configuration).

For more detailed explanation, xmodmap is a very low level tool, that doesn't aware keyboard layout. For X11, keyboard layout is built on a set of profile, when such profile is loaded, anything you changed with xmodmap will be overwritten, this isn't specific to fcitx, but all tool that support keyboard layout configuration. Xkb option is a set of profile that can do some pre-defined change over keyboard layout, including many thing that people usually do with xmodmap, for example, defining where dead key is, switching Caps Lock and Esc, and so on. Unless you have special requirements, xkb layout and xkb option is recommended.

Since 4.2.7, Fcitx will try to load ~/.Xmodmap if it exists.

Configure user interface, font, vertical list

Use Configuration tool, Addon Configuration -> Classic UI.

If you are using fcitx-configtool newer than 0.4.5 or kcm-fcitx newer 0.4.1, you can directly configure those from the first level tab.

Possible issue for GNOME 3.6

Note for GNOME Later than 3.6

Classic UI is not transparent

  • This problem might NOT exist any more since 4.2.6 with a different approach for detect composite manager.
  • Restart Fcitx first, if it's ok then, it might be a bug in your Window manager. Gnome-Shell, xcompmgr is known to have this bug. You can try to set the delay start to walkaround this problem.
  • If restart Fcitx doesn't solve this problem, you should check whether your window manager supports composite or it's enabled or not.

Kwin

Enable desktop effects.

Metacity before GNOME3

gconftool-2 -s --type bool /apps/metacity/general/compositing_manager true

Xfce

Xfwm support composite, but need to be enabled by hand.

Compiz

0.9 series compiz can disable composite. You can use ccsm to configure it.

Other window manager

You can use xcompmgr, cairo-compmgr as composite manager for them.

Minecraft

Original Minecraft under linux doesn't support input method, what make it worse is, XIM will conflict with its key event processing, one way to work around is, set a wrong environment variable on purpose for minecraft, then start up it. You can use following script to do that

#!/bin/sh
# set a wrong one
export XMODIFIERS="@im=null"
# start minecraft, this might change depends on you're mod, but simply its what you ARE using to start minecraft.
java -Xmx1024M -Xms512M -cp minecraft.jar net.minecraft.LauncherFrame

This way can be also used, if you don't want fcitx to work on some application which is using XIM.

There is a mod can be used to support input under Linux, called NihongoMOD, 1.2.2 with minecraft 1.5.2 can work with Fcitx without upper hack.

Root application under normal user X

Root application under X normal user session is always broken (in general, not specific to fcitx), due to the fact that dbus is a user session only process. The only way to type in root application with normal fcitx is to use XIM, set GTK_IM_MODULE=xim and QT_IM_MODULE=xim before you start your application.

Cursor Following problem

There is a common misunderstanding that it's input method's fault that input window could not follow the cursor, which is simply wrong. This is how cursor following works: Application send the position to Input method, then input method move the input window. So if application do not send the position, the position would be wrong. This behavior is controlled by application, but not input method. So if you meet any problem, please ask application to fix it, don't ask input method to do anything. Actually, input method could do nothing with this.

Although there is some walkaround for specific problem, bug is still in application, not in input method.

  • Opera, enable on the spot for XIM.
  • Firefox, enable preedit.