The closest equivalent would be to run the
xmodmap program each time you log in.
Put the following snippet in a file called
.Xmodmap in your home directory:
keycode 66 = Return
You can see the key codes and current associated key names by running
xev from a terminal. Press Caps Lock while the xev window is focused, and you'll see a something like
KeyPress event, serial 29, synthetic NO, window 0x7c00001,
root 0x105, subw 0x0, time 96597741, (1548,225), root:(3151,256),
state 0x0, keycode 66 (keysym 0xffe5, Caps_Lock), same_screen YES,
" XLookupString gives 1 bytes: (0d) "
" XmbLookupString gives 1 bytes: (0d) "
XFilterEvent returns: False
For most keys, you only need the
keycode line. Modifiers are tracked separately: you need to match keysyms (what's on the right of the
keycode … = … directive) with modifiers. The directive
clear Lock removes the
Lock modifier (which is Caps Lock or Shift Lock) from all keys.
Depending on your distribution and on your desktop environment, it may or may not be enough to add these lines to
~/.Xmodmap: many setups, but not all, automatically read this file at login time. If yours doesn't, run the command
xmodmap ~/.Xmodmap at login time. How to do this depends on your choice of desktop environment.