[comp.sys.amiga.tech] Amiga Keyboard Buffer

dillon@CORY.BERKELEY.EDU (Matt Dillon) (04/06/88)

	You can also clear the line buffer with ^X (doesn't clear any
previously entered lines which are buffered, bumt clears the current line).

						-Matt

rchampe@hubcap.UUCP (Richard Champeaux) (04/12/88)

In article <1815@sugar.UUCP>, peter@sugar.UUCP (Peter da Silva) writes:
> In article <3138@gryphon.CTS.COM> bilbo@pnet02.cts.com (Bill Daggett) writes:
> >I was wondering if there was any hidden, unknown, easy, hard, etc. way of
> >clearing the keyboard buffer.  A programming friend said NO and WHY.
> 
> For your situation, namely going to sleep on the space bar and finding
> you've skipped all your news, I don't think that clearing the Amiga's
> keyboard buffer will help. Terminal programs on the Amiga are generally
> way ahead of your keystrokes, so by the time you've woken up to the problem
> all the typeahead is either in the serial.device or even in the raw queue
> on your UNIX system.
> 
> -- Peter da Silva      `-_-'      ...!hoptoad!academ!uhnix1!sugar!peter

     As I mentioned earlier I usually have my key repeat speed at maximum
because CLI has no problem keeping up with it (particularly if you're running
something like FastFonts.)  When I hold down a key, it prints on the screen
much faster than it ever could at 1200 baud.  Although a good many keystrokes
have most likely aready been sent to the UNIX system, the Amiga is most likely
still pumping them out after you release the key. (a good way to tell would
be to look at the transmit LED on your modem.  My modem has no such LEDs
so I haven't been able to look)  This question is much broader than just
terminal programs, however.  As I mentioned in my previous message, the word
processor that I use is rather slow.  Although I've trained myself not to now,
I would often hold down the backspace key when trying to delete a sentence.
When I released the key, the word processor would continue to backspace over
three pages of text. (This is no joke, it has happened many times)  Also
when playing Hack, I have held down the search key for too long and have
starved to death as a result (this too I've trained my self not to do).  Such
behavior from a keyboard device is not desirable.  An unlimited keyboard buffer
is neither necessary or desirable.  I would like to see a limit setable through
preferences on the next release of AmigaDos.  Hell, even the serial port buffer
has a setable limit.  At least, I recently played with changing the serial port
configuration through preferences and I seem to remember seeing a gadget for
setting a buffer limit.  I believe mine was set to 150 characters.

Rich Champeaux
Clemson University

rchampe@hubcap.UUCP (Richard Champeaux) (04/12/88)

In article <1375@hubcap.UUCP>, rchampe@hubcap.UUCP (Richard Champeaux) writes:
> In article <1815@sugar.UUCP>, peter@sugar.UUCP (Peter da Silva) writes:
> > In article <3138@gryphon.CTS.COM> bilbo@pnet02.cts.com (Bill Daggett) writes:
> > way ahead of your keystrokes, so by the time you've woken up to the problem
> > all the typeahead is either in the serial.device or even in the raw queue
> > on your UNIX system.
> > 
> > -- Peter da Silva      `-_-'      ...!hoptoad!academ!uhnix1!sugar!peter
> 

     After re-reading your message, let correct something before people start 
flaming me and miss the point I was trying to make.  I agree that the terminal
program probably moves things rather quickly from the keyboard buffer to the
serial buffer and even the keyboard buffer limit I suggested wouldn't help
in such cases.  However, there are many situations in which the program is
indeed much slower than the key repeat speed.  In these cases the buffer limit
would be very helpful.

Rich Champeaux

P.S.  excuse me if the technical content of these past two messages is not up
to par with what is considered proper for this newsgroup.  The earlier message
that I referred to in my last message, was a response posted in comp.sys.amiga.
I had forgotten that I was in amiga.tech and posted without thinking.

cmcmanis%pepper@Sun.COM (Chuck McManis) (04/14/88)

Rich, and others, as several people have pointed out there are many buffers
in the Amiga, some of which are not very easy to get to, if you look at
Kodiak's drawing of the input food chain you will note that messages are
buffered from the input.device into the top (or bottom) of the food
chain, make their way through possibly several handlers, each of which
is capable of buffering them, and into the Intuition() zone where they
get *exploded* into a zillion little streams heading out to various 
tasks, one of which being the console.device, which apparently buffers
them as well. One problem with all this, is that there isn't a "back
channel" on the input.device that lets you feed back requests like
"flush everything", or something like the TCP concept of "urgent"
data that gets propogated through the chain at a high priority. Neither
concept is difficult to imagine, although both probably have major 
consequences on the architecture of the input food chain. 

So the answer is, "No, there is no supported way to flush all of the key
board events out of the input food chain." You could always submit it as
a request for enhancement to cbmvax!bugs though. 


--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses, but you knew that didn't you.