Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!watmath!clyde!cbosgd!ucbvax!hi-multics.arpa!Bakin From: Bakin@HI-MULTICS.ARPA (Jerry Bakin) Newsgroups: mod.computers.vax Subject: Re: Keyboards, ^S, ^Q, and ESC Message-ID: <860311023907.795868@HI-MULTICS.ARPA> Date: Mon, 10-Mar-86 21:39:00 EST Article-I.D.: HI-MULTI.860311023907.795868 Posted: Mon Mar 10 21:39:00 1986 Date-Received: Wed, 12-Mar-86 06:34:08 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 26 Approved: info-vax@sri-kl.arpa As long as we are running away from the discussion at hand, ...vi is quite capable of understanding special-key sequences beginning with ESC, even though hitting ESC in command mode by itself just sounds the bell (or flashes the screen if the terminal is thus capable). I bet you all wonder how vi can make this distinction. Well, it's simple. vi waits for a short period after getting an ESC to see what else it gets right afterward. If the ESC was immed- iately followed by the rest of a special-key sequence, vi obeys it. If the ESC is NOT followed by the remainder of a special-key sequence, or something else which should be valid in command mode, during that wait, vi beeps or flashes to indicate an error. I used to have to dial up this multics system from 2000 miles away. Gee I had a lot of noise (no GTE :). Anyway, I noticed that most (> 95%) of the noise were pairs of -{ or {-. I wrote an extension to the Emacs (in MacLisp) which sensed the time between time of program execution and the next character. If the program timed out, or the next character was neither an nor a {, the character(s) was inserted. Otherwise, the two characters were eaten up -- yum. I bound this extension to the and { keys. This got rid of almost all of the noise and almost never ate (or even visibly slowed insertion of) s or {s. Jerry.