From: ljg@space.physics.uiowa.edu (Larry Granroth)
Subject: [XFree86] xterm keysym mapping
Organization: The University of Iowa, Department of Physics and Astronomy
X-Newsreader: TIN [version 1.1 PL6]
Date: Fri, 20 Nov 1992 21:40:24 GMT


I'm running XFree86 on 386BSD and was trying to create an .Xdefaults
file that would provide VT200 application keypad emulation under xterm.
The file I created (attached below) almost works except that the Num_Lock
key on my 101-key keyboard toggles the behavior of the keypad such that
in one state, for example, KP_8 behaves as expected, but after using
Num_Lock (as a VT200 PF1) the KP_8 behaves like Up (until Num_Lock is
hit again).  Also, I've discovered through trial-and-error that this
Num_Lock/KP_8/Up is recognized separately from the Up arrow in the
4-key arrow group (i.e., remapping <Key>Up doesn't affect Num_Lock/KP_8/Up).

If I knew how to specify the keysym for Num_Lock/KP_8/Up, I could remap
it just like ~Num_Lock/KP_8 and my problem would be solved.

Below, I've added the modifier "Num_Lock" in front of the problem keypad
keys, but this doesn't work.  Does anyone know the right way to do this?

Thanks in advance for any help.  I'll summarize if appropriate.

larry-granroth@uiowa.edu

-------------------------.Xdefaults---------------------------------------
*font: fixed
*borderWidth: 2
*borderColor: maroon

XTerm*VT100*geometry:    80x24
XTerm*VT100*scrollBar:   on
XTerm*VT100*boldFont:	 vtbold
XTerm*VT100*font:	 vtsingle
XTerm*VT100*c132:	 on
XTerm*VT100*alwaysHighlight:	off
XTerm*VT100*curses:	 on
XTerm*VT100*saveLines:	 480
XTerm*VT100*jumpScroll:	 on
XTerm*VT100*multiScroll:	on
XTerm*VT100*scrollInput:	off
XTerm*VT100*scrollKey:	 on
XTerm*VT100*reverseWrap: on
XTerm*Tek4014*width:	800
XTerm*Tek4014*height:	600
XTerm*WaitForMap*waitForMap:	on

XTerm*VT100.Translations: \
#override \
 Shift<Key>F1:           string("0x1b") string("[23~") \n\
 Shift<Key>F2:           string("0x1b") string("[24~") \n\
 Shift<Key>F3:           string("0x1b") string("[25~") \n\
 Shift<Key>F4:           string("0x1b") string("[26~") \n\
 Shift<Key>F5:           string("0x1b") string("[28~") \n\
~Shift<Key>F6:           string("0x1b") string("[17~") \n\
 Shift<Key>F6:           string("0x1b") string("[29~") \n\
~Shift<Key>F7:           string("0x1b") string("[18~") \n\
 Shift<Key>F7:           string("0x1b") string("[31~") \n\
~Shift<Key>F8:           string("0x1b") string("[19~") \n\
 Shift<Key>F8:           string("0x1b") string("[32~") \n\
~Shift<Key>F9:           string("0x1b") string("[20~") \n\
 Shift<Key>F9:           string("0x1b") string("[33~") \n\
~Shift<Key>F10:          string("0x1b") string("[21~") \n\
 Shift<Key>F10:          string("0x1b") string("[34~") \n\
 <Key>Num_Lock:          string("0x1b") string("OP")   \n\
 <Key>KP_Divide:         string("0x1b") string("OQ")   \n\
 <Key>KP_Multiply:       string("0x1b") string("OR")   \n\
 <Key>KP_Subtract:       string("0x1b") string("OS")   \n\
 Shift<Key>KP_Add:       string("0x1b") string("Ol")   \n\
~Shift<Key>KP_Add:       string("0x1b") string("Om")   \n\
 <Key>KP_Decimal:        string("0x1b") string("On")   \n\
 <Key>KP_0:              string("0x1b") string("Op")   \n\
 <Key>KP_1:              string("0x1b") string("Oq")   \n\
 <Key>KP_2:              string("0x1b") string("Or")   \n\
 <Key>KP_3:              string("0x1b") string("Os")   \n\
 <Key>KP_4:              string("0x1b") string("Ot")   \n\
 <Key>KP_5:              string("0x1b") string("Ou")   \n\
 <Key>KP_6:              string("0x1b") string("Ov")   \n\
 <Key>KP_7:              string("0x1b") string("Ow")   \n\
 <Key>KP_8:              string("0x1b") string("Ox")   \n\
 <Key>KP_9:              string("0x1b") string("Oy")   \n\
 Num_Lock<Key>KP_Decimal:        string("0x1b") string("On")   \n\
 Num_Lock<Key>KP_0:              string("0x1b") string("Op")   \n\
 Num_Lock<Key>KP_1:              string("0x1b") string("Oq")   \n\
 Num_Lock<Key>KP_2:              string("0x1b") string("Or")   \n\
 Num_Lock<Key>KP_3:              string("0x1b") string("Os")   \n\
 Num_Lock<Key>KP_4:              string("0x1b") string("Ot")   \n\
 Num_Lock<Key>KP_5:              string("0x1b") string("Ou")   \n\
 Num_Lock<Key>KP_6:              string("0x1b") string("Ov")   \n\
 Num_Lock<Key>KP_7:              string("0x1b") string("Ow")   \n\
 Num_Lock<Key>KP_8:              string("0x1b") string("Ox")   \n\
 Num_Lock<Key>KP_9:              string("0x1b") string("Oy")   \n\
 <Key>KP_Enter:          string("0x1b") string("OM")   \n\
 <Key>Insert:            string("0x1b") string("[1~")  \n\
 <Key>Home:              string("0x1b") string("[2~")  \n\
 <Key>Prior:             string("0x1b") string("[3~")  \n\
 <Key>Delete:            string("0x1b") string("[4~")  \n\
 <Key>End:               string("0x1b") string("[5~")  \n\
 <Key>Next:              string("0x1b") string("[6~")  \n\
 <Key>Up:                string("0x1b") string("[A")   \n\
 <Key>Down:              string("0x1b") string("[B")   \n\
 <Key>Right:             string("0x1b") string("[C")   \n\
 <Key>Left:              string("0x1b") string("[D")   \n\
 <Key>BackSpace:         string("0x7f")