Ubuntu将Caps Lock改为Ctrl

修改文件/etc/default/keyboard

修改下面这行:

XKBOPTIONS="ctrl:nocaps"

保存。

bash中输入:

sudo dpkg-reconfigure keyboard-configuration

其他

详细设置请看手册man keyboard

下面是man中介绍例子:

EXAMPLES
       The following configuration will give you the standard US QWERTY layout
       (us).   The  key    will  act as a compose key (compose:menu) and
        will act as third control key (ctrl:nocaps).

           XKBLAYOUT=us
           XKBVARIANT=
           XKBOPTIONS=compose:menu,ctrl:nocaps

       In the following configuration the right   key  (grp:toggle)  will
       toggle between US QWERTY layout (us) and Greek (gr) layout.  The option
       grp_led:scroll is ignored on the console but in X in means to  use  the
       ScrollLock  keyboard  led  as  indicator  for the current layout (US or
       Greek).

           XKBLAYOUT=us,gr
           XKBVARIANT=
           XKBOPTIONS=grp:toggle,grp_led:scroll

       In the following configuration the  +  key  combination
       will  toggle (grp:ctrl_shift_toggle) between French keyboard (fr) with‐
       out dead keys (nodeadkeys) and British (gb) “Dvorak” (dvorak) keyboard.
       The  right  key will be a compose-key (compose:rwin) and the right
        key will function as AltGr (lv3:lalt_switch).

           XKBLAYOUT=fr,gb
           XKBVARIANT=nodeadkeys,dvorak
           XKBOPTIONS=grp:ctrl_shift_toggle,compose:rwin,lv3:ralt_switch

我的翻译很渣,不如机翻,就不翻译了。

你可能感兴趣的:(Ubuntu将Caps Lock改为Ctrl)