美文网首页
Ubuntu将Caps Lock改为Ctrl

Ubuntu将Caps Lock改为Ctrl

作者: 小豪丶 | 来源:发表于2018-05-04 22:18 被阅读79次

修改文件/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  <Menu>  will  act as a compose key (compose:menu) and
       <CapsLock> will act as third control key (ctrl:nocaps).

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

       In the following configuration the right <Alt>  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  <Control>+<Shift>  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 <Win> key will be a compose-key (compose:rwin) and the right
       <Alt> 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

      本文链接:https://www.haomeiwen.com/subject/wjmjrftx.html