Article-I.D.: bacall.2213
Posted: Mon Dec 8 22:19:06 1986
Date-Received: Wed, 10-Dec-86 05:31:48 EST
References: <3711@vax4.tc.fluke.COM>
Organization: CS&CE Depts, U.S.C., Los Angeles, CA
Lines: 44
> I was always perplexed as to why the VT100 program's arrow keys (at least
> to me), did not work properly when using 'vi' on our vax. I noted that in
> the module 'window.c' around line 300-340 that a variable 'keyapp' was
> used to select an appropriate action. This was true with the arrow keys
> also. I was not quite sure what function 'keyapp' played with the arrow
> keys but took the liberty to 'rem' out the following code.
>
>
> case 0x4f: sendchar(27);
> /* if (keyapp) sendchar('O');
> else */ send(']');
> sendchar(code - 11);
> break;
>
> This did the trick and the arrow keys now work well with a 'vt100' termcap
> on the vax and also with 'vi'.
>
> Can someone enlighten me if this is really a fix or did I buger something
> else up.
>
>
> --
> Dave Whitlock
> {decvax!microsof,uw-beaver,ssc-vax,allegra,lbl-csam}!fluke!star
> --John Fluke Mfg. Co., 33031 Schoolcraft Road, Livonia, MI 48150
The above code seems to be buggy in ANY case. The variable "keyapp" is
connected with the fact that one is using the "application" mode instead
of the numeric mode. Unfortunately this is related to the keypad keys
and NOT the cursor keys. The cursor keys have their own SET or RESET
state totally unrelated to the state of the keypad.
I have seen the problem with vi and the arrow keys on a "REAL" vt100.
The problem is more acute with vi under Berkeley 4.2, while does not exist
on vi under ATT System V. I believe it to be a bug in 4.2 vi. The
EDT editor under VMS (a DEC product) performs properly with the documented
escape sequences.
If the above code uses "keyapp" to mean cursor key mode, it would work
properly, but in that case it is really using the wrong variable name.
-- Marco Papa
Felsina Software
(author of the VT100 emulator included in A-Talk 1.1)