Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucrmath!alchemy!kaos!wardlaw From: wardlaw@kaos.UUCP (Johnie Wardlaw) Newsgroups: comp.unix.xenix.sco Subject: '286 curses keypad() mode Summary: '286 v2.3.2 curses keypad() mode broken Keywords: '286 v2.3.2 curses keypad() Message-ID: <160@kaos.UUCP> Date: 22 May 91 19:14:14 GMT Reply-To: wardlaw@kaos.UUCP (Johnie Wardlaw) Organization: Alchemy Software Designs Lines: 56 I am having a problem using the function key capabilities in curses on SCO Xenix V/286 v2.3.2. I am trying to add arrow key support to an application using the keypad() function in the curses library and it appears to be ignoring the fact that I am enabling this. I have tried using both the -DM_TERMCAMP and -DM_TERMINFO as well as linking with the termcap and terminfo libraries. Nothing seems to work. Has anyone else had this problem? Is there a fix available? Following is the test program I have written to demonstrate the problem. Instead of seeing a 16-bit key code for the arrow keys, I am seeing the escape sequence the key is sending. I have tried this on the console and a Wyse 50 terminal connected to my tty2a serial port. -- Start of test program ktest.c -- /* ** To compile: cc -DM_TERMCAP -DSYSVR2 ktest.c -lcurses -ltermcap -o ktest */ #include main() { int ch; initscr(); crmode(); noecho(); keypad(stdscr,TRUE); do { ch = getch(); if (ch == 27) printf(""); else if (ch <= 31 || ch >= 127) printf("0x%04x",ch); else printf("%c",ch); } while (ch != 4); endwin(); } -- End of test program ktest.c -- This test program works fine on the SCO Xenix V/386 v2.3.2GT machine I have access to. I've been wanting to add arrow key support to my applications for quite some time now and I'm stuck with this bug. Thanks in advance! -- Johnie Wardlaw /----------------------------------------------------------------------------\ | Johnie Wardlaw, Senior Partner/Programmer, Alchemy Software Designs | |----------------------------------------------------------------------------| | Internet | wardlaw@kaos.UUCP | "Wow. It's like you're reading | | UUCP | ...ucsd!ucrmath!kaos!wardlaw | my mind, man!" -- Bart Simpson | \----------------------------------------------------------------------------/