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