This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RXVT & NCURSES & BACKSPACE problem


Hello,
i install latest rxvt & ncurses from cygwin. I have this test program :
----------------------------------------------------------------------
#include <curses.h>        
#include <ctype.h>

#define COLOR2    1     
#define COLOR1    2     
   
int main () {
    int    c;
    char *s;

    initscr ();       
    cbreak ();
    noecho ();
    start_color (); 
    keypad (stdscr, TRUE);
    curs_set(0);          
   
    if (!has_colors ()) {
        endwin ();
        fputs ("Hmm.. tady barvy nejdou !", stderr);
        exit (1);
    }
   
   
    init_pair (COLOR1, COLOR_RED,     COLOR_BLUE);   
    init_pair (COLOR2, COLOR_YELLOW, COLOR_BLACK);
   
    attron (COLOR_PAIR( COLOR1 ));           
    mvaddstr (2, 5, "Red on blue");
   
    attron (COLOR_PAIR( COLOR2 ));
    mvaddstr (3, 5, "Yellow on black");
   
    attron (A_BOLD);               
    mvaddstr (4, 5, "Yellow on black & BOLD");
   
    attroff (COLOR_PAIR( COLOR2 ));  
    mvaddstr (LINES-1, COLS-15, "F10 - konec");
    mvaddstr (10, 5, "Name of keypad:");

    while ( (c=getch()) != KEY_F(10)) {
        s = (char *) keyname(c);       
        if (s)
            mvprintw (10, 20, "'%s' - %i - %c ", s, c, c);
        else     
            mvprintw (10, 20, "'%c'", (isprint(c) ? c : '.'));
    }
   
    erase ();             
    refresh ();               
    endwin ();           
    exit (0);       
}
------------------------------------------------------
 After start bash and runing this program and pressing key BACKSPACE i 
get this  'KEY_BACKSPACE' - 263 - ^G .
When i start rxvt like this:
start c:/cygwin/bin/rxvt -fn "Lucida ConsoleP-18" -tn rxvt-cygwin-native 
-geometry 100x39 -fg lightblue -bg midnightblue -vb -sr +sb -cr red -e 
/bin/bash
And run this program and pressing key BACKSPACE i get this '^?' - 127 - ^?
Where is problem???
Thanks



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]