ITEM: AX4708L

3192/having problems with his terminal keypad


ENV: 4.1.?

DESC: Customer is trying to use the keys that are part of his numpad
for numerical entry.  Occasionally when he types these keys, he
sees what seem to be escape codes displayed on his terminal.  If he
enters a certain application, the escape codes are always displayed
instead of the numerical value.

ACT: He is emulating a vt100 presently with the 3192.  I confirmed
that using "tput smkx" will cause him to see the escape codes,
while "tput rmkx" will cause him to see the number characters.

Since he always sees the escape codes during his application, I
suspect there is a code coming from the application when run
on 4.1, that is the same as the smkx terminfo attribute.  I asked
him to start up the application, and then redirect a "tput rmkx"
to the device that is running the application to see if this 
will turn the keypad off and return it to numeric operation.

I compared the terminfo files from a 3.2 system and a 4.1 system.
The only differences I can find are
3.2
it\#4
box1=\\154\\161\\153\\170\\152\\155\\167\\165\\166\\164\\156
box2=\\154\\161\\153\\170\\152\\155\\167\\165\\166\\164\\156

4.1
it\#8
nel  (not present in 3.2 file)
box1=lqkxjmwuvtn
box2=lqkxjmwuvtn

If the above does not narrow it down, we may try changing the
terminfo files to be the same as 3.2.  The above octal codes all
match their ascii equivalents in 4.1.

ACT: customer was able to shell out of his application and run
"tput rmkx" which did make his keypad work.  He also tried changing
the terminfo files to put the sequence for rmkx (esc >) into the
rs2 field (reset terminal), but this did not help.

I explained that this seems to be a problem with the application
turning the keypad on (so it acts as cursor movement).  I suggested
pursuing this with the application.

In the meantime, I suggested he use setmaps to map the sequence
for turning the keypad on to the sequence for turning the keypad
off.  I had him create a file in /usr/lib/nls/termmap
with filename "vt100.pad.out" which contains

\\x1b\\x3d:\\x1b\\x3e

He then ran "setmaps -l vt100.pad.out" as root, and then as a
userid on the same session ran "setmaps -o vt100.pad".  When
he ran his application the number pad did work.  However, he
found that a new session could not run the "setmaps -o" command.
It turns out that until "setmaps -l" is run on the session
the nls module is not on the streams stack and he receives
an error of "can't determine if nls module on the stream".

It is necessary to put the nls module on the stack with:

strchg -p -a;strchg -h nls,ldterm,tioc

before running the setmaps -o command.

ACT: customer tried the above, but is getting errors.  He tried
putting the "setmaps -l" command in the /etc/rc script, but receives
an error about no device.  He also tried putting the strchg commands
in the script that starts their application and is getting an error
about IOCTL calls.  When I tried this again, I was getting such
IOCTL_push errors as well.

It turns out that the IOCTL errors come about since the setmaps -l
did not run successfully.  In order to run this from the rc script, 
it needs a tty device.  I suggest using 

"setmaps -l \ \< /dev/console" 

in the /etc/rc.

Once this change was made, the temp solution is working.

HR
CENTER
FONT size=2Support Line: 3192/having problems with his terminal keypad ITEM: AX4708L
BRDated: April 1996 Category: N/A
BRThis HTML file was generated 99/06/24~13:30:24
BRComments or suggestions?
A href="../../../../feedback.htm"BContact us/B/ABR
/FONT
/CENTER
/BODY
/HTML