From owner-freebsd-hackers Tue Apr 30 13:46:08 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id NAA05967 for hackers-outgoing; Tue, 30 Apr 1996 13:46:08 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id NAA05958 for ; Tue, 30 Apr 1996 13:46:04 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id NAA07771; Tue, 30 Apr 1996 13:37:59 -0700 From: Terry Lambert Message-Id: <199604302037.NAA07771@phaeton.artisoft.com> Subject: Re: ksh93/bsdi emulation question To: tony@odin.sunquest.com Date: Tue, 30 Apr 1996 13:37:59 -0700 (MST) Cc: hackers@freebsd.org In-Reply-To: <199604301719.KAA08037@ermintrude.sunquest.com> from "Tony Jones" at Apr 30, 96 10:19:57 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > It works really well, except in one odd regard. > > Using the KEYBD trap (for keymappings) isn't working correctly for > multicharacter inputs. > > Assuming I'm trying to map '\E[A' (up arrow key) to 'k' (vi up line), > the problem is that three seperate calls to the KEYBD trap occur, one for > (escape), one for '[' and one for 'A', rather than just one call. > > Since the table is loaded as: keytable[$'\E[A']='k' and referenced > in the trap handler by looking up the keystroke in keytable, this > isn't working too well. > > The ksh manual makes note of the fact that the arguments to escape > must follow within 1/2 sec, but I'd have expected this to be > so since they are generated by a keysrtoke. > > Anyone have any ideas ? Yes. The 1/2 sec is a vtime value. But the vmin is one. The keys are generates as if they were seperate key events. Consider that a pipe can tell the difference between multiple writes to the slave end vs. one write ofr all of the data. This is the same thing. LAT on DECServers have the same problem. Basically, the buffer should be stuffed as a single operation to prevent it acting like three seperate events. If the events are seperable as operations, no matter how quickly they occur, they will be seen seperately. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.