Subject: Pine & Cursor Keys with Wyse50 and Wyse60 terminals

From: "Don Allaire" <[email-masked]>
Date: Tue, 20 Jan 1998 17:52:07 -0600

Hello:

I would like to get some info in the archives that helped me out.  Below is
a response I recieved from Richard Gering answering the question of why
don't the cursor keys work properly in Pine 3.96 with Wyse 50 and Wyse 60
terminals without doing a recompile of Pine.  Thanks again Richard!

Question:

I am running FreeBSD 2.2.2, and using the standard Termcap database that
shipped with the OS release.  We are running Pine v. 3.96.

When our wyse50 & wyse60 terminals log in, the TERM environment variable
is set to the correct terminal type.  When pine is run, the key
 mappings for the arrow keys don't work properly.  I have checked out the
 termcap database, and it seems to have the correct key mappings for ku,
 kd, kl, kr.  For instance, when I press the up arrow in Pine's main menu
 screen, pine responds with "^K is not defined for this screen".

Answer:

By default, Pine will not accept any key sequence that doesn't start with
an ESCape. This was done for historic reasons. There is a way to activate
full termcap/terminfo support though, which should give you what you want.

To accomplish this, append "-DTERMCAP_WINS" to the lines defining the
"STDCFLAGS=" in both pico/makefile.<os> and pine/makefile.<os>. Next, do a
complete rebuild: you're in business!

You should be aware that certain Ctrl-key based commands in Pine and Pico
will not work on a Wyse 50, since these commands are identical to the
values returned by some of the edit keys (which now have precedence).
Most noticeably Ctrl-^ (Mark) and Ctrl-K (Cut) will now act as Home and
Cursor-Up respectively.

To use Mark and Cut, press ESC ESC ^ and ESC ESC K instead. In Pine,
ESC ESC <key> is always available as an alternate to pressing Ctrl-<key>.

This "problem" can be avoided on the Wyse 60 terminals by selecting a TERM
entry that programs the cursor keys with ANSI sequences. Usually, these
entries have the extension "ak" tagged to then (for ANSI Key, I guess).