From owner-freebsd-hackers Fri May 7 6: 2:26 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.ppp.net (mail.ppp.net [194.64.12.35]) by hub.freebsd.org (Postfix) with ESMTP id DDFBD14DCB for ; Fri, 7 May 1999 06:02:20 -0700 (PDT) (envelope-from ernie!bert.kts.org!hm@ppp.net) Received: from casparc.ppp.net (casparc2.ppp.net [194.64.12.42]) by mail.ppp.net (8.8.8/8.8.8) with SMTP id PAA32723; Fri, 7 May 1999 15:02:18 +0200 Received: from ernie by casparc.ppp.net with uucp (Smail3.1.28.1 #1) id m10fkGP-002ZjZC; Fri, 7 May 99 15:02 MET DST Received: from bert.kts.org([194.55.156.2]) (2037 bytes) by ernie.kts.org via sendmail with P:smtp/R:smart_host/T:uux (sender: ) id for ; Fri, 7 May 1999 14:30:15 +0200 (CEST) (Smail-3.2.0.103 1998-Oct-9 #5 built 1999-Apr-19) Received: from localhost (1583 bytes) by bert.kts.org via sendmail with P:stdio/R:smart_host/T:smtp (sender: ) (ident using unix) id for ; Fri, 7 May 1999 14:31:01 +0200 (CEST) (Smail-3.2.0.103 1998-Oct-9 #4 built 1998-Dec-26) Message-Id: From: hm@kts.org (Hellmuth Michaelis) Subject: Re: Termcap and cursor keys In-Reply-To: from "andrew@ugh.net.au" at "May 7, 1999 4:56:45 pm" To: andrew@ugh.net.au Date: Fri, 7 May 1999 14:31:01 +0200 (CEST) Cc: freebsd-hackers@FreeBSD.ORG, snadge@gemcorp.com.au Organization: Kitchen Table Systems Reply-To: hm@kts.org X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG andrew@ugh.net.au wrote: > Under FreeBSD 3.0-19990206-STABLE the the termcap library says a vt220 > terminal sends ESC O A, as does an xterm. SunOS 5.6 says vt220 sends ESC [ > A and xterm sends ESC O A. Linux (Debian) agrees with SunOS. The cursor keys generate 2 different sequences depending on wether they are in "normal" mode or "application mode": normal sends "CSI A" (where CSI is 0x9b in 8-bit mode or "ESC [" in 7-bit mode) and application sends "SS3 A" (where SS3 is 0x8f in 8-bit mode or "ESC O" in 7-bit mode). Mode switching is done by the sequence "CSI ? 1 h" (application) and "CSI ? 1 l" (normal). Now what a given terminal sends depend on what it was switched to (or not) in the init string(s) (look at "is=xxxx" in the termcap db entry). Hope this helps, hellmuth -- Hellmuth Michaelis hm@kts.org Hamburg, Europe We all live in a yellow subroutine, yellow subroutine, yellow subroutine ... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message