Thanks to all who responded so quickly and provided great info on this
topic.
Here are my responses:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: Simon Stockman <simon_stockman_at_hotmail.com>
Hi,
There are several programs you can run which display the escape
sequences as
you press the function keys.
Look for a program called 'xev'.
Failing that 'dxkeycaps' may help.
Another alternative is to run the 'xmodmap' command.
Try: xmodmap -pm -pk -pp
This should generate the escape codes for your current keyboard/VT.
Look in the 'man' pages for more help with 'xmodmap'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Senn, Bruce" <sennb_at_union.edu>
FWIW, you might try od. Default input is from stdin, so what you type
in
should show up on stdout.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: Jim Belonis <belonis_at_dirac.phys.washington.edu>
http://www.fastlane.net/~generic9/vt220.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There are many web pages that discuss VT220 function keys
as well has how to load arbitrary escape sequences into them.
For example,
http://www.faximum.com/support.d/095
explains how to use vi to capture the escape codes.
I hope this helps.
Selden
======
Selden E. Ball, Jr.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: Joerg Bruehe <joerg_at_sql.de>
Use the "od" command on a "here document" in the shell:
od -c <<+
Now type the
keys and
characters
you want to see
+
The "+" after the input redirection is the character that will
terminate the "here document" if it comes at the start of a line,
you can choose any other char or word -
a single "+" is nice for interactive use, in shell scripts the
word "EOF" is quite common.
> Am wondering
> if there is a way to do this in vi possibly????
You might experiment with a "Ctrl-V" and then pressing the function
key - I never tried.
>
> I need this to set up telnet access to our business app which is heavily
> dependent
> on function keys.
Ensure it uses "libcurses" and set the "TERM" variable properly,
this is the best way to solve these problems.
For our DBMS front ends, we wrote our own program that reads
escape sequences and generates "terminfo" source files from them.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: Bob Vickers <bobv_at_cs.rhul.ac.uk>
You could try
stty raw
cat
Don't expect to be able to get back a normal session though because it
won't recognoise cntrl-D! You may have to kill xterm externally.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Original post:
Hello....I need to know the default keymappings for the function
keys on a vt220 terminal. Is there
some way to display these values by logging on to
the unix host with a terminal emulator in vt220 mode and
just pressing each of the keys and have the host echo
back the escape sequence it received???? Am wondering
if there is a way to do this in vi possibly????
I need this to set up telnet access to our business app which is heavily
dependent
on function keys.
TIA
clos_at_trentu.ca
Received on Tue May 15 2001 - 14:07:56 NZST