使用 xkb 定义自定义键盘布局时,如何完全覆盖修饰符?例如当我有
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_geometry { include "pc(pc105)" };
xkb_symbols {
include "pc+us"
override modifier_map Mod4 { <LALT>, <RALT> };
};
};
我预计 Mod4 仅为两个“Alt”键生成。但
xkbcomp test :0 && xkbcomp :0 generated
grep Mod4 generated
显示旧映射(来自 pc105)仍然适用
modifier_map Mod4 { <LALT> };
modifier_map Mod4 { <RALT> };
modifier_map Mod4 { <LWIN> };
modifier_map Mod4 { <RWIN> };
modifier_map Mod4 { <SUPR> };
modifier_map Mod4 { <HYPR> };