[GRASS5] grass-5.0.0 on SGI IRIX 6.5

Glynn Clements glynn.clements at virgin.net
Mon Dec 9 20:55:35 EST 2002


Markus Neteler wrote:

> > The only problem is the Escape and Return keys not working when run from
> > an IRIX winterm. I at least should have proposed a change to the README on
> > the ftp server to mention this; sorry. The partial fix for this has now been
> > merged into the release branch, but still it means the arrow keys don't work
> > now. I was waiting until we got this sorted out before compiling another binary
> > package.
> 
> The arrow keys are also broken for me: Linux, HEAD, at least in
> the startup script. Broken in xterm as well as KDE-term. This is a bit
> odd, because it was working and I like the keys. I can report that
> for Suse 7.3 and Redhat 7.1 (with updates).
> Does it have to do with the recent TERMLIB changes?

Possibly. There are two different databases of terminal descriptions:
termcap (typically /etc/termcap) and terminfo (typically
/usr/lib/terminfo/* or /usr/share/terminfo/*).

The functions which obtain this data (e.g. tgetent) may obtain it from
either database. Furthermore, there are often multiple implementations
of these functions (on my RedHat 6.2 system, tgetent is provided by
all three of libtermcap, libtinfo and libncurses).

Basically, you need to ensure that both databases accurately describe
the behaviour of the terminal when in "application keypad" mode. (If
you look at xterm's middle-button menu both normally and when using a
vask-based input form; in the latter situation, both the "Enable
Application Cursor Keys" and "Enable Application Keypad" options
should have tick (check) marks).

Note that the choice of entry is determined by the value of $TERM,
which may not actually be "xterm". Because xterm has so many possible
variations, it is necessary to have lots of different termcap entries;
e.g. I have:

	xterm xterm-16color xterm-24 xterm-65 xterm-8bit xterm-bold
	xterm-boldso xterm-color xterm-ic xterm-mono xterm-new
	xterm-nic xterm-nrc xterm-old xterm-r5 xterm-r6 xterm-redhat
	xterm-rep xterm-sun xterm-vi xterm-vt220 xterm-xfree86
	xterm-xmc xterm1 xtermc xtermm xterms xterms-sun

You need to pick the one which matches xterm's actual behaviour.

You can examine the contents of the termcap file directly; you can
decode the binary terminfo file for a specific terminal with
"infocmp". Typical entries for xterm are:

	key	t'info	t'cap	sequence
	up	kcuu1	ku	\EOA
	down	kcud1	kd	\EOB
	right	kcuf1	kr	\EOC
	left	kcub1	kl	\EOD
	home	khome	kh	\EOH
	end	kend	@7	\EOF

When not in application keypad mode, the arrow keys generate the
cursor motion codes (the ones which an application sends to the
terminal to move the cursor).

Also, if the terminal requires a specific sequence to enable
application mode, that must be specified directly; for xterm, it is:

		smkx	ks	\E[?1h\E=

More information on terminal capabilities can be obtained from the
termcap, terminfo and ncurses manpages. More information on xterm can
be obtained from the xterm manpage.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list