Re: curses KEY_* constants

2010-08-24 Thread Bill Green
On 2010-08-24, Bill Green wrote: > ... but these > constants (for the arrow keys at least) seem not to match the actual > keycodes. After looking at the documentation again I've realized I needed to enable keypad mode on the window for curses to catch the escape codes, and now everything's workin

Re: curses KEY_* constants

2010-08-24 Thread Bill Green
I perhaps should have mentioned I linked the Python curses module against ncurses rather than BSD curses. Perhaps NetBSD's curses doesn't support this feature, and that's why it's not included there. In any case, I removed the relevant #defines in _cursesmodule.c and got a Python that includes a

curses KEY_* constants

2010-08-24 Thread Bill Green
Hello, According to the documentation for the curses module, there are a number of constants defined for various special keys (such as KEY_DOWN, KEY_UP, KEY_BACKSPACE, etc.). However, these do not exist on my system (NetBSD 5). Looking at _cursesmodule.c, the code that sets up the KEY_ variables