ITEM: K1792L

changing arrow key functionality at command line


Question:

I am at the site and need help setting the arrow keys on a VT100.
AIX3.2.5. 

Response:

I explained that the key definitions in terminfo need to be set to the
escape code sent by the key.  He needs to use the dec.ti file in
/usr/share/lib/terminfo directory as a starting file and change the
cuu, cud,cub,cuf attributes to the appropriate codes.  Instead of
changing the original, he should copy the file to a different
directory and set the TERMINFO environment variable to that directory
name.  He will also need to run "tic" on the file after the changes
are made.  This will compile the text file and create subdirectories
under the directory that file is in.

Response:

He got this to work, but was then confused that the arrow keys did not
do anything at the shell input.  Apparently the arrow keys already worked
in vi, but not in his application.  I explained that he should  find
out if the application is even using the terminfo files, since they
seem to be setup correctly to work in vi.  Is this a curses application?

Response:

Because the customer wants to change the command line attributes,
setmaps is a more appropriate way to make the changes.  The man
pages on this command are actually quite good.  To use the command
the 'root' user should go to /usr/lib/nls/termmap and create a
file with the extension .in.

This file has a format of the following:
input chars : output chars

To determine the characters generated by the F1 key vi a temp file
hit ctrl-v then the F1 key.    Then save the file and type od -x file
On my system this generates  1b5b 3030 3171
The backspace generates 08
The file should now look like:
\\x1b\\x5b\\x30\\x30\\x31\\x71:\\x08
Call this file test.in

root types:
\# setmaps -rl test.in
The user then types or puts in his profile
$ setmaps -i test.in
When I hit my F1 key it now functions as a backspace.


Support Line: changing arrow key functionality at command line ITEM: K1792L
Dated: June 1994 Category: N/A
This HTML file was generated 99/06/24~13:30:42
Comments or suggestions? Contact us