Linux TPU keymapping for X

Constance Sieh ([email protected])
Thu, 11 Feb 1999 12:04:36 -0600 (CST)

My .Xmodmap file looks like:

remove Lock = Caps_Lock
remove Control = Control_L
keysym Caps_Lock = Control_L
keysym BackSpace = Delete
add Control = Control_L
keycode 77 = KP_F1
keycode 112 = KP_F2
keycode 63 = KP_F3
keycode 82 = KP_F4
keycode 86 = KP_Subtract
keysym KP_Home = KP_7
keysym KP_Up = KP_8
keysym KP_Prior = KP_9
keysym KP_Left = KP_4
keysym KP_Begin = KP_5
keysym KP_Right = KP_6
keysym KP_End = KP_1
keysym KP_Down = KP_2
keysym KP_Next = KP_3
keysym KP_Insert = KP_0
keysym KP_Delete = KP_Decimal
*****************************

My .xsession file has the following in it:

usermodmap=$HOME/.Xmodmap
if [ -f $usermodmap ]; then
xmodmap $usermodmap
fi
*****************************

Notes on my remappings:

I set the PF1-PF4 keys to be on the keypad instead of F1-F4. Since I am using
"-" for "TPU delete line, PF4", I redefine the "+ 86 keycode" to be "-".
That way "+" becomes the "delete word" key in TPU. Doing it that way I only
lose the "delete char" commands on the keypad and not "delete word" or "Delete
Line".

If somebody wants to use F1-F4 (instead of Num-Lock / * and - on the keypad)
for PF1-PF4 then you just need to use keycodes 67-70 (F1-F4) instead of 77 112
63 & 82 from above. BTW, I haven't figured out a use for NUM Lock in LINUX so
I haven't missed not having it.

Understand that I set erase to be ^? and not ^h. You don't need to do that
if you aren't using Delete for Erase.

I hate hitting Caps Lock thinking its Ctrl (it is there on an LK keyboard) so
I set Caps to Ctrl and don't worry about locking.

I, also, change the numeric keys to always send the keypad_number keysim
instead of the keypad_Home _End, etc keysims. That way I don't care how the
keypad was defined when an xterm was initialized or have problems when I am
using telnet.

I hope that helps...

Written by
Neal Schmidt

Submitted to linux-faq bu
Connie Sieh