 
 
 
Switching Caps Lock and Control on the keyboard (assuming you use
keymaps 0-15; check with dumpkeys | head -1)
  % loadkeys
  keymaps 0-15
  keycode 58 = Control
  keycode 29 = Caps_Lock
  %
  % xmodmap .xmodmaprc
.xmodmaprc contains lines
  remove Lock = Caps_Lock
  remove Control =  Control_L
  keysym  Control_L  =  Caps_Lock
  keysym  Caps_Lock  = Control_L
  add Lock = Caps_Lock
  add Control = Control_L
Can the Shift, Ctrl and Alt keys be made to behave as toggles?" Yes, after saying
% loadkeys
keycode 29 = Control_Lock
keycode 42 = Shift_Lock
keycode 56 = Alt_Lock
%
What about `sticky' modifier keys? Well, since their introduction in the kernel (1.3.33) there has not been a new release of the kbd package yet, so they have to be invoked using their hexadecimal codes. For example,
% loadkeys
keymaps 0-15
keycode 54 = 0x0c00
keycode 97 = 0x0c02
keycode 100 = 0x0c03
%
 
 
