Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!mips!pacbell.com!pacbell!att!mcdchg!laidbak!obdient!gagme!greg From: greg@gagme.chi.il.us (Gregory Gulik) Newsgroups: comp.unix.questions Subject: Re: How to get a function key in BSD curses Keywords: BSD curses function-key Message-ID: <520@gagme.chi.il.us> Date: 28 Jun 90 19:14:42 GMT References: <502@seer.UUCP> Organization: GAGME - Public Access UNIX of Niles, Illinois, USA, Earth Lines: 24 In article <502@seer.UUCP> bll@seer.UUCP (Brad Lanam) writes: > > Is there some easy way to get a function key using Berkeley curses? >I don't have access to the documentation, and the O'Reilly "curses" book >doesn't mention anything about the special keys. Use the keypad(win,bf) function. For example, I always do: keypad(stdscr,1); to turn on keypad mode. Then, you can use the getch() function to read the keys in. Look at your system's curses.h file for the key definitions. Mine has a lot of comments explaining what they are. Oh, you may want to call cbreak() to get into one-key-at-a-time mode. -greg -- Gregory A. Gulik Call Gagme, a public greg@gagme.chi.il.us || ...!gagme!greg access UNIX system at || gulik@depaul.edu (708) 318-7133