[GRASS5] grass-5.0.0 on SGI IRIX 6.5 (fwd)

Glynn Clements glynn.clements at virgin.net
Tue Dec 10 19:01:25 EST 2002

Paul Kelly 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/*).
> /usr/lib/terminfo on IRIX 6.2 as I am using
> > 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).
> For GRASS 4.3:
> Neither option ticked, arrow keys don't work, but Esc and Return do work
> For GRASS 5.0.0:
> "Enable Application Cursor Keys" is ticked, arrow keys do work, but Esc
> and Return don't work
> For latest CVS version:
> Neither option ticked, arrow keys don't work, but Esc and Return do work
> (back to GRASS 4.3 behaviour)

Look for HAVE_KEYPAD in src/include/config.h; if it isn't defined,
look for an appropriate error message in config.log; search for the
string "checking for keypad".

The most significant change between 5.0.0 and CVS is that configure
checks for the existence of keypad(), and the vask library only uses
it if it's detected.

The problems with Esc-Return suggest a bug in the curses library. 
Calling keypad() causes the curses input routines to trap sequences
beginning with the ESC character and to return extended codes upon
receipt of a sequence which corresponds to an extended key. However,
the curses library is supposed to implement a timeout, and any
unrecognised sequences should be passed on as-is.

The curs_inopts(3) manpage says:

       While interpreting an input escape sequence, wgetch sets a
       timer  while  waiting  for the next character.  If notime­
       out(win, TRUE) is called,  then  wgetch  does  not  set  a
       timer.   The  purpose  of  the timeout is to differentiate
       between sequences received from a function key  and  those
       typed by a user.

If your version of curses provides notimeout(), it may be worth adding
notimeout(win, FALSE) to see if that helps.

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list