Path: utzoo!mnetor!uunet!mcvax!mhres!hst From: hst@mhres.mh.nl (Klaas Hemstra) Newsgroups: comp.unix.questions Subject: Re: a question about using curses lib Message-ID: <1633@mhres.mh.nl> Date: 23 Feb 88 09:13:29 GMT References: <7078@oberon.USC.EDU> Reply-To: hst@mhres.mh.nl (Klaas Hemstra) Organization: Multihouse N.V., The Netherlands Lines: 19 Keywords: curses terminfo cbreak Summary: Using curses with the terminfo or termcap library You have to use cbreak() or raw(). Only then every character is available to the program immediately after it is typed. Function keys should be defined in the terminfo (or termcap on BSD) library. If your terminfo file is ok (most likely it is not!) then the curses package will decode the escape sequences for you if you use the keypad(stdscr,1) call. In the program you use e.g. : if (getch() = KEY_F(1) to test for a function key (check the curses manual for all keys). Using function keys together with the numeric keypad is not that simple. If you want that you should not specify the rmkx & smkx entries in the terminfo file. Hope this will help, -- Klaas Hemstra (hst@mh.nl) | / / ,~~~ ~~/~~ uucp: ..{uunet!}mcvax!mh.nl!jv | /--/ `-, / ___ |_/ |__| Multihouse N.V., Gouda, the Netherlands | / / ___/ / --- | \ | |