Swap ESC and CAPSLOCK keys on CentOS [MEMO]

CentOS's keyboard configuration tools does not have an option to switch ESC and

CAPSLOCKkeys.Soyouneedtodothesteps.

Createafile~/.speedswapperwiththefollowingcontent:

!Swapcapslockandescape

removeLock=Caps_Lock

keysymEscape=Caps_Lock

keysymCaps_Lock=Escape

addLock=Caps_Lock

Thefollowingcommandwilldotheswitch

$ xmodmap .speedswapper

Refer to http://vim.wikia.com/wiki/Map_caps_lock_to_escape_in_XWindows

相关推荐