>>>> * Get keypress * <<<< 
Author Message
 >>>> * Get keypress * <<<<

   How do I read a keypress (char) without having the user to
   press Return??

   System = Unix V.

Kurt.



Wed, 26 Apr 1995 23:47:48 GMT  
 >>>> * Get keypress * <<<<

Quote:
>    How do I read a keypress (char) without having the user to
>    press Return??

>    System = Unix V.

Hm, set the terminal to raw mode, on HP-UX it will look like this:

#include <sgtty.h>
...
{ char buf[1];
  struct sgttyb *ttyio;

  gtty(0,ttyio);
  (ttyio->sg_flags)|=(RAW);
  stty(0,ttyio);
  ...
  read(0,buf,1);        /* read one char, don't wait for return */
  ...

Quote:
}

Walter


Fri, 28 Apr 1995 17:51:47 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. <<<<<<<Parsing help, please>>>>>>>>

2. File Format conversion, ascii freeform -->.csv <-->.wk1<-->dbf<-->?HELP

3. <<<>>>Need C code advice with functions and sorting.<<<>>>

4. <><><>HELP<><><> PCMCIA Motorola Montana 33.6

5. >>>Windows Service<<<

6. proposal: <basic.h>, <pascal.h>, <fortran.h>, <cobol.h>

7. <<<< C Grammar for yacc needed >>>>

8. - - - = = =<><> W e b - U S A <><>= = = - - -

9. <Ctrl>+<Key>

10. <<testing>>

11. >>I need help!<<(duh)

12. >>ATTN: SPRITEWORKS v1.0<<

 

 
Powered by phpBB® Forum Software