使用自定义键盘映射

使用自定义键盘映射

我试图不是覆盖 /usr/share/X11/symbols/us,尽管我已经这样做了很多年。

因此我将来自 /usr/share/X11/symbols/us 的 dvorak-alt-intl 副本添加到 ~/xkb/jpic,因为这就是我要进行的工作:

default
partial alphanumeric_keys
xkb_symbols "dvorak-alt-intl" {

    name[Group1]= "English (Dvorak alternative international no dead keys)";

    include "us(dvorak)"

    key <AE04> { [         9,  dollar,    EuroSign ] };

    key <AD02> { [     comma,    less,  adiaeresis,       dead_caron ] };
    key <AD03> { [    period, greater, ecircumflex,   periodcentered    ] };
    key <AD04> { [         p,       P,  ediaeresis,     dead_cedilla ] };
    key <AD05> { [         y,       Y,  udiaeresis ] };
    key <AD08> { [         c,       C,    ccedilla,    dead_abovedot ] };

    key <AC01> { [         a,       A,      agrave ] };
    key <AC02> { [         o,       O, ocircumflex ] };
    key <AC03> { [         e,       E,      eacute ] };
    key <AC04> { [         u,       U, ucircumflex ] };
    key <AC05> { [         i,       I, icircumflex ] };
    key <AC10> { [         s,       S,      ssharp ] };

    key <AB01> { [ semicolon,   colon, acircumflex ] };
    key <AB02> { [         q,       Q,  odiaeresis,      dead_ogonek ] };
    key <AB03> { [         j,       J,      egrave, dead_doubleacute ] };
    key <AB04> { [         k,       K,      ugrave ] };
    key <AB05> { [         x,       X,  idiaeresis ] };

    include "level3(ralt_switch)"
};

但这总是失败:

>>> setxkbmap -v 10 -I ~/xkb/ jpic dvorak-alt-intl 
Setting verbose level to 10
locale is C
Warning! Multiple definitions of keyboard layout
         Using command line, ignoring X server
Warning! Multiple definitions of layout variant
         Using command line, ignoring X server
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      evdev
layout:     jpic
variant:    dvorak-alt-intl
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+jpic(dvorak-alt-intl)+inet(evdev)
geometry:   pc(pc104)
Error loading new keyboard description

答案1

您可以通过 来执行此操作吗Xmodmap

运行时,xmodmap -pke > .Xmodmap它将生成一个.Xmodmap文件,其中包含您当前的键盘映射,格式如下:keycode 57 = n N每行对应一个键码,后面跟着当前由布局映射到它的键符号,每列对应一个不同的修饰符(因此,在这种情况下,没有修饰符时为“n”,与 shift 一起使用时为“N”)。您可以在那里编辑布局,然后运行xmodmap .Xmodmap以激活它。

可以找到简短、有用的介绍这里

相关内容