curses attr*() and KEY_*

Herbert van den Bergh hbergh at nl.oracle.com
Tue Apr 23 23:05:03 AEST 1991


In article <1991Apr23.073202.18324 at gibdo.engr.washington.edu> slh at 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 at oracle.nl, hbergh at oracle.com
ORACLE Europe
--



More information about the Comp.unix.aix mailing list