mareb@levels.sait.edu.au (04/15/91)
Subject: help with X386? I'm having some trouble getting the X386 1.1a server working. I have the binaries but my Xconfig file which worked with the previous version doesn't work with the new server. My second problem is that I have to talk to a VMS machine which expects VT100 function keys. xterm seems to send some quite odd strings: F1 ESC[11~ F2 ESC[12~ ... Page Up [[ ... I have not been able to discover how or why this happens. The doco. seems to suggest that the keymaps used on the console should still be applicable - but it isn't. Finally, can I please get a copy of the X386 server and utilities binaries which uses TCP/IP. Is there anyone who has built this and will make it available via anon. FTP - I just can't find 80Mb of disk that I can use and fetching the source takes soooo looooooong from here. b++
drector@orion.oac.uci.edu (David Rector) (04/16/91)
In <16183.2809bec1@levels.sait.edu.au> mareb@levels.sait.edu.au writes: >Subject: help with X386? >My second problem is that I have to talk to a VMS machine which expects >VT100 function keys. xterm seems to send some quite odd strings: > F1 ESC[11~ > F2 ESC[12~ > ... > Page Up [[ > ... >I have not been able to discover how or why this happens. The doco. >seems to suggest that the keymaps used on the console should still >be applicable - but it isn't. I've been having related troubles with key definitions. Here's what seems to work. 1. Find out what key codes are really being sent by the server. The tools for this are 'xev' and 'xmodmap'. 'xev' puts up a test window which reports all events that take place in it. This will allow you to determine what the server thinks the key you press is, and what it translates to. There are two sets of key codes: a. The server sends two bytes: i) state - state of modifier keys (shift, etc.) ii) a server dependent 'keycode'. b. These are translated by clients into X specific 'keysym's. 'xmodmap' queries and modifies the table translating keycodes to keysyms. 'xmodmap -pk' types out this table. I have not been able to find a utility that will type out the XTerm translation table. 2. In whatever file your xterm reads to find its resources (I use 'xdm' to start X; it reads /usr/lib/X11/app-defaults/XTerm), put modifications of the VT100 translations. I use XTerm*ttyModes: intr ^c erase ^? XTerm*VT100*Translations: #override\ Shift<KeyPress>KP_9:string("9")\n\ Shift<KeyPress>KP_3:string("3")\n\ Shift<KeyPress>KP_0:string("0") The purpose of these changes in translations was to correct what looks like a bug in the keyboard translations of X386 1.1. I suspect Tom made compensating errors in 1.1 that show up now that he has fixed the keyboard code in 1.1a. On my system, X386 1.1a returns correct codes for the direction and keypad keys. -- David L. Rector drector@orion.oac.uci.edu Dept. of Math. U. C. Irvine, Irvine CA 92717
flinton@eagle.wesleyan.edu (04/19/91)
In article <16183.2809bec1@levels.sait.edu.au>, mareb@levels.sait.edu.au writes: > > ... VT100 function keys. xterm seems to send some quite odd strings: > > F1 ESC[11~ > F2 ESC[12~ > > I have not been able to discover how or why this happens. > For what it's worth, DEC's own keyboards (well, their VT220 KB's in VT100 mode) send as follows for the keys labeled by DEC as : ESC [ 1 7 ~ F6 ESC [ 1 8 ~ F7 ESC [ 1 9 ~ F8 ESC [ 2 0 ~ F9 ESC [ 2 1 ~ F10 ESC F11 (ESC) BS F12 (BS) LF F13 (LF) ESC [ 2 6 ~ F14 ESC [ 2 8 ~ F15 (Help) ESC [ 2 9 ~ F16 (Do) ESC [ 3 1 ~ F17 ESC [ 3 2 ~ F18 ESC [ 3 3 ~ F19 ESC [ 3 4 ~ F20 The only ESC [ 1 2 commands I can find are the SRM (Send-Receive Mode) commands ESC [ 1 2 h and ESC [ 1 2 l (for setting that mode off and on, resp.), not sent by any keys. So I agree, something odd is happening with your xTerm. -- Fred ------------------------------------------------------------------------------- Fred E.J. Linton Wesleyan U. Math. Dept. 649 Sci. Tower Middletown, CT 06457 E-mail: <FLINTON@eagle.Wesleyan.EDU> or <fejlinton@{att|mci}mail.com> -------------------------------------------------------------------------------
dag@gorgon.uucp (Daniel A. Glasser) (04/21/91)
In article <1991Apr18.210155.41901@eagle.wesleyan.edu> flinton@eagle.wesleyan.edu writes: >For what it's worth, DEC's own keyboards (well, their VT220 KB's in VT100 mode) >send as follows for the keys labeled by DEC as : > ESC [ 1 7 ~ F6 > ESC [ 1 8 ~ F7 > ESC [ 1 9 ~ F8 > ESC [ 2 0 ~ F9 > ESC [ 2 1 ~ F10 > ESC F11 (ESC) > BS F12 (BS) > LF F13 (LF) > ESC [ 2 6 ~ F14 > ESC [ 2 8 ~ F15 (Help) > ESC [ 2 9 ~ F16 (Do) > ESC [ 3 1 ~ F17 > ESC [ 3 2 ~ F18 > ESC [ 3 3 ~ F19 > ESC [ 3 4 ~ F20 >The only ESC [ 1 2 commands I can find are the SRM (Send-Receive Mode) >commands ESC [ 1 2 h and ESC [ 1 2 l (for setting that mode off and on, resp.), >not sent by any keys. So I agree, something odd is happening with your xTerm. The above shows a minor lack of understanding about how these ANSI X3.64 style escape sequences work. The DEC keyboard function keys (not the PF keys on the numeric pad) all send a sequence of the form <CSI> Pn ~, where <CSI> is the C1 (8-bit) control character 9B (or <ESC> [ in 7-bit controls mode), Pn is an ASCII decimal string (actually, it's not ASCII, but it corresponds to ASCII, so we'll call it ASCII) representing the key number, and ~ is the code which, in ASCII, represents the tilde character. The VT2xx/VT3xx/VT4xx terminals send the following values of Pn for the following keys: 1 Find 2 Replace 3 Select 4 Remove 5 Next Page 6 Previous Page 11 F1 Hold Screen (VT420 only) 12 F2 Print Screen (VT420 only) 13 F3 Set-up (VT420 only) 14 F4 Session (VT420 only) 15 F5 Break (VT420 only) 17 F6 18 F7 19 F8 20 F9 21 F10 23 F11 24 F12 25 F13 26 F14 28 Help 29 Do 31 F17 32 F18 33 F19 34 F20 The set mode/reset mode (SM/RM) sequences are of the form CSI Pm l and CSI Pm h One sets the mode, the other resets it. For DEC private modes a ? preceeds the mode number. You can (on DEC terminals at least) specify several modes to be set or reset in one command, but they must all be either ANSI or DEC private modes. Saying "The only ESC [ 1 2 commands I can find are"... makes no real sense, since the '1' and '2' are parameters to the command identified by the introducer (CSI or ESC [), the intermediate characters (none in the examples given) and the final (h or l for SM/RM, ~ for DEC FN keys). [Forgive the nit-picking, but I've gotten rather sick of the amount of misinformation that goes around about DEC escape sequences. Even most versions of X-term can't cope with badly formed sequences because of this type of misunderstanding. If anyone wants a full paper on how these things are formed, please send me e-mail and I'll send you something long winded, but accurate.] Daniel A. Glasser (Once apon a time a member of DEC Terminals Engineering where I learned this stuff.) -- Daniel A. Glasser One of those things that goes dag%gorgon@persoft.com "BUMP! (ouch!)" in the night.