Curses erase char question

TIM at ENH.Prime.COM TIM at ENH.Prime.COM
Tue Oct 30 10:21:21 AEST 1990


Seems like curses knows that your backspace is a ^?, but to print that at your
terminal does nothing but print "^?" instead of backspacing like you want.
Looking up erasechar() in a curses reference, it says:

erasechar(); /* return user's erase character */

Which is exactly what it is doing ... your OS will use a ^? as a backspace, (no
doubt catches the keypress and translates it into a backspace it can make use
of), but this does not apply to an application program ... try saving the
current backspace character at the beginning of your program, set it to the
default (probably ^h) for the length of the program, then restoring it upon
exiting. Hope this helps ...


/* Tim Cantin                                         1% of Americans retire
    Prime Computer, Inc., MS 10-13                    independently wealthy;
    500 Old Conn Path                             the other 99% are working,
    Framingham, Mass.  01701  (USA)          financially dependent, or dead.
   Phone: (508) 620-2800, ext. 3101                        What will you be?
   InterNet: TIM at ENH.Prime.COM
   Uucp:     {primerd, cvbnet, uunet}!ENH.Prime.COM!TIM
       -or-  {primerd, cvbnet, uunet}!hobbiton!tim                           */

#include "stddisclaimer.h"



More information about the Comp.lang.c mailing list