Re: curses problem reading cursor keys
- From: "Simon Morgan" <me@xxxxxxxxxxx>
- Date: 07 Oct 2006 18:57:51 GMT
On Sat, 07 Oct 2006 13:12:33 +0000, 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.subwin() instead of curses.newwin()...
y = 0
while True:
c = list.getch()
and scr.getch() instead of list.getch(), things seem to work. I'd still
really like to know what's going on though.
if c in (curses.KEY_UP, curses.KEY_DOWN, ord('z')):.
list.addstr("Match!")
elif c == ord('q'):
break
curses.wrapper(main)
- Follow-Ups:
- Re: curses problem reading cursor keys
- From: Rainy
- Re: curses problem reading cursor keys
- References:
- curses problem reading cursor keys
- From: Simon Morgan
- curses problem reading cursor keys
- Prev by Date: Re: error handling in user input: is this natural or just laborious
- Next by Date: Re: Python to use a non open source bug tracker?
- Previous by thread: curses problem reading cursor keys
- Next by thread: Re: curses problem reading cursor keys
- Index(es):