home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / hp / 14773 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  1.5 KB

  1. Xref: sparky comp.sys.hp:14773 comp.lang.c:19587
  2. Path: sparky!uunet!gatech!usenet.ins.cwru.edu!icd.ab.com!iccgcc.decnet.ab.com!weisfeld
  3. From: weisfeld@iccgcc.decnet.ab.com
  4. Newsgroups: comp.sys.hp,comp.lang.c
  5. Subject: capturing a keystroke
  6. Message-ID: <1993Jan7.145947.9534@iccgcc.decnet.ab.com>
  7. Date: 7 Jan 93 14:59:46 EST
  8. Lines: 28
  9.  
  10. Hi,
  11.  
  12. I am attempting to capture one keystroke at a time, using C, from various 
  13. UNIX systems, at the moment a Hewlett-Packard 9000 (Apollo) Series 700 
  14. running HP-UX. I am follwing the instructions given in the TTY section
  15. of the manuals (like clearing ICANON and setting MIN and TIME). 
  16.  
  17. Everything is working fine, except for the arrow keys. When I enter a
  18. single character (say an 'R'), I get the expected character code. However,
  19. when I enter an arrow key, the cursor simply moves on the screen and no
  20. character code is returned. The HP manual states that in LOCAL MODE
  21. the system displays control codes but does not execute them. It states that,
  22. if you press the left arrow key, the terminal displays an escape character
  23. on the screen but does not perform the cursor left function. I put the 
  24. machine in LOCAL MODE and the cursor still moves.
  25.  
  26. I also tried using the XmitFnctc() escape sequence which states that it 
  27. controls the sequences generated by keys such as the arrow keys.
  28.  
  29. I know that I could use curses, but I am curious as to why I cannot
  30. capture the arrow keys.
  31.  
  32. I am also interested in capturing other non-alphanumeric keys.
  33.  
  34. Thanks,
  35.  
  36.  
  37. Matt
  38.