Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 May 1999 14:31:01 +0200 (CEST)
From:      hm@kts.org (Hellmuth Michaelis)
To:        andrew@ugh.net.au
Cc:        freebsd-hackers@FreeBSD.ORG, snadge@gemcorp.com.au
Subject:   Re: Termcap and cursor keys
Message-ID:  <m10fjmP-00002nC@bert.kts.org>
In-Reply-To: <Pine.BSF.4.02A.9905071552410.1164-100000@magnesium.ideal.net.au> from "andrew@ugh.net.au" at "May 7, 1999  4:56:45 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m10fjmP-00002nC>