多年来,我使用以下~/.Xmodmap
文件来快速获取德语变音符号,例如,当我按下时,ALT_R + a
我得到ä
。与使用撰写键相比,这是一个不错的快捷方式:
keycode 108 = Mode_switch
keycode 38 = a A adiaeresis Adiaeresis adiaeresis Adiaeresis
keycode 30 = u U udiaeresis Udiaeresis udiaeresis Udiaeresis
keycode 32 = o O odiaeresis Odiaeresis odiaeresis Odiaeresis
keycode 39 = s S ssharp ssharp ssharp ssharp
keycode 20 = minus underscore endash endash endash endash
keycode 60 = period greater ellipsis ellipsis ellipsis ellipsis
keycode 61 = slash question emdash emdash emdash emdash
注意:我使用的是快乐黑客键盘,它没有ALT_GR
键。keycode 108
由右 ALT 键发送,Mode_switch
通常与上面的第 2 和第 3 个值相对应。
从 17.10 开始,所有组合都只会产生警告声,不会发生其他任何事情。我在 Fedora 27 上也发现了同样的情况,所以也许这与新的陳小嶺设置和/或 Gnome Shell?
任何想法我怎样才能在当前情况下实现这一点Gnome 外壳设置?
答案1
谢谢古纳尔·哈尔马松,我找到了足够的信息这个答案。以下是我所做的:
为了包含一些新的关键设置,我将其添加到末尾/usr/share/X11/xkb/symbols/us
:
partial alphanumeric_keys
xkb_symbols "us-de" {
// include all the definitions from us(basic), I just want to add to it
include "us(basic)"
name[Group1]= "English (US, with german umlauts)";
// add german umlauts
key <AC01> { [ a, A, adiaeresis, Adiaeresis ] };
key <AD07> { [ u, U, udiaeresis, Udiaeresis ] };
key <AD09> { [ o, O, odiaeresis, Odiaeresis ] };
key <AC02> { [ s, S, ssharp, ssharp ] };
// and some other keys
key <AE11> { [ minus, underscore, endash, endash ] };
key <AB09> { [ period, greater, ellipsis, ellipsis ] };
key <AB10> { [ slash, question, emdash, emdash ] };
// have ALT_R as level 3 switch
include "level3(ralt_switch)"
};
并且有一个我可以选择设置 > 区域和语言,我在末尾添加了以下内容变体列表在English (US)
此 XML 文件中/usr/share/X11/xkb/rules/evdev.xml
:
<variant>
<configItem>
<name>us-de</name>
<description>English (US, with german umlauts)</description>
</configItem>
</variant>
之后sudo systemctl restart keyboard-setup.service
我可以从中选择新的布局变体设置 > 区域和语言。