Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!maverick.ksu.ksu.edu!orion.cis.ksu.edu!jxf From: jxf@procyon.cis.ksu.edu (Jerry Frain) Newsgroups: comp.unix.questions Subject: Re: Curses and the arrow keys Message-ID: <1990Aug27.125521.12905@maverick.ksu.ksu.edu> Date: 27 Aug 90 12:55:21 GMT References: <1990Aug24.175453.4310@irscscm.UUCP> <773@studsys.mu.edu> Sender: news@maverick.ksu.ksu.edu (The News Guru) Reply-To: jxf@procyon.cis.ksu.edu (Jerry Frain) Organization: Kansas State University, Dept. of Computing and Information Sciences Lines: 31 In article <773@studsys.mu.edu>, jetzer@studsys.mu.edu (Mike Jetzer) writes: > In article <1990Aug24.175453.4310@irscscm.UUCP> mlake@irscscm.UUCP (Marshall Lake) writes: >>I am writing a program which will be taking advantage of curses. > [ . . . ] >>I am doing a getch () and if I get an ESCAPE I do >>another getch (). If I addch () for each character I get (the ESCAPE >>and the next character) then the cursor moves around properly on the >>screen but the x/y coordinates in the window structure do not follow >>suit. Curses is recognizing the arrow keys simply as regular >>characters. Am I naive in thinking that curses is smart enough to >>handle the arrow keys specially? Should I be moving the cursor >>manually via the move function? > > Your naivete could be corrected by reading the manpage on curses. Unless Marshall is using BSD curses. I, also, am writing an application which requires the use of arrow keys, but I am using BSD curses. There is nothing in the man page about using the arrow keys, because there is no keypad() function, and hence no standardized way of using the arrow keys with BSD curses. I be able to answer Marshall's questions (relative to Berkeley curses) in the next week or so, as soon as I do a little more research into this dilemma. If anyone is interested, I will post what I find. -- Jerry Frain -- Perpetual Student Kansas State University Department of Computing & Info Sciences Internet : jxf@ksuvax1.cis.ksu.edu Manhattan, Kansas UUCP : ...!{rutgers,textbell}!ksuvax1!jxf