Subject: WYSE Terminal Help

From: [email-masked] (Michael Dunigan)
Date: Thu, 13 Apr 1995 04:48:58 GMT

Okay here is my problem..... I have a lot of wyse 30, 60 and 160
terminals out there.... I want to use Pine for the e-mail interface.
I know that the FAQ mentions that it won't support these terminals (at
least when it comes to the arrow key functions).  I figured out that I
can used the VT-100 commands (i.e. ^[[A,B,C,D) to manipulate the
cursor.

What I would like to do is run a shell script before executing pine
that would program the arrow keys to send back these strings.  When
pine is finished executing, it would restore the arrow keys to their
default mode.  I can't get this to work.  It works great if I am
manually setting them in SETUP mode, however when I script it I am
having no luck.  

Does anybody have any ideas?  Has anybody accomplished this little
feat?  I would appreciate any help.  Please e-mail me and let me know.

Thanks.

---

From: "Brian P. Hampson" <[email-masked]>
Date: Wed, 12 Apr 1995 23:58:43 -0700 (PDT)

> can used the VT-100 commands (i.e. ^[[A,B,C,D) to manipulate the

Try this on for size...I call it "pine" in /local/bin
Originally from a participant on the list.
Maybe this could be added to the FAQ...it's not THAT long a script.  
Maybe at the archive site at UWASH?

#!/bin/sh
wpinesetup(){

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"
}

wpinereset() {

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

#t/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"
}
if [ "$TERM" != "wyse50" ]
then
	/local/bin/pine1 $*  
	clear
	exit 
fi
	trap wpinereset 0 1 2 3 15
	wpinesetup
	/local/bin/pine1 $*  
	wpinereset
	clear 
	exit

------------------
Note....original pine is in /local/bin/pine1

B.

   ------------------------------------------------------------------------
   |Brian P. Hampson                  Internet: [email-masked]      |
   |System Administrator,	                      			  |
   |Analytical Service Labs           Fidonet : Brian Hampson 1:153/733   |
   |Vancouver, BC                                                         |
   |+604-253-4188                                                         |
   |               Specialists in Environmental Chemistry                 | 
   |                                                                      |
   ------------------------------------------------------------------------

---

From: [email-masked] (Dawn Owens-Nicholson)
Date: 15 Apr 1995 03:20:01 GMT

[email-masked] (Michael Dunigan) writes:
>least when it comes to the arrow key functions).

Then Pine is in need of a fix.  Pine shouldn't "support" any
individual or specific set of terminals, it should look in the
terminfo or termcap definition for whatever terminal it's being run on
and use the key definitions provided therein (and provide optional
builtin keys any terminal can do like emacs or vi-equivalents).