home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / programm / 4381 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  1.7 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!wupost!cs.utexas.edu!rutgers!homecare!adsi!markp
  2. From: markp@adsi.homecare.com (Mark Parr)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Re: real-time character input
  5. Message-ID: <1992Aug19.134620.14452@adsi.homecare.com>
  6. Date: 19 Aug 92 13:46:20 GMT
  7. References: <1992Aug13.112134.1@hamp.hampshire.edu>
  8. Organization: Application Data Systems, Inc.
  9. Lines: 24
  10.  
  11. In article <1992Aug13.112134.1@hamp.hampshire.edu> jmolinari@hamp.hampshire.edu writes:
  12. >    I'm writing a C program that requires real-time character input (i.e.,
  13. >character-by-character, as opposed to line-by-line).  Let's say, for the sake
  14. >of argument, that I want to be able to move a cursor on the screen using the
  15. >cursor keys.  How can I do this?  I'm already familiar with vt100 escape codes,
  16. >so you can skip that part.  Parting from that, I asked around and I got a
  17. >rather vague answer:  "That is system specific."  How true is this?  If you
  18. >decide to take the task of explaining this to me, please pretend I know
  19. >nothing, which isn't too far from the truth... :-)
  20. >
  21. >                     jmolinari@hamp.hampshire.edu
  22.  
  23.  
  24. Have you looked into using Curses?  It'll let you accept input character by 
  25. character.  Is not device dependent -- assumming you have a Terminfo file
  26. for the terminal that you are using (which is also required by 'vi' anyway).
  27.  
  28. Give it a try......
  29.  
  30. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  31.  | |-------------|  Application Data Systems     |  Phone: (601) 393-2046  | |
  32.  | |  Mark Parr  |  1930-B 1st Commercial Dr. N  |    Fax: (601) 393-6605  | |
  33.  | |-------------|  Southaven, MS 38671          | markp@adsi.homecare.com | |
  34. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  35.