Tag Archives: setxkbmap

Changing Caps_Lock as third Ctrl key

  • create map
  • $ sudo dumpkeys | head -1 > /usr/share/keymaps/Caps2Ctrl.map

  • add following lines to that file
  • keycode 58 = Control # This makes Caps act as Ctrl
    # keycode 29 = Caps_Lock # This makes Ctrl act as Caps
    # alt_is_meta # This fixes the Alt key

  • run loadkeys on that file
  • $ sudo loadkeys /usr/share/keymaps/Caps2Ctrl.map

  • to revert and load default keymap
  • $ sudo loadkeys -d

    Reference : http://www.emacswiki.org/emacs/MovingTheCtrlKey#toc6

    Another option is to execute following command

    $ setxkbmap -option ctrl:nocaps

    Advertisements