xterm 中无法通过 shift 切换 scim 中英文模式

7 views
Skip to first unread message

amateur

unread,
Dec 4, 2009, 9:19:18 AM12/4/09
to debian-c...@lists.debian.org
Xterm 中无法通过 Shift 按键切换 scim 的中英文输入模式,不知道大家遇到
这个问题没有。最近这两天看了源码,找到了一个解决办法。在 .Xresources
中加入:

XTerm*VT100*translations: #override \n\
Shift <KeyRelease>:insert-seven-bit()

就可以解决这个问题。

问题的原因是 Xterm 没有把 Shift Key Release 事件传递给 Scim。加入这句
话之后就能够将 Shift Key Release 事件传递给 scim。

我在想,有没有必要将这个配置加入到 deiban 的 xterm 包中。毕竟对中文输
入法的影响还是挺大的,并且很多人不知道这个解决办法。

大家有什么看法?

--
flowchart, n. & v.:
[From flow "to ripple down in rich profusion, as hair" + chart
"a cryptic hidden-treasure map designed to mislead the uninitiated."]
1. n. The solution, if any, to a class of Mascheroni construction
problems in which given algorithms require geometrical representation
using only the 35 basic ideograms of the ANSI template. 2. n. Neronic
doodling while the system burns. 3. n. A low-cost substitute for
wallpaper. 4. n. The innumerate misleading the illiterate. "A
thousand pictures is worth ten lines of code." -- The Programmer's
Little Red Vade Mecum, Mao Tse T'umps. 5. v.intrans. To produce
flowcharts with no particular object in mind. 6. v.trans. To obfuscate
(a problem) with esoteric cartoons.
-- Stan Kelly-Bootle, "The Devil's DP Dictionary"


--
To UNSUBSCRIBE, email to debian-chine...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Ji ZhengYu

unread,
Dec 5, 2009, 6:04:28 AM12/5/09
to debian-c...@lists.debian.org
2009/12/4 amateur <tianle...@gmail.com>:

> Xterm 中无法通过 Shift 按键切换 scim 的中英文输入模式,不知道大家遇到
> 这个问题没有。最近这两天看了源码,找到了一个解决办法。在 .Xresources
> 中加入:
>
> XTerm*VT100*translations: #override \n\
>    Shift <KeyRelease>:insert-seven-bit()
>
> 就可以解决这个问题。
>
> 问题的原因是 Xterm 没有把 Shift Key Release 事件传递给 Scim。加入这句
> 话之后就能够将 Shift Key Release 事件传递给 scim。
>
> 我在想,有没有必要将这个配置加入到 deiban 的 xterm 包中。毕竟对中文输
> 入法的影响还是挺大的,并且很多人不知道这个解决办法。
>
> 大家有什么看法?
>

没用过这个 xterm,一般就用用 gnome-terminal 或者是 rxvt-unicode。

如果真是如你所说的话,我认为可以向上游维护者反映一下。不过,不知道
这样的设置会不会影响到英文用户的输入?

--
Regards,

G

amateur

unread,
Dec 5, 2009, 7:11:22 AM12/5/09
to debian-c...@lists.debian.org
-------------------------
确实,我也是不确定这样会不会产生什么意料之外的影响。就当做给使用 xterm
的同学们的一个 Tips 吧。

另外,您使用 rxvt-unicode 的时候有没有试过 vim 中的 Meta-key 键绑定。我
发现 rxvt-unicode 中无法在 vim 中绑定 M-key 键,试试这个例子:
:imap M-i ItWorks!<CR>

我在 rxvt-unicode 中是无法成功的,但是 xterm 可以。这也是我转向 xterm
的主要原因。

--
When asked by an anthropologist what the Indians called America before
the white men came, an Indian said simply "Ours."
-- Vine Deloria, Jr.

User

unread,
Dec 5, 2009, 10:06:03 AM12/5/09
to debian-c...@lists.debian.org

2009-12-04(Friday) 22:19:18 +0800, amateur <tianle...@gmail.com>:


> Xterm 中无法通过 Shift 按键切换 scim 的中英文输入模式,不知道大家遇到
> 这个问题没有。最近这两天看了源码,找到了一个解决办法。在 .Xresources
> 中加入:
>
> XTerm*VT100*translations: #override \n\
> Shift <KeyRelease>:insert-seven-bit()
>
> 就可以解决这个问题。
>
> 问题的原因是 Xterm 没有把 Shift Key Release 事件传递给 Scim。加入这句
> 话之后就能够将 Shift Key Release 事件传递给 scim。
>
> 我在想,有没有必要将这个配置加入到 deiban 的 xterm 包中。毕竟对中文输
> 入法的影响还是挺大的,并且很多人不知道这个解决办法。
>
> 大家有什么看法?

  多谢这位大哥的分享,为极度冷清的邮件列表带来了一丝暖意。

  我还看到了这两天你就这个问题在 LinuxSir.org 上的帖子(应该是你发的吧,
呵呵)。我也顺便搜索了一下,发现那方面的话题的确很少,可能是因为很少有人在
xterm 下用输入法的缘故(尽管 xterm 支持国际化,支持 UTF-8)。

Ji ZhengYu

unread,
Dec 5, 2009, 9:33:17 PM12/5/09
to debian-c...@lists.debian.org
2009/12/5 您写道:

> 另外,您使用 rxvt-unicode 的时候有没有试过 vim 中的 Meta-key 键绑定。我
> 发现 rxvt-unicode 中无法在 vim 中绑定 M-key 键,试试这个例子:
>    :imap M-i ItWorks!<CR>
>
> 我在 rxvt-unicode 中是无法成功的,但是 xterm 可以。这也是我转向 xterm
> 的主要原因。
>

从来没试过……
目前我已经不再折腾这些东西了。rxvt-unicode 还是很早之前用 fvwm 时用的。


--
Regards,

G

amateur

unread,
Dec 5, 2009, 9:54:13 PM12/5/09
to debian-c...@lists.debian.org
On Sat, Dec 05, 2009 at 11:06:03PM +0800, User wrote:
>
>   多谢这位大哥的分享,为极度冷清的邮件列表带来了一丝暖意。
>
>   我还看到了这两天你就这个问题在 LinuxSir.org 上的帖子(应该是你发的吧,
> 呵呵)。我也顺便搜索了一下,发现那方面的话题的确很少,可能是因为很少有人在
> xterm 下用输入法的缘故(尽管 xterm 支持国际化,支持 UTF-8)。
谢谢这位兄弟的支持!

可能是用 xterm 的人太少了吧,大家对这个话题都不怎么感兴趣。

--
It isn't easy being the parent of a six-year-old. However, it's a pretty small
price to pay for having somebody around the house who understands computers.

Darren Hoo

unread,
Dec 5, 2009, 10:40:29 PM12/5/09
to amateur, debian-chinese-gb


2009/12/6 amateur <tianle...@gmail.com>

可能是用 xterm 的人太少了吧,大家对这个话题都不怎么感兴趣。

我是图省事一般都用gnome-terminal了,而且也看习惯了aa的字体,
装了xterm一般也只是作为备用,因为懒得配置核心字体,中文也没法显示。

Li Xin

unread,
Dec 7, 2009, 7:20:46 AM12/7/09
to debian-c...@lists.debian.org
与其花不少时间弄xterm,不如直接用封装比较好的terminal呢,要是想轻便
的,xfce4-terminal的就不错

Darren Hoo (darre...@gmail.com) wrote [09.12.06 11:44]:

David Lee

unread,
Dec 7, 2009, 7:44:21 AM12/7/09
to Li Xin, debian-c...@lists.debian.org

我一直用的是wmii+xterm,但scim输入法切换的问题没解决,没想到在这里看到了solution,非常感谢。

不光是scim,fcixt等也不能切换。

在 2009-12-7 6:21 PM,"Li Xin" <siz...@gmail.com> 说:



与其花不少时间弄xterm,不如直接用封装比较好的terminal呢,要是想轻便
的,xfce4-terminal的就不错

Darren Hoo (darre...@gmail.com) wrote [09.12.06 11:44]:

|2009/12/6 amateur <tianle...@gmail.com> | |> |> 可能是用 xterm 的人太少了吧,大家对这个话题都不怎么感兴趣。 |> | |我是图省事一般都...

-- To UNSUBSCRIBE, email to debian-chine...@lists.debian.org with a subject of "unsubscri...

MWO

unread,
Dec 12, 2009, 11:10:23 AM12/12/09
to David Lee, debian-c...@lists.debian.org
我U盘上也用的wmii+xterm,SCIM切换的好好的。
字体的话,是用dejavu sans + wenquanyi zhenghei
不知道为什么amateur兄会有这个问题

2009/12/7 David Lee <leel...@gmail.com>



--
Yours sincerely
Moose W. Oler
Reply all
Reply to author
Forward
0 new messages