linux图形界面键盘切换输入法,解决linux下不同图形环境的输入法切换问题

相关说明:

gedit /usr/share/doc/scim/README.Qt

SCIM supports three different input modes -- XIM mode, GTK IM mode, and Qt 3 IM mode.  The Qt 3 IM mode needs an unofficial patch for Qt 3, because Trolltech has said that such patch can't go into Qt 3 as it's considered too intrusive.  Debian's Qt maintainers has included this patch into Qt 3 packages since version 3:3.3.5-4.

Qt 4 has plans to officially support input methods, but the current status in Qt 4.3.2 is still not clear (at least to the author of this README).  And there is currently no Qt 4 IM module support for SCIM in Debian.

Therefore, Qt/KDE 3 applications can use either XIM mode or Qt 3 IM mode for SCIM.  These can be easily set and changed with the im-switch package.  The XIM mode support is included in scim package.  To use Qt 3 IM mode, you also need to install scim-qtimm package.  Qt/KDE 4 applications only have the option of XIM mode, but it should work just fine.

When using XIM mode in Qt 3, You need to pay extra attention on two things:

1. Both Qt and SCIM has their own settings for XIM style, so you need to make sure they match.  There are two commonly used XIM styles, usually called "on the spot" and "over the spot".  To change the style in SCIM, run scim-setup (or choose "SCIM Input Method Setup" from your menu), and go to the "FrontEnd -> Global Setup" page.  The option to change XIM style is "Embed Preedit String into client window", when it is selected, you are using "on the spot" style; and when it is not selected, you are using "over the spot" style.  To change the style in Qt, run qtconfig (or choose "Qt3 Configuration" from your menu), go to "Interface" tab, and choose the style in the "XIM Input Style" dropdown menu at the bottom.  You usually don't need the "off the spot" or "root" style.

2. It is reported that some of the KDE applications don't work very well when using "on the spot" style.  So if your application behaves strangely, you may want to try switching to "over the spot" style first.

(Last updated by Ming Hua, on Sat, 13 Oct 2007)

vim:textwidth=78:

其实可以在所有qt程序中点击鼠标右键后,有一个“select input method",在里面选择scim或者scim-bridge后就好了,但这样子的问题是我每次都得选择。

所以可以设置环境变量:

export XMODIFIERS="@im=SCIM"

export GTK_IM_MODULE="scim"

export QT_IM_MODULE="scim"

我的ubuntu用的是scim输入法,另外在KDE的程序中输入中文还要设置QT3 CONFIG或者QT4 CONFIG在interface(好象是这个选项)将on the spot 改为over the spot。

12.gif

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值