How do I swap the CAPS LOCK and CONTROL keys on a

How do I swap the CAPS LOCK and CONTROL keys on a type 5 keyboard under Openwindows 3.x?


There are two ways to do it, one with xmodmap (for X11 only), and the
other using keytables.

Margarita Suarez suggests editing
$OPENWINHOME/etc/keytables/US5.kt. There are two places where keys 119
(CapsLock) and 76 (Control) should be swapped: the MODMAP section and the
KEYSYMMAP section. The latter is most important, because that's where the
"Pseudo-Lock" function (which controls the locking behaviour of the key) is
defined.

Doug Hughes suggests using xmodmap with
the following:

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

In X11, you can change your keyboard layout as you please using the
xkeycaps application, which allows you to edit and remap your keyboard
on the fly, as well as save configurations to be sourced by xmodmap.

xkeycaps is available from http://www.jwz.org/xkeycaps/
and in the contrib section of your friendly X11 source archive.

Thanks to Dan Pritts for the info on xkeycaps.



Home
FAQ