Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Archive » comp.sys.amiga » More bugs in DBW's VT100 (OR ANY VT100 and another system)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
More bugs in DBW's VT100 (OR ANY VT100 and another system) [message #293686] Tue, 02 December 1986 11:45 Go to next message
Anonymous
Karma:
Originally posted by: rick@mips.UUCP (Rick Frazier)
Article-I.D.: mips.782
Posted: Tue Dec  2 11:45:20 1986
Date-Received: Tue, 2-Dec-86 21:18:37 EST
References: <3131@ece-csc.UUCP> <341@pttesac.UUCP> <6478@ut-sally.UUCP>
Organization: MIPS ... where RISC is a way of life
Lines: 49

 >  ---------------------
 >  I compiled with Lattice (version ?.??). If I keep pressing any of the arrow 
 >  keys in vi, a lot of lines with just one character (usually "C") get inserted 
 >  in the in the file.
 >  

I'm sure that many of the "netlanders" out there have seen this particular
"symptom" before , especially those working on *nix systems.  It seems to be
a result of the control codes that the vt100 sends for the arrow keys, 
with interaction due to character buffering:

In vi, an escape [ESC] (alone) signals the program to exit the current mode.
However, the arrow keys for a vt100 terminals send [ESC] O A for the up, 
[ESC] O B for the down, [ESC] O C for the right, and [ESC] O D for the left
arrows.  Since O is the vt100 command for "open line above", the result,
if you are trying to scroll up, is a string of lines with a capital A in
column 1.  (the editor sees the following:  [ESC] (quit doing last command)
O (open line above) A (this is the character it puts on the line) for each
time the up arrow is pressed.  

Two things seem to be involved:
1) the rate at which you press the key (or repeat rate of the terminal)
2) the system load.

When a system is lightly loaded, there is time to take each character
individually and operation is what we consider normal.  As the system load
increases, the characters get stacked in a buffer, and there is no data
to indicate relative timing of the input of the characters, and the editor
seems to take these characters (from the buffer) as individual keystrokes,
not as a composite keycode (what was actually sent when you pressed the
arrow key)

A third event can cause the same result is pressing any of the arrow keys
while you are in any of the insert modes (I just did in rn, and it reminded
me in the usual fashion, a string of single-character lines).
This particular problem is an operator error, and cannot be considered a
fault of any vt100 emulator/terminal/system.

Whether the (long) response above is directly applicable to the program 
running on the amiga or not, I think it is important that those out there
without the "benefit" of having lived on *nix systems for years be aware
that we have lived with this problem all along, so the problem may not be
a fault in the program at all........ It's a FEATURE of vi  :-)   and has
been for as long as I have been working on *nix systems.

-- 
--Rick Frazier--  DISCLAIMER: The above is individual opinion (the result of my
imperfect recall of facts, real or imagined) in no way representing anyone else.
UUCP:  {decvax,ucbvax,ihnp4}!decwrl!mips!rick         DDD: 408-720-1700 x278 
Re: More bugs in DBW's VT100 (OR ANY VT100 and another system) [message #293760 is a reply to message #293686] Thu, 04 December 1986 17:09 Go to previous messageGo to next message
sean is currently offline  sean
Messages: 147
Registered: May 2013
Karma: 0
Senior Member
Article-I.D.: ukma.5261
Posted: Thu Dec  4 17:09:57 1986
Date-Received: Fri, 5-Dec-86 06:11:09 EST
References: <3131@ece-csc.UUCP> <341@pttesac.UUCP> <6478@ut-sally.UUCP> <782@mips.UUCP>
Reply-To: sean@ukma.UUCP (Sean Casey)
Organization: The Leaning Tower of Patterson Office @ The Univ. of KY
Lines: 34

In article <782@mips.UUCP> rick@mips.UUCP (Rick Frazier) writes:
 >>  I compiled with Lattice (version ?.??). If I keep pressing any of the arrow
 >>  keys in vi, a lot of lines with just one character (usually "C") get inserted
 >>  in the in the file.
 > 
 > I'm sure that many of the "netlanders" out there have seen this particular
 > "symptom" before , especially those working on *nix systems.  It seems to be
 > a result of the control codes that the vt100 sends for the arrow keys,
 > with interaction due to character buffering:

The explanation is a good one.  I have experienced the same problem on
both VT100s and VT102s (real ones from DEC).  Considering that  can
be both a mode switch for vi AND an arrow key sequence, vi does quite
well in differentiating the two.

The solution:

Don't use arrow keys in vi!  Use 'h','j','k', and 'l'.  This way you (1) don't
have the problem with holding down the keys, (2) have your fingers much
closer to the home keys, (3) can move much quicker because your fingers don't
have to leave the keys, and (4) will be ready to play games that use 
the hjkl keys :-).  If you need to move rapidly right and left, use 'w',
and 'b' to move forward and back words, and use '0', and '$' to move to the
beginning and end of a line.  To move up and down quickly, use ^F, ^B, ^D,
and ^U.  Almost any vi command can be prefixed with a repeat count.

Happy editing!


Sean
-- 
===========================================================================
Sean Casey      UUCP:  cbosgd!ukma!sean           CSNET:  sean@ms.uky.csnet
		ARPA:  ukma!sean@anl-mcs.arpa    BITNET:  sean@UKMA.BITNET
Re: More bugs in DBW's VT100 (OR ANY VT100 and another system) [message #293800 is a reply to message #293686] Sat, 06 December 1986 03:54 Go to previous messageGo to next message
gary is currently offline  gary
Messages: 49
Registered: May 2013
Karma: 0
Member
Article-I.D.: well.2164
Posted: Sat Dec  6 03:54:43 1986
Date-Received: Sun, 7-Dec-86 03:03:53 EST
References: <3131@ece-csc.UUCP> <341@pttesac.UUCP> <6478@ut-sally.UUCP> <782@m
Organization: Whole Earth Lectronic Link, Sausalito, CA
Lines: 18

ips.UUCP>
Sender: 
Reply-To: gary@well.UUCP (Gary J. Albert)
Followup-To: 
Distribution: 
Organization: Whole Earth Lectronic Link, Sausalito CA
Keywords: 



I used to have the problem in 'vi' if having the escape at the start of the
arrow key's sequence being mistaken to mean exit insert mode.  Then I read
the manual again and found that the 'h', 'j', 'k', and 'l' keys do the same
thing without sending any excapes, thereby preventing the problem.  This
has the added advantage of letting you keep your hands on the home row for
those typists out there.

		Gary ALbert
Re: More bugs in DBW's VT100 (OR ANY VT100 and another system) [message #293867 is a reply to message #293686] Mon, 08 December 1986 15:19 Go to previous messageGo to next message
rar is currently offline  rar
Messages: 2
Registered: March 1985
Karma: 0
Junior Member
Article-I.D.: auc.32091
Posted: Mon Dec  8 15:19:01 1986
Date-Received: Mon, 8-Dec-86 22:35:47 EST
References: <3131@ece-csc.UUCP> <341@pttesac.UUCP> <6478@ut-sally.UUCP> <782@m <2164@well.UUCP>
Reply-To: rar@auc.UUCP (Rodney Ricks)
Followup-To: comp.sys.amiga
Organization: Atlanta University
Lines: 35
Keywords: vt100 bug
Summary: It might not be a bug in DBW's vt100

In article <2164@well.UUCP> gary@well.UUCP (Gary J. Albert) writes:
 > I used to have the problem in 'vi' if having the escape at the start of the
 > arrow key's sequence being mistaken to mean exit insert mode.
[Rest of message deleted]
 > 
 > 		Gary ALbert

Yes, we have also had that problem, but I don't think that it is caused by
faulty vt100 emulation.  The terminals that we have this problem on are true
Digital VT100's.  We had the same problem on the Esprit Executive 10/102's,
which emulate a VT102.

The problem was caused by an inadequate delay when sending the sequence.  The
delay on the VT100 terminfo files for the 3B5's and 3B2's that we use was
originally set to 2 milliseconds.  I wrote a very simple program that changed
the settings in the compiled database to give a longer delay (I believed I
used about 20 milliseconds), and the problem disappeared. 

The best way would probably be to get the source for the VT100 terminfo
(not termcap), then modify that.  If you can get that, please mail a copy of
it to me.  I couldn't figure out how to modify the escape sequences in the
compiled code for scrolling, and we're still having problems with that.

By the way, our VT100's also left behind part of the escape sequence on the
screen, and, if you were in command mode, it took you into insert mode.

Hope this helps.

                                    Rodney


[ Insert an appropriate disclaimer here ]

Rodney Ricks,
  Atlanta University Center Computation Center
Re: More bugs in DBW's VT100 (OR ANY VT100 and another system) [message #293884 is a reply to message #293686] Tue, 09 December 1986 02:06 Go to previous message
mwm is currently offline  mwm
Messages: 111
Registered: May 2013
Karma: 0
Senior Member
Article-I.D.: jade.1859
Posted: Tue Dec  9 02:06:54 1986
Date-Received: Tue, 9-Dec-86 11:16:16 EST
References: <3131@ece-csc.UUCP> <341@pttesac.UUCP> <6478@ut-sally.UUCP> <782@mips.UUCP> <5261@ukma.ms.uky.csnet>
Sender: usenet@jade.BERKELEY.EDU
Reply-To: mwm@eris.BERKELEY.EDU (Mike (Don't have strength to leave) Meyer)
Organization: Missionaria Phonibalonica
Lines: 15

In article <5261@ukma.ms.uky.csnet> sean@ukma.UUCP (Sean Casey) writes:
 > Don't use arrow keys in vi!  Use 'h','j','k', and 'l'.  This way you (1) don't

Better yet, use Emacs! :-) [Really, I *DON'T* want to start a round of
editor wars, but I couldn't resist!]

I've got mouse support code in vt100 (real easy to do), so I can point
with my mouse and just click. Or C-click to delete a char, or
ALT-click to delete a word, or ....

As soon as I de-X-ify the GNU elisp, I'm going to turn it all loose.
Sometime next week, I hope. The GNU stuff should look like the mouse
support in the hot-mouse version of mg1a.

	  

		
		
		
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Blitter
Next Topic: Re: Help creating a Task; CreateProc()
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Dec 01 23:13:02 EST 2021

Total time taken to generate the page: 0.00730 seconds