Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!orcenl!hbergh From: hbergh@nl.oracle.com (Herbert van den Bergh) Newsgroups: comp.unix.aix Subject: Re: curses attr*() and KEY_* Keywords: curses attr*() KEY_* Message-ID: <1345@nlsun1.oracle.nl> Date: 23 Apr 91 13:05:03 GMT References: <1991Apr23.073202.18324@gibdo.engr.washington.edu> Sender: Herbert van den Bergh Reply-To: hbergh@oracle.nl (Herbert van den Bergh) Organization: Oracle Europe, De Meern, The Netherlands Lines: 36 In article <1991Apr23.073202.18324@gibdo.engr.washington.edu> slh@gibdo.engr.washington.edu () writes: > > Has any one used curses and specifically the attr*() attribute > functions and the KEY_* code from getch()? > Using attron with anything but A_STANDOUT screws up cursor > position and doesn't produce the desired/expected effect. I don't know about this one, but may be related to the next.`O > The KEY_*'s codes never get returned from getch(), > even with keypad(stdscr,TRUE) set. > I either get nothing or at most what look like it might be > the char from the escape code. Do you mean the codes don't match the KEY_ defines or don't you get any return value? > I've tried almost all the KEY_* values and yes the receiving > variable is defined as an int. > I tried these things on the console, in an aixterm and > on a vt100 (emulator), and they suck everywhere. > Do I need to do something tricky? Do they plain not work? I suggest you define NLS before including curses.h, because it seems that the getch() routine returns NLS codes. The return type of getch isn't int, but chtype, which is typedef'ed in curses.h, and different when compiled with or without NLS defined. > Thanks. No problem. -- Herbert van den Bergh, Email: hbergh@oracle.nl, hbergh@oracle.com ORACLE Europe --