Re: curses problem reading cursor keys

2006-10-11 Thread Thomas Dickey
Simon Morgan <[EMAIL PROTECTED]> wrote: > I'd also appreciate any pointers to good tutorials on curses, I've read > the one by awk and esr but found it rather brief and lacking in detail. esr only contributed his name - awk wrote the rest. (When I asked why, he only said it sounded like a good id

Re: curses problem reading cursor keys

2006-10-07 Thread Rainy
Simon Morgan wrote: > On Sat, 07 Oct 2006 13:12:33 +, Simon Morgan wrote: > > > import curses > > > > def main(scr): > > status = curses.newwin(1, curses.COLS, 0, 0) status.bkgd('0') > > status.refresh() > > > > list = curses.newwin(curses.LINES, curses.COLS, 1, 0) list.bkgd('X') >

Re: curses problem reading cursor keys

2006-10-07 Thread Simon Morgan
On Sat, 07 Oct 2006 13:12:33 +, Simon Morgan wrote: > import curses > > def main(scr): > status = curses.newwin(1, curses.COLS, 0, 0) status.bkgd('0') > status.refresh() > > list = curses.newwin(curses.LINES, curses.COLS, 1, 0) list.bkgd('X') > list.refresh() If I use scr.su

curses problem reading cursor keys

2006-10-07 Thread Simon Morgan
Hi, I'm having trouble with the following code. The problem is that the value read by getch() when I hit the up or down keys doesn't match curses.KEY_UP or curses.KEY_DOWN respectively. Other keys, such as 'z' in my example code, work fine. I only seem to have this problem when dealing with newly