Ubuntu將Caps Lock改為Ctrl

weixin_33785972發表於2018-05-04

修改檔案/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

我的翻譯很渣,不如機翻,就不翻譯了。

相關文章