[comp.windows.x] function keys in xterm's vt100

sundar@ai.mit.edu (Sundar Narasimhan) (02/18/91)

Hi: I tried sending this once before, but the attempt seems to have 
failed. (Apologies if you get to see the foll. twice).

I have a program that expects to be run from a vt100. I'd like to
be able to run it from an xterm (on a sparc running SunOS 4.1 and X11R4).
The program expects vt100 function keys (PF2, PF3 etc) to be used.
Unfortunately, no matter what escape sequence I try typing, I can
never get the program to respond correctly. So my question is:
is the xterm emulation of vt100 (vt102) complete? If so, what does
one need to do in order to get the vt100 function keys typed in?
(BTW, on perusing the code I see that xterm just inserts the ascii 
string "13~" when I type F3 on my keyboard. Could someone explain
to me how this is supposed to work?)

Thanks. 

laub@Software.Mitel.COM (Boniface Lau) (02/22/91)

In article <13400@life.ai.mit.edu> sundar@ai.mit.edu writes:
|Hi: I tried sending this once before, but the attempt seems to have 
|failed. (Apologies if you get to see the foll. twice).
|
|I have a program that expects to be run from a vt100. I'd like to
|be able to run it from an xterm (on a sparc running SunOS 4.1 and X11R4).
|The program expects vt100 function keys (PF2, PF3 etc) to be used.
|Unfortunately, no matter what escape sequence I try typing, I can
|never get the program to respond correctly. So my question is:
|is the xterm emulation of vt100 (vt102) complete? If so, what does
|one need to do in order to get the vt100 function keys typed in?
|(BTW, on perusing the code I see that xterm just inserts the ascii 
|string "13~" when I type F3 on my keyboard. Could someone explain
|to me how this is supposed to work?)
|
|Thanks. 

Save the following keycode lines in a file such as .keymodrc and issue the
command xmodmap .keymodrc.

keycode 28 = Up
keycode 29 = Down
keycode 30 = Left
keycode 105 = Right

keycode 52 = KP_F1
keycode 53 = KP_F2
keycode 54 = KP_F3
keycode 78 = KP_F4

keycode 75 = KP_7
keycode 76 = KP_8
keycode 77 = KP_9
keycode 132 = KP_Subtract

keycode 98 = KP_4
keycode 99 = KP_5
keycode 100 = KP_6

keycode 119 = KP_1
keycode 120 = KP_2
keycode 121 = KP_3
keycode 97 = KP_Enter

keycode 101 = KP_0
keycode 57 = KP_Decimal


-- 
Boniface Lau    (613) 592-2122 ext. 3042    laub@Software.Mitel.COM
Mitel Corp.  				    ...uunet!mitel!spock!laub
350 Legget Drive, Kanata
Ontario, Canada, K2K 1X3