|
键位设置规则在下列文件中
$ grep -e "ctrl:\|:ctrl" /usr/share/X11/xkb/rules/evdev.lst grp:ctrls_toggle Both Ctrl keys togethergrp:ctrl_shift_toggle Ctrl+Shiftgrp:ctrl_alt_toggle Alt+Ctrlctrl:nocaps Caps Lock as Ctrlctrl:lctrl_meta Left Ctrl as Metactrl:swapcaps Swap Ctrl and Caps Lockctrl:ac_ctrl At left of 'A'ctrl:aa_ctrl At bottom leftctrl:rctrl_ralt Right Ctrl as Right Altctrl:menu_rctrl Menu as Right Ctrlctrl:ctrl_ralt Right Alt as Right Ctrlcaps:ctrl_modifier Make Caps Lock an additional Control but keep the Caps_Lock keysymaltwin:ctrl_win Control is mapped to Win keys (and the usual Ctrl keys)altwin:ctrl_alt_win Control is mapped to Alt keys, Alt is mapped to Win keysterminate:ctrl_alt_bksp Control + Alt + Backspace |
可以看到“ctrl:nocaps”可以实现我们想要的功能:把caps变为另一个ctrl键。
接下来就是在哪里修改映射规则:
方法一: dconf
dconf write /org/gnome/desktop/input-sources/xkb-options "['ctrl:nocaps']"
方法二:dconf-editor
安装dconf-editor,打开后根据路径/org/gnome/desktop/input-sources找到xkb-option,修改其内容为['ctrl:nocaps']
|
|