Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!udel!haven.umd.edu!mimsy!cml From: cml@care.cs.umd.edu (Christopher Lott) Newsgroups: comp.windows.x Subject: vt100 fkeys in Xterm Message-ID: <34755@mimsy.umd.edu> Date: 22 May 91 12:59:37 GMT Sender: news@mimsy.umd.edu Organization: University of Maryland Dept of Computer Science Lines: 67 Originator: cml@care.cs.umd.edu I needed to talk to a database forms package that required vt100 function keys, so I added the following to my .X11defaults file. This was for a sun3 running X11R4. A mapping for the sparc would be nice; I haven't found the time for that yet. The sparc has a keypad that matches the vt100 much more closely. These mappings let me talk to that unfriendly system rather nicely. Note that these settings are active in all xterm windows, which was fine by me. Hope this helps someone. Please excuse this post if 42 of these things have gone by already. Comments, questions, improvements: please email, I'll summarize. chris... -----snip, snip------- ! ! cml 910429 get vt100 function keys on a sun keyboard ! this goes in file .X11defaults ! the escape char is hex 1b ! borrowed and rewritten from the xterm man page ! ! function keys L1 - L4 correspond to PF1 - PF4 ! L1 = PF1 (esc O P) ! L2 = PF2 (esc O Q) ! L3 = PF3 (esc O R) ! L4 = PF4 (esc O S) ! function keys F1 - F9 correspond to keys on the numeric keypad, 1-9 ! F1 = 1, next block (esc O q) ! F2 = 2, previous block (esc O r) ! F3 = 3, clear block (esc O s) ! F4 = 4, next record (esc O t) ! F5 = 5, previous record (esc O u) ! F6 = 6, clear record (esc O v) ! F7 = 7, next field (esc O w) ! F8 = 8, previous field (esc O x) ! F9 = 9, clear field (esc O y) ! function keys R1 - R5 correspond to other keys on numeric keypad ! R1 = Enter (esc O M) ! R2 = - (esc O m) ! R3 = , (esc O l) ! R4 = . (esc O n) ! R5 = 0 (esc O p) ! ! XTerm*VT100.Translations: #override \ L1: string("0x1b") string("OP") \n\ L2: string("0x1b") string("OQ") \n\ L3: string("0x1b") string("OR") \n\ L4: string("0x1b") string("OS") \n\ F1: string("0x1b") string("Oq") \n\ F2: string("0x1b") string("Or") \n\ F3: string("0x1b") string("Os") \n\ F4: string("0x1b") string("Ot") \n\ F5: string("0x1b") string("Ou") \n\ F6: string("0x1b") string("Ov") \n\ F7: string("0x1b") string("Ow") \n\ F8: string("0x1b") string("Ox") \n\ F9: string("0x1b") string("Oy") \n\ R1: string("0x1b") string("OM") \n\ R2: string("0x1b") string("Om") \n\ R3: string("0x1b") string("Ol") \n\ R4: string("0x1b") string("On") \n\ R5: string("0x1b") string("Op") \n -----snip, snip------- -- Christopher Lott \/ Dept of Comp Sci, Univ of Maryland, College Park, MD 20742 cml@cs.umd.edu /\ 4122 AV Williams Bldg 301 405-2721