You have to put the termial into raw mode before you can receive
single key strokes.
Take a look at TERMIOS(3) and read up on terminals.
> What is the equivalent to getch() in Linux?
>
> I found getch() in curses.h and ncurses.h.
>
> I'm used to getch() being in stdio.h
>
> I tried getchar() but getchar dispalys any character till I press the return
> key.
>
> Is there a simple getch() function I sould create in my own include file?
>
> #include
> int getch()
> {
> return(getchar());
> }
>
> but getchar will display everything that I type until I press the return
> key. Correct?
>
> Thanks,
> Chris Fowler
>
> --
> To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message body.
>
--
To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message body.