Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3C8DEC49.F89EB6DE@hack.kampbjorn.com> Date: Tue, 12 Mar 2002 12:53:45 +0100 From: Hack =?iso-8859-1?Q?Kampbj=F8rn?= Reply-To: cygwin AT cygwin DOT com X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en,da,es,ca MIME-Version: 1.0 To: Igor Bujna CC: cygwin AT cygwin DOT com Subject: Re: RXVT & NCURSES & BACKSPACE problem References: <3C8DD70F DOT 90004 AT maxi-tip DOT cz> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g2CBt5i30514 Igor Bujna wrote: > > Hello, > i install latest rxvt & ncurses from cygwin. I have this test program : > ---------------------------------------------------------------------- > #include > #include > > #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); > } > ------------------------------------------------------ Next time inlcude the compile line too it will save me to some manpages for the exact -lncurses to use. > 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 - ^? If I start rxvt as just "C:\cygwin\bin\rxvt.exe -e c:/cygwin/bin/bash.exe --login" I get "Hmm.. tady barvy nejdou !" When I change the TERM=rxvt I get "'KEY_BACKSPACE' - 263 - ^G" too when pressing the backspace key. > Where is problem??? It can be a combination of several factors choose the ones that applies: o Your presumptions about what the results should be o Your rxvt configuration (or lack hereof) o Not reading the documentation (man rxvt) o Not understanding the manpage o Overlooking the section about "backspacekey" o Not searching the mailing lists archives Note my .Xdefaults look like this: $ cat ~/.Xdefaults XTerm.scrollBar: False XTerm.saveLines: 2000 XTerm.font: Lucida Console-16 Rxvt.backspacekey: ^H > Thanks -- Med venlig hilsen / Kind regards Hack Kampbjørn -- 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/