[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to switch off line buffering in stdin?



>> I'm writing an application, which implements some terminal functionalities.
>> I'd like to receive every keystroke, just after the key is pressed
>> (like with vga_getkey(), but in text mode).

setvbuf, etc.  are only for output streams, not input streams.  
Input is never buffed, but as you found out, the output of the
terminal driver toyour program is.


There are seveal ways to do this.  The normal one is to use ncurses or a
similar library; this lets you get raw characters.  

Carl


Reply to: