我正在尝试使这些组合序列产生以下字符:
AA ==> Ä
OO ==> Ö
UU ==> Ü
aa ==> ä
oo ==> ö
uu ==> ü
我尝试修改我的~/.XCompose
和我的系统组成,但它不起作用(完全重启后)。
我仍然获得默认设置。
(
AA ==> Å
OO ==> [nothing]
UU ==> Ŭ
aa ==> å
oo ==> °
uu ==> ŭ
)
实现这个功能的诀窍是什么?
这是我的~/.XCompose
(完全一样;其中也有一些来自最初实验和笔记的“胡言乱语”,但我不思考它应该会影响任何事情,对吧?):
# ~/.XCompose
# This file defines custom Compose sequences for Unicode characters
# Import default rules from the system Compose file:
include "/usr/share/X11/locale/en_US.UTF-8/Compose"
# To put some stuff onto compose key strokes:
<Multi_key> <s> <s> : "ß" ssharp # LATIN SMALL LETTER SHARP S
<Multi_key> <A> <A> : "Ä" Adiaeresis # LATIN CAPITAL LETTER A WITH DIAERESIS
<Multi_key> <O> <O> : "Ö" Odiaeresis # LATIN CAPITAL LETTER O WITH DIAERESIS
<Multi_key> <U> <U> : "Ü" Udiaeresis # LATIN CAPITAL LETTER U WITH DIAERESIS
<Multi_key> <a> <a> : "ä" adiaeresis # LATIN SMALL LETTER A WITH DIAERESIS
<Multi_key> <o> <o> : "ö" odiaeresis # LATIN SMALL LETTER O WITH DIAERESIS
<Multi_key> <u> <u> : "ü" udiaeresis # LATIN SMALL LETTER U WITH DIAERESIS
<Multi_key> <;> <s> : "ß" ssharp # LATIN SMALL LETTER SHARP S
<Multi_key> <;> <A> : "Ä" Adiaeresis # LATIN CAPITAL LETTER A WITH DIAERESIS
<Multi_key> <;> <O> : "Ö" Odiaeresis # LATIN CAPITAL LETTER O WITH DIAERESIS
<Multi_key> <;> <U> : "Ü" Udiaeresis # LATIN CAPITAL LETTER U WITH DIAERESIS
<Multi_key> <;> <a> : "ä" adiaeresis # LATIN SMALL LETTER A WITH DIAERESIS
<Multi_key> <;> <o> : "ö" odiaeresis # LATIN SMALL LETTER O WITH DIAERESIS
<Multi_key> <;> <u> : "ü" udiaeresis # LATIN SMALL LETTER U WITH DIAERESIS
<Multi_key> <s> <;> : "ß" ssharp # LATIN SMALL LETTER SHARP S
<Multi_key> <A> <;> : "Ä" Adiaeresis # LATIN CAPITAL LETTER A WITH DIAERESIS
<Multi_key> <O> <;> : "Ö" Odiaeresis # LATIN CAPITAL LETTER O WITH DIAERESIS
<Multi_key> <U> <;> : "Ü" Udiaeresis # LATIN CAPITAL LETTER U WITH DIAERESIS
<Multi_key> <a> <;> : "ä" adiaeresis # LATIN SMALL LETTER A WITH DIAERESIS
<Multi_key> <o> <;> : "ö" odiaeresis # LATIN SMALL LETTER O WITH DIAERESIS
<Multi_key> <u> <;> : "ü" udiaeresis # LATIN SMALL LETTER U WITH DIAERESIS
# examples:
# <Multi_key> <apostrophe> <apostrophe> : "☕" acute # ACUTE ACCENT
# <Multi_key> <minus> <greater> : "→" U2192 # Compose - >
# <Multi_key> <colon> <parenright> : "☺" U263A # Compose : )
# <Multi_key> <b> <t> <w> : "by the way" # Compose b t w
# <Multi_key> <less> <p> : "<p></p>" # Compose < p
这是我的系统 Compose 的开始部分(太大,无法粘贴整个内容)。
我用正则表达式替换了所有与我在顶部添加的新行开头相同的行。
(因此,<Multi_key> <([AaUuOo])> <\1>
除了我在顶部添加的行之外没有其他匹配项。)
/usr/share/X11/locale/en_US.UTF-8/Compose
# UTF-8 (Unicode) compose sequence
# [email protected]
#
# Part 1 - Manual definitions
# Spacing versions of dead accents
<Multi_key> <s> <s> : "ß" ssharp # LATIN SMALL LETTER SHARP S
<Multi_key> <A> <A> : "Ä" Adiaeresis # LATIN CAPITAL LETTER A WITH DIAERESIS
<Multi_key> <O> <O> : "Ö" Odiaeresis # LATIN CAPITAL LETTER O WITH DIAERESIS
<Multi_key> <U> <U> : "Ü" Udiaeresis # LATIN CAPITAL LETTER U WITH DIAERESIS
<Multi_key> <a> <a> : "ä" adiaeresis # LATIN SMALL LETTER A WITH DIAERESIS
<Multi_key> <o> <o> : "ö" odiaeresis # LATIN SMALL LETTER O WITH DIAERESIS
<Multi_key> <u> <u> : "ü" udiaeresis # LATIN SMALL LETTER U WITH DIAERESIS
(Compose-ss ==> ß 是默认行为,并且做已经起作用了。
答案1
对我来说最有效的方法.XCompose
是切换到 UIM(我的设置在 Saucy 左右停止工作)。实际上,这很轻松,而且实现了我想要的效果,这让我有些震惊 :-)
$ sudo apt-get install uim
$ im-config -n uim
(然后注销并重新登录以重新启动 X)
太棒了!我又能输入 grεeκ 字母了!还Shift-Ctrl-U
可以用(虽然我不太会用)。通过 GNOME 2 菜单切换键盘布局也还可以用。
(此外,您没有问,但您应该能够include "%L"
在文件开头说出自动提取正确的东西。但也许不要修复没有损坏的东西?)