Linux Virtual Console 下交换CapsLock和Ctrl键的方法

Generic GNU/Linux Virtual Console (any distribution)

Note: while these instructions should work under any distribution of GNU/Linux, you may wish to use a distribution-specific method which may be simpler.
Press Ctrl-Alt-F1 to enter the first virtual console.
Now run:
 $ sudo dumpkeys | head -1 > /usr/share/keymaps/Caps2Ctrl.map
Then add the 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
Then run loadkeys on that file:
 $ sudo loadkeys /usr/share/keymaps/Caps2Ctrl.map
To revert run:
 $ sudo loadkeys -d #load default keymap file

你可能感兴趣的:(linux,Ctrl,capsLock,交换)