Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!ubvax!ardent!landay
From: landay@ardent.com (James A. Landay)
Newsgroups: comp.unix.questions
Subject: Another Curses Question
Message-ID: <7801@ardent.UUCP>
Date: 11 Aug 89 16:27:52 GMT
Sender: news@ardent.UUCP
Reply-To: landay@ardent.com (James A. Landay)
Organization: Ardent Computer Corp., Sunnyvale, CA
Lines: 35

I am trying to use Curses to implement a simple user interface
and am having a couple of problems.

1. When I type the back-space or delete key, I get a ^H echoed
to the screen rather than a backspace operation.  My terminal
is set up correctly, because when I type backspace in vi or
the shell it works properly.  Any ideas?


2. I would like to somehow trap the TAB key so that I get '\t'
back to my program, yet without have a TAB echoed to the screen
(or only echoed as a space if anything).  
I thought I could try:

	getyx (win, oldy, oldx);
	noecho ();
	ch = getch ();
	if (ch == '\t') {
		/* do stuff */
	}
	else {
		echo ();
		move (oldy, oldx);
		addch (ch);
	}

But this didn't seem to work.

Thanks,

James

landay@ardent.com
	 or
landay@cory.berkeley.edu