Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OS/2 telnet vt220 arrow key codes

102 views
Skip to first unread message

Ken

unread,
Dec 15, 1998, 3:00:00 AM12/15/98
to
I'm using a Unix app that expects vt220 arrow keys to work. I've found
that the vt220 has two arrow key modes: Cursor and Application. In
Cursor mode, an up arrow sends Escape followed by "[A". In Application
mode, it's supposed to send Escape, "OA". (The other arrow keys are
similar, but replace the "A" with "B", "C", and "D".) It looks like
OS/2's telnet.exe comes up in Application mode. How do I switch it to
Cursor mode? (Ideally the Unix application should send the sequence that
puts it in Cursor mode, but I don't have access to fix the app.)

--
Ken
mailto:sh...@well.com
http://www.well.com/user/shiva/
http://sewnsurf.home.ml.org/
http://www.e-scrub.com/cgi-bin/wpoison/wpoison.cgi (Death to Spam!)

Jeffrey Altman

unread,
Dec 16, 1998, 3:00:00 AM12/16/98
to
In article <3676FE...@well.com>, Ken <sh...@well.com> wrote:
: I'm using a Unix app that expects vt220 arrow keys to work. I've found

: that the vt220 has two arrow key modes: Cursor and Application. In
: Cursor mode, an up arrow sends Escape followed by "[A". In Application
: mode, it's supposed to send Escape, "OA". (The other arrow keys are
: similar, but replace the "A" with "B", "C", and "D".) It looks like
: OS/2's telnet.exe comes up in Application mode. How do I switch it to
: Cursor mode? (Ideally the Unix application should send the sequence that
: puts it in Cursor mode, but I don't have access to fix the app.)
:

OS/2 telnet is wrong. It should come up in cursor mode and only switch to
application mode if the application requests it.

I do not know of any way to modify OS/2 Telnet to switch modes.

Kermit 95 for OS/2 does handle these keys properly. See
http://www.kermit-project.org/os2.html for further information.


Jeffrey Altman * Sr.Software Designer * Kermit-95 for Win32 and OS/2
The Kermit Project * Columbia University
612 West 115th St #716 * New York, NY * 10025
http://www.kermit-project.org/k95.html * kermit-...@kermit-project.org

V. Phaniraj

unread,
Dec 16, 1998, 3:00:00 AM12/16/98
to
On Tue, 15 Dec 1998 16:26:23 -0800, Ken <sh...@well.com> wrote:
>I'm using a Unix app that expects vt220 arrow keys to work. I've found
>that the vt220 has two arrow key modes: Cursor and Application. In
>Cursor mode, an up arrow sends Escape followed by "[A". In Application
>mode, it's supposed to send Escape, "OA". (The other arrow keys are
>similar, but replace the "A" with "B", "C", and "D".) It looks like
>OS/2's telnet.exe comes up in Application mode. How do I switch it to
>Cursor mode? (Ideally the Unix application should send the sequence that
>puts it in Cursor mode, but I don't have access to fix the app.)
>
>--
>Ken


On my Unix systems I have an alias setup

periodic echo -n ^[=

which is automagically executed periodically to set the VT220 mode .
I believe that the escape sequence is <esc>[=

Raj

cel...@celigne.co.uk

unread,
Dec 16, 1998, 3:00:00 AM12/16/98
to
In article <slrn77e3rj....@venus.ee.ndsu.NoDak.edu>,

That sequence (which is "ESC =", not "ESC [ ="), sets the mode of the
numeric keypad, not the cursor keys. Setting the cursor key mode is
a private DEC sequence, DECCKM.

You send "ESC [ ? 1 l" to get the up key reporting "ESC [ A" (which
is called Cursor Mode. You send "ESC [ ? 1 h" (Application Mode) to
get the Up key to report "ESC O A".

None of the sequences above really have spaces (or quotes!) in.

These are the same sequences as for the VT100, a summary of which can
be found at http://www.celigne.co.uk/terminal/docs/tp83/appendixb/

Regards,
Paul

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Maurice Janssen

unread,
Dec 16, 1998, 3:00:00 AM12/16/98
to
On Tue, 15 Dec 1998 16:26:23 -0800, Ken wrote:

>I'm using a Unix app that expects vt220 arrow keys to work. I've found
>that the vt220 has two arrow key modes: Cursor and Application. In
>Cursor mode, an up arrow sends Escape followed by "[A". In Application
>mode, it's supposed to send Escape, "OA". (The other arrow keys are
>similar, but replace the "A" with "B", "C", and "D".) It looks like
>OS/2's telnet.exe comes up in Application mode. How do I switch it to
>Cursor mode? (Ideally the Unix application should send the sequence that
>puts it in Cursor mode, but I don't have access to fix the app.)

When I telnet from my OS/2 box to my Linux box and run showkey -a, it
looks like OS/2's telnet is sending ^[[A when I press the up-arrow.
Looks like cursor-mode to me.

HTH, Maurice
--
Maurice Janssen | The best way to accelerate
| a computer running Windows
mau...@warp.xs4all.nl | is at 9.8 m/s^2

Simon Bowring

unread,
Dec 17, 1998, 3:00:00 AM12/17/98
to
On 16 Dec 1998 01:08:50 GMT, Jeffrey Altman wrote:

>OS/2 telnet is wrong. It should come up in cursor mode and only switch to
>application mode if the application requests it.

I partially agree! A *real* vt220 or vt100 can be configured to "come up"
in either mode!

Regards

Simon Bowring

no...@noop.net

unread,
Dec 22, 1998, 3:00:00 AM12/22/98
to

On the subject of the telnet app in OS/2, has anyone seen any strange
behavior in the last several revs of the TELNETPM exe? Specifically,
the cursor doesn't advance to the next line when it displays text.
The letters all arrive on the last line of the screen. When the
screen is cleared, things are normal until it gets to line 25 again,
and then everything runs together again. I was thinking that it might
be some sort of change in the way it interacts with terminfo or
termcap but have not been able to trace it down.

This is with vt220 to unix servers running hp-ux 9, 10 and 11. I have
been using the old telnetpm .exe dated 1996 instead, but it gets
overwritten with each update and I have to remember to keep a copy
safe to replace it with.


Any help appreciated,
rick

Will Rose

unread,
Dec 24, 1998, 3:00:00 AM12/24/98
to
no...@noop.net wrote:

: On the subject of the telnet app in OS/2, has anyone seen any strange


I moved to Kermit for this sort of thing long ago. They are one of
the more solid terminal emulations. I found OS/2's telnet to be
flakey in a number of ways, and was pretty glad to see Kermit doing
TCP/IP.


Will
c...@crash.cts.com


0 new messages