Hi,

i hv done following initializaion
    WINDOW * mainwin;
    if ( (mainwin = initscr ()) == NULL ) {
        fprintf(stderr, "Error initialising ncurses.\n");
        exit(-1);
    }
    cbreak ();
    noecho ();
    keypad(mainwin, TRUE);

This is my main loop.
    int ch;
    while ((ch = wgetch (this->win)) != KEY_ENTER) {
        switch (ch)
        {
            case KEY_BACKSPACE:
                wprintw (this->win, " inside baskspace");
                break;
            default:
                wprintw (this->win, "(%d)%c", ch, ch);
                break;
        }
        refresh ();
    }

 i am using curses library to handle terminals.
The problem is, in the cureses.h file 
#define KEY_BACKSPACE   0407        /* backspace key */
this is what is defined. but when i do a getch i receive value 8.

What is the problem? Is there any other way to do it?
The loop even do not terminate after pressing enter key.

-- 
________________________________________________________________
"Only two things are infinite, the
universe and human stupidity, and I'm not sure about the former." -- Einstein.

- Vikram Karandikar

--
______________________________________________________________________
Pune GNU/Linux Users Group Mailing List:      (plug-mail@plug.org.in)
List Information:  http://plug.org.in/mailing-list/listinfo/plug-mail
Send 'help' to [EMAIL PROTECTED] for mailing instructions.

Reply via email to