Subject: Wyse terminals and pine

From: Knute Snortum <[email-masked]>
Date: Wed, 8 Feb 1995 13:17:25 -0800 (PST)

Here are a few scripts to help solve the "arrow keys in pine on a Wyse 
terminal" problem.  Put them in your "bin" directory and then call 
"wpine" instead of "pine".  Your arrow keys and a few function keys 
(Prev/Next Page, Line/Char delete) will now work.

Beware: if you do multiple session stuff you may wind up with the wrong 
kind of keys in the wrong screen.

Call me if you have questions/suggestions.

--- Knute Snortum			Internet: [email-masked]
    MAS Inc.				Compuserve: 72144,1646
#
# wpine - make arrow (and other) keys work in pine on Wyse-type terminals
#

trap wyse.pine.reset 0 1 2 3 15
wyse.pine.setup
/usr/bin/pine
#
# wyse.pine.setup - Setup some keys on a Wyse terminal to work in pine
#

echo "\nSetting up Wyse arrow and function keys..."

# Next/Prev Page

echo "\033Z1r \0177\c"
echo "\033Z1w-\0177\c"

# Char/Line delete

echo "\033Z15\04\0177\c"
echo "\033Z16\013\0177\c"

# Arrow keys

echo "\033Z1+\033[A\0177\c"
echo "\033Z1,\033[B\0177\c"
echo "\033Z1.\033[C\0177\c"
echo "\033Z1-\033[D\0177\c"

echo "Done\n"
#
# wyse.pine.reset - Reset standard Wyse keys
#

echo "\nResetting standard Wyse arrow/function keys..."

# Next/Prev Page

echo "\033Z1r\0177\c"
echo "\033Z1w\0177\c"

# Char/Line delete

echo "\033Z15\0177\c"
echo "\033Z16\0177\c"

# Arrow keys

echo "\033Z1+\0177\c"
echo "\033Z1.\0177\c"
echo "\033Z1,\0177\c"
echo "\033Z1-\0177\c"

echo "Done.\n"