Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!wuarchive!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: Curses question Keywords: key interpretation problems Message-ID: <3904@auspex.auspex.com> Date: 15 Aug 90 20:33:18 GMT References: <551@edpmgt.UUCP> Organization: Auspex Systems, Santa Clara Lines: 26 >(editor's note: This may be a duplicate transmision. Sorry if you got it >twice) I only saw it once, but I did see the matching posting in "comp.sys.sun".... >The first one involves interpretation of input keys. How can one tell the >difference between the forward and backward tabs?? When I run my test >program, I get 0x09 for both. As noted, the problem here is that in a "shelltool" window, there *is* no difference. What's more, different terminals may transmit different things for the "backward tab", assuming they even have one; the BSD "curses" doesn't have any way of recognizing the particular terminal's notion of a "backward tab" sequence and translating it into some common code for "backward tab". The S5 "curses" might be able to do that. >In addition, the code I'm getting in my test program for a return is >different that the code which is returned in the real program (0x0a vs. >0x0d) and yes, these two programs are being run on the same system. But probably *not* with the same modes. 0x0a is NL, and 0x0d is CR. The RETURN key on most terminals - including the "terminal" emulated by a "shelltool" - sends CR; however, in some modes the UNIX tty driver turns CR into NL. Check out such "curses" functions as "nl()" and "nonl()", which affect whether this mapping is in effect....