slang-users mailing list

[2000 Date Index] [2000 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: newbie:Slang_getkey()


Joachim <nuklear@xxxxxxxxxxxxxx> wrote:
>Kann anybody give me a hint how the characters from stdin can be echoed
>to the stdout with the: 
>
>			SLang_getkey() 
>
>function in real-time?

SLang_init_tty puts the terminal in non-echoing mode.  You can either
do:

    int my_getkey ()
    {
       int ch = SLang_getkey ();
       fputc (ch, stdout); 
       fflush (stdout);
       return ch;
    }

or try calling

     system ("stty echo");

_after_ calling SLang_init_tty.

--John


[2000 date index] [2000 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]