lbrooks@shl.com (Lyle Brooks) (06/21/91)
Ok, I've reached the end of my experience level. It time to call for re-enforcements. I have been remote logging into a 386 Box running SCO, actually I still logged in, with a vt220 terminal. I am having problems setting up this keyboard to work in a reasonable manner. My biggest pain is when I get in vi. There are a group of 4 functions keys that are labeled F11-F14 at the top of the keyboard. The F11 key also has a sub-label of (ESC) which I would like to have work like, well ESCAPE, but I get a feature thrown in for free that changes the case of whatever I'm editing. Here let me show you... /* I type in "i" to insert, followed by the string, followed by <ESC> * the F11 key. */ abc deg hfi /* And I get the following... See the "i" changes to "I" and the cursor * moves back a character. */ abc deg hfI /* If move to the 2nd word "deg" and enter cw to change the word, followed * by the string "def", followed by <ESC>, I get ... */ abc deF HfI /* The "f" and the "h" change case. */ I have set my TERM to vt220, with % setenv TERM vt220 Here's my stty -a output : speed 9600 baud; ispeed 13 baud; ospeed 13 baud; line = 0; intr = ^C; quit = ^\; erase = DEL; kill = ^U; eof = ^D; eol = ^@; swtch = ^@;susp = ^@; -parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk -ctsflow -rtsflow -ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc ixon ixany -ixoff isig icanon -xcase echo echoe echok -echonl -noflsh -iexten -tostop opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3 Here's my terminfo from the infocmp command : vt220|DEC VT220 in vt100 emulation mode, am, mir, xenl, xon, cols#80, lines#24, vt#3, bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, clear=\E[;H\E[2J$<50>, cr=\r, csr=\E[%i%p1%d;%p2%dr, cub1=\b, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH$<10>, cuu1=\E[A, dch1=\E[P, dl1=\E[M, ed=\E[J$<50>, el=\E[K$<3>, home=\E[H, ht=\t, if=/usr/lib/tabset/vt100, il1=\E[L, ind=\ED, is2=\E[1;24r\E[24;1H, kbs=^_, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf10=\E[29~, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[17~, kf6=\E[18~, kf7=\E[19~, kf8=\E[20~, kf9=\E[21~, rc=\E8, rev=\E[7m$<2>, rf=/usr/lib/tabset/vt100, ri=\EM, rmacs=\E(B$<4>, rmir=\E[4l, rmso=\E[m, rmul=\E[m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, sgr0=\E[m$<2>, smacs=\E(<$<2>, smir=\E[4h, smso=\E[7m, smul=\E[4m, I further know that when I am at the shell prompt and hit the F11 (ESC) key followed by a <RETURN> I get ... ^[[23~ not found I've been told that the "~" in vi is what is changing the case. I tried to experiment with terminfo my creating a new entry (Please note. I did not modify the existing entry.) This didn't work. I suppose because terminfo describe the capabilities of a particular terminal (i.e. what character sequence I need to send the terminal to move the cursor up) but it doesn't re-define the character sequence sent by a key on that terminal. Yes, No?? I've also found that if a change my TERM variable to 'vt100' and go into the terminal setup and change the terminal type from VT220 7 Bit controls to VT100 then the F11 key works like <ESC>. I know this is a work around, but after I fought the battle this long... I've poured over manual pages, and the VI and TERMCAP/TERMINFO nutshell books...I don't feel like calling a truce with a work around. I'd actually like to know what I need to do, or why it's impossible. Is it the hardware? the software? or the wet-ware behind the software thats riding on top of the hardware? Any help would be greatly appreciated. I've just started reading this newsgroup so forgive me if this horse has already been beaten to death. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Lyle D. Brooks lbrooks@shl.com Systemhouse Inc. uunet!shl!lbrooks 1010 N. Glebe Rd. uunet!shl!lbrooks
mikc@geech.gnu.ai.mit.edu (Mike Coughlin) (06/22/91)
A handy trick to remember with keyboards that were designed by silly people is that escape is the same as controll [. The escape key on the VT-220 is an escape key only when the terminal is set up to emulate a VT-100. The many changes made to the VT-220 from the VT-100 seem to have been done by somebody who didn't program. I don't know why computer users don't complain more to the manufacturers when they move or leave out things like escape keys. You might try using a termcap for the VT-220 in real VT-220 mode and get used to typing ctl-[ instead of escape. Then the other keys might work as you expect.
gwyn@smoke.brl.mil (Doug Gwyn) (06/23/91)
In article <16617@life.ai.mit.edu> mikc@geech.gnu.ai.mit.edu (Mike Coughlin) writes: > The many changes made to the VT-220 from the VT-100 seem to have been done >by somebody who didn't program. The idiotic VT-220 keyboard layout was designed to conform to some European "ergonomic standard" for keyboards. Many recent keyboard layouts are designed to mimic the IBM PC's, which has to be one of the worst of all time.
jetfuel@babbage.csus.edu (Dave Jenks) (06/23/91)
In article <1991Jun21.155750.23070@shl.com> lbrooks@shl.com (Lyle Brooks) writes: >/* I type in "i" to insert, followed by the string, followed by <ESC> > * the F11 key. > */ > abc deg hfi > >/* And I get the following... See the "i" changes to "I" and the cursor > * moves back a character. > */ > abc deg hfI >I further know that when I am at the shell prompt and hit the F11 (ESC) key >followed by a <RETURN> I get ... > >^[[23~ not found > >I've been told that the "~" in vi is what is changing the case. I tried to >I know this is a work around, but after I fought the battle this long... You've pretty much summed it up - DEC vt200- and vt300-series ttys use the LK-201 keyboard. One "feature" of this keyboard is that ESC (F11) sends a known character sequence, which you described, above. DEC-designed O/Ss (ie, VMS) know about this, since they only support DEC ttys. I use a vt320 at home, and get around this by just using ctrl-[ intead of F11/"ESC". The only alternative I can think of is to program the key on the terminal to actually send the 0x1B character (ESC). I wrote a utility to do this once, but it was lost long ago. It's a royal pain-in-the-butt to program them, but if there is enough interest, I'll rewrite it with a nice interface. --Dave -- ======================================================================= "Pro is to con, as progress is to Congress..." >>-@@-> Dave Jenks uunet.UU.NET!babbage.ecs.csus.edu!jetfuel =======================================================================