Path: utzoo!attcan!uunet!lll-winken!lll-lcc!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!decwrl!labrea!rutgers!mtunx!whuts!homxb!hropus!jgy
From: jgy@hropus.UUCP (John Young)
Newsgroups: comp.unix.wizards
Subject: Re: Ksh cursor keys (Was: who uses which shells)
Message-ID: <167@hropus.UUCP>
Date: 4 Jun 88 21:23:00 GMT
References: <15850@brl-adm.ARPA>
Organization: Bell Labs, Holmdel, NJ
Lines: 30

For those of you discussing the use of arrow keys in ksh the
answer is you can use them.  Sometimes.

One of my terminals is an HP2626x, these arrow keys send escape-D, C,
A, and B for left, right, up and down respectivley.  Therefore in
ksh, if you use the emacs editing style (probably in vi to) you can
say the following:
	$ alias _D=^b
	$ alias _C=^f
	$ alias _A=^p
	$ alias _D=^n

Where ^ means the control key (with a \ in front).
People whose terminals don't send ESCAPE-X are in trouble, as are
those whose "X" characters happen to coincide with already used
emacs editing mode esacape sequences.

ksh documentaion calls these _ aliases soft-keys and they can be quite
usefull:  Try this one:

	$ alias _r='^] ^[ ^] ^X^X^W^Y^E^Y'

p.s.
If none of these work it's because you typed them incorrectly(or I did!)
or you are using a ksh version earler than 6/3/86.

John Young
AT&T-BL
Red Hill Rd.,
Middletown, NJ 07748
201-615-4412