home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / hp / 14465 < prev    next >
Encoding:
Text File  |  1993-01-03  |  1.5 KB  |  43 lines

  1. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!math.fu-berlin.de!uniol!majestix.informatik.uni-kiel.dbp.de!news
  2. From: ca@informatik.uni-kiel.dbp.de (Claus Assmann)
  3. Newsgroups: comp.sys.hp
  4. Subject: HP700/92 terminal: how to get 'real' raw mode ?
  5. Date: 3 Jan 1993 14:49:20 +0100
  6. Organization: Dept. of Computer Science, University of Kiel, Germany
  7. Lines: 31
  8. Message-ID: <1i6qt0INNq4q@mine.informatik.uni-kiel.dbp.de>
  9. NNTP-Posting-Host: mine.informatik.uni-kiel.dbp.de
  10. Keywords: 700/92,terminal,raw,input
  11.  
  12. I have a problem with HP700/92 terminals connected to an HP817
  13. (PA-RISC) running HP-UX 8.0.1 (?). I have a little program which
  14. switches the terminal to 'raw' mode to get directly every key (as vi(1)
  15. does).  However, it doesn't work ! I get all keys except those for
  16. cursor control (up,down,left,right,home,clear,insert,delete etc).
  17. Instead the terminal performs the action directly without informing my
  18. program, so my program doesn't work (it has it's own input routine to
  19. control user input according to a specification, eg. field width, input
  20. type etc).  I have tried system("stty raw -echo") and
  21.  
  22. #include <sgtty.h>
  23. void switchterm(mode)
  24. int mode;
  25. {
  26.  struct sgttyb tty;
  27.  
  28.  ioctl(0,TIOCGETP,&tty);
  29.  if (mode) tty.sg_flags = (tty.sg_flags | RAW) & ~ECHO;
  30.  else tty.sg_flags = old_flags;
  31.  ioctl(0,TIOCSETP,&tty);
  32. }
  33.  
  34. Does anybody know how to get full control over the terminal like
  35. vi(1) does ?
  36.  
  37. Thanks for any help,
  38.  
  39. Claus
  40. -- 
  41. ObX.400Joke:  How do two X.400 users communicate?  (answer: by telephone)
  42.                         --- Tom Limoncelli
  43.