我使用自定义键盘布局,分为德语组和西里尔语组。CAPS
以两种方式用作组锁存器。 “CAPS
后跟键”或“ CAPS
+Key”给出组中除当前键之外的键的键符号。
除了四个键之外,一切都运行良好:“<”=94、“x”=53、“s”=39 和“w”=25。按CAPS
+ SHIFT
+OneOfTheseKeys 不会产生键盘符号。CAPS
后跟SHIFT
+Key 可按预期与所有键配合使用。
我想知道这是否与硬件相关(这些是我键盘上的相邻键)或者有一些我没有看到的复杂性?
xkb_keymap
以下是包含“s”符号(使用shift锁定不起作用)和“d”=40(锁定有效)的相关部分:
xkb_keymap {
//...
xkb_types "complete(slava)" {
type "FOUR_LEVEL" {
modifiers= Shift+LevelThree;
map[Shift]= Level2;
map[LevelThree]= Level3;
map[Shift+LevelThree]= Level4;
level_name[Level1]= "Base";
level_name[Level2]= "Shift";
level_name[Level3]= "Level3";
level_name[Level4]= "Shift Level3";
};
// two levels: 1=base and 2=AnyOf(Control,Alt,LevelThree,Mod4).
// I use it for caps without mod to latch group,
// with any mod to switch groups
type "CUSTOM_FOR_CAPS" {
modifiers= Control+Alt+LevelThree+Mod4;
map[Control]= Level2;
map[Alt]= Level2;
map[LevelThree]= Level2;
map[Mod4]= Level2;
level_name[Level1]= "Base";
level_name[Level2]= "Control Alt LevelThree Mod4";
};
//...
};
xkb_compatibility "capslock(grouplatch)" {
//...
interpret Caps_Lock+AnyOfOrNone(all) {
action= LatchGroup(group=+1);
};
indicator "Caps Lock" {
!allowExplicit;
groups= Group2;
};
//...
}
xkb_symbols "pc+de(de-slava)+de(ru-slava):2+capslock(grouplatch)" {
name[group1]="German (slava)";
name[group2]="Russian (Germany, phonetic-slava)";
key <CAPS> {
type= "CUSTOM_FOR_CAPS",
symbols[Group1]= [ Caps_Lock, ISO_Next_Group ],
symbols[Group2]= [ Caps_Lock, ISO_Prev_Group ]
};
key <AC02> {
type[group1]= "FOUR_LEVEL",
type[group2]= "FOUR_LEVEL",
symbols[Group1]= [ s, S, dollar, dollar ],
symbols[Group2]= [ Cyrillic_es, Cyrillic_ES, dollar, dollar ]
};
key <AC03> {
type[group1]= "FOUR_LEVEL",
type[group2]= "FOUR_LEVEL",
symbols[Group1]= [ d, D, eth, ETH ],
symbols[Group2]= [ Cyrillic_de, Cyrillic_DE, eth, ETH ]
};
//...
};
};