Subject: Cursor keys' code on terminal (Re: Extended Keyboard)
To: None <port-mac68k@NetBSD.ORG>
From: SUNAGAWA Keiki <Keiki_Sunagawa@yokogawa.co.jp>
List: port-mac68k
Date: 01/21/1998 10:23:20
Kevin Havener <havenerk@Walden.MO.NET>  wrote:

Kevin> I think you're right about the ^ character, but it
Kevin> came when I pressed the ctrl-v, so i didn't know it
Kevin> was part of the code generated by the arrow keys
Kevin> themselves.

Well, the `^' is part of the code.  In vi, Ctl-v means
<literal next>.  When you press Ctl-v in vi, it indicates
that the next charcter(s) will be quoted, and `^[' charcter
you see is one ESC character rather than `^' + `['.

Actually, on the VT-compatible terminal, the left arrow key
generates an sequence of codes `^[[D' if `applicattion
cursor keys' option is on, and does `^[OD' when the option
is off.

I hope this clears the point some.

--
SUNAGAWA Keiki <Keiki_Sunagawa@yokogawa.co.jp>
Happy Hacking!